售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning Single-page Web Application Development
Table of Contents
Learning Single-page Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Understanding Single Page Application
Getting acquainted with SPA
Understanding the work of SPAs
Understanding the MVC/MVVM/MV* pattern
Peculiarities between SPA and traditional web development
Choosing a library or framework
Introducing the MEAN stack
Tools to develop web applications
Text editor
AngularJS
Debugging tools
Generators and the task manager
Yeoman
Bower
Grunt
The SPA directory structure
It's all about JavaScript
HTML, CSS, and the responsive way
Pure CSS
Summary
2. Taking a Deep Dive into Node.js and MongoDB
Node server, NPM, and middleware
Event-driven development and the event loop
The event loop
Working with require() and modules
The require() function
The Node modules
Express – a web framework on a server
MongoDB and the terminal
Comparing a relational database with the NoSQL database
The mongo shell
MongoDB connection with Mongoose
Mongoose schemas and models
Summary
3. API with MongoDB and Node.js
The working of an API
Boilerplates and generators
Hackathon starter
MEAN.io or MEAN.JS
The Passport module
Generators
The Express generator
The speakers API concept
The user history
Creating the package.json file
Initiating the JSON file
Node server with server.js
Model with the Mongoose schema
Defining the API routes
Using MongoDB in the cloud
Inserting data with Postman
Summary
4. Creating a Conference Web Application
Rebuilding the API
Getting the baseline structure
Changing the initialization process
Changing the directory structure
Inserting new folders and files
Creating the configuration file
Adding the Passport middleware
Adding session control and password encryption
Setting password encryption to a user model
Reviewing the changes in the server.js file
Dealing with routes
Templates with Embedded JavaScript
Bower leading frontend dependencies
Pure CSS and Responsive Boilerplate for frontend views
Creating the index, profile, login, and signup pages
Summary
5. Starting with AngularJS
Starting the baseline application
The AngularJS MVC pattern implementation
Model
View
Controller
Detailing directives, expressions, and scope
Two-way data binding and templates
Reusing templates
Understanding dependency injection
Services
Modules in AngularJS
Project organization
Summary
6. Understanding Angular Views and Models
Dissecting and understanding the MEAN.JS generator
Differentiating MEAN.JS and MEAN.io
Scaffolding the application
The application anatomy
Refactoring the API
The angular-gravatar image directive
Testing the speakers' API routes
Summary
7. Testing Angular SPA with Karma and Protractor
Testing concepts
Introducing Jasmine
Configuring Karma (unit testing)
Reviewing the speaker controller test
Running a Karma test
Reviewing the speaker model test
Karma testing with WebStorm
Configuring Protractor (e2e testing)
Configuring the e2e testing folder
Starting the Selenium server
Summary
8. Deploying the Application to the Cloud
Hosting the project on GitHub
Continuous application development
Automatic deployment from GitHub
Setting up a Shippable account
Setting up a Heroku account
Additional notes on Heroku deployment
Hands-on deployment
Checking the build process
Checking the application in production
Final notes on SPA
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜