Click the table of contents to start reading.
Insights from generations of SPA refinement.
Listen to this book in liveAudio! liveAudio integrates a professional voice recording with the book’s text, graphics, code, and exercises in Manning’s exclusive liveBook online reader. Use the text to search and navigate the audio, or download the audio-only recording for portable offline listening. You can purchase or upgrade to liveAudio here or in liveBook.
about this book
about the cover illlustration
Part 1 Introducing SPAs
1. Our first single page application
1.1. Definition, a little history, and some focus
1.2. Build our first SPA
1.3. The user benefits of a well-written SPA
2.1. Variable scope
2.2. Variable hoisting
2.3. Advanced variable hoisting and the execution context object
2.4. The scope chain
2.6. Functions—a deeper look
Part 2 The SPA client
3. Develop the Shell
3.1. Grok the Shell
3.2. Set up the files and namespaces
3.3. Create the feature containers
3.4. Render the feature containers
3.5. Manage the feature containers
3.6. Manage application state
4. Add feature modules
4.1. The feature module strategy
4.2. Set up feature module files
4.3. Design method APIs
4.4. Implement the feature API
4.5. Add frequently needed methods
5. Build the Model
5.1. Understand the Model
5.2. Set up the Model and other files
5.3. Design the people object
5.4. Build the people object
5.5. Enable sign-in and sign-out in the Shell
6. Finish the Model and Data modules
6.1. Design the chat object
6.2. Build the chat object
6.3. Add Avatar support to the Model
6.4. Complete the Chat feature module
6.5. Create the Avatar feature module
6.6. Data binding and jQuery
6.7. Create the Data module
Part 3 The SPA server
7. The web server
7.1. The role of the server
7.3. Advanced routing
7.4. Adding authentication and authorization
7.5. Web sockets and Socket.IO
8. The server database
8.1. The role of the database
8.2. An introduction to MongoDB
8.3. Use the MongoDB driver
8.4. Validate client data
8.5. Create a separate CRUD module
8.6. Build the Chat module
9. Readying our SPA for production
9.1. Optimize our SPA for search engines
9.2. The cloud and third-party services
9.3. Caching and cache busting
Appendix B: Testing an SPA
© 2014 Manning Publications Co.
About the Technology
Web 1.0: Sites request pages from the server one at a time. Each interaction with a page means another round-trip. Slow, awkward, and easy.
Web 2.0: AJAX . Individual elements change without updating the whole page. Great idea, but a lot more work on both the server and the client.
Enter the modern single page web application (SPA). With the near universal availability of capable browsers and powerful hardware, you can push most of the web application to the browser; including HTML rendering, data, and business logic. The only time a client needs to communicate with the server is to authenticate or synchronize data. This means users get a fluid, comfortable experience whether they're surfing at their desk or using a phone app on a sketch 3G connection.
About the book
If your website is a jumpy collection of linked pages, you are behind. Single page web applications are your next step: pushing UI rendering and business logic to the browser and communicating with the server only to synchronize data, they provide a smooth user experience, much like a native application. But, SPAs can be hard to develop, manage, and test.
This book assumes basic knowledge of web development. No experience with SPAs is required.
- Design, build, and test a full-stack SPA
- Best-in-class tools like jQuery, TaffyDB, Node.js, and MongoDB
- Real-time web with web sockets and Socket.IO
- Touch controls for tablets and smartphones
- Common SPA design mistakes
About the reader
placing your order...Don't refresh or navigate away from the page.