Jump to ratings and reviews
Rate this book

Single Page Web Applications

Rate this book

In Single Page Web Applications you'll learn to build modern browser-based apps that take advantage of stronger client platforms and more predictable bandwidth. You'll learn the SPA design approach, and then start exploring new techniques like structured JavaScript and responsive design. And you'll learn how to capitalize on trends like server-side JavaScript and NoSQL data stores, as well as new frameworks that make JavaScript more manageable and testable as a first-class language.

About this 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.

Single Page Web Applications shows how your team can easily design, test, maintain, and extend sophisticated SPAs using JavaScript end-to-end, without getting locked into a framework. Along the way, you'll develop advanced HTML5, CSS3, and JavaScript skills, and use JavaScript as the language of the web server and the database.

This book assumes basic knowledge of web development. No experience with SPAs is required.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

What's Inside

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 Authors

The authors are architects and engineering managers. Michael Mikowski has worked on many commercial SPAs and a platform that processes over 100 billion requests per year. Josh Powell has built some of the most heavily trafficked sites on the web.

Table of Contents

PART 1: INTRODUCING SPAS Our first single page application Reintroducing JavaScript PART 2: SPA CLIENT Develop the Shell Add feature modules Build the Model Finish the Model and Data modules PART 3: THE SPA SERVER The web server The server database Readying our SPA for production

325 pages, Paperback

First published June 1, 2012

Loading interface...
Loading interface...

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
26 (22%)
4 stars
45 (38%)
3 stars
31 (26%)
2 stars
11 (9%)
1 star
4 (3%)
Displaying 1 - 14 of 14 reviews
December 9, 2016
Not bad. Too ambiguously for me. Some very useful parts are mixed with so boring reading. I do not understand why author has included too many code examples into each chapter. He should attach a code archive better. Despite the big advantage is a detailed review of SPA application concept. SPA examples without any framework are the most powerful pages. They are really cool! I would recommend these parts to everyone who want to know deeply about the single page application.
Profile Image for Irina Lukyanenko.
25 reviews4 followers
January 7, 2017
I have read only JavaScript Essentials Part and I really thankful because it contains a strong deep explanation.
December 1, 2014
Fun JavaScript end to end book! Very good intermediate book on how to write rich web apps with a JavaScript backed (node.js + MongoDb). This book is one of those programming books that not only teaches the language but also also preaches coding "better" practices. The appendix on Javascript standards was a bit disappointing and the authors make very few mentions about security, which should be a topic of great concern for SPA developers. The chapters on Mongo, Express, Node.js were my favorite parts. Chapters flow very nicely. Most chapters start where the last one ended. The code is refactored and super well commented.
Profile Image for Igor.
77 reviews
June 23, 2017
This is good book that can teach you JavaScript programming, but the example that is used throughout the whole book in my opinion is too big and in moments gets confusing.

The beginning is great, the explanation of how JavaScript works and how browsers are handling JavaScript code is one of the best that I have ever read.

The part with the chat application that is used for explaining SPA is too big in my opinion, I wasn't able to follow the code, because sometimes it was spreading on 3 pages.

The end part for Node.js and MongoDB has nice explanation.

1) Excellent JavaScript introductory. (for more advanced JavaScript developers)
2) Good advice's and reasons for using clean code JSLint
3) Nice explanation of Node.js and MongoDB

1) Very long example that is spreading over 2/3 of the book
2) Lack of more examples, experiences and practices where SPA can be used

From this the 3 stars.

Like I said in the beginning this is a good book for intermediate/advanced JavaScript developers that want to learn SPA development with pure JavaScript and jQuery.
Profile Image for Jean Tessier.
146 reviews19 followers
January 22, 2015
Single page applications are all the rage these days. I figured this book could help me make sense of it all. I'm particularly interested in AngularJS, but it never came up in the book.

The book walks you through all the steps to build a fully functional chat application. It shows client-side interactions, abstracting a data layer, communicating with a server to exchange messages, and storing user profiles in a database on the server. The example is just complex enough to showcase all the steps with drawing too much attention to itself.

Overall, it's a decent walkthrough of DIY single page apps. If you want to build a professional app, you might be better off with Dojo or some of the frameworks out there. This will not become a reference that I would get back to very often.


Throughout, the authors show you step-by-step how to write the code for all of the components. They do a great job of starting with a bare bone template and fill in the functionality gradually. They use bold text judiciously to show the differences between each successive iteration of the development.

They use the URL itself to store the state of the app. This lets the app lean on the browser's history mechanism to handle the back button and other navigation.

The authors mention "fractal MVC" as a means to structure the parts of the application. The idea is great in principle, if the lower layers are completely encapsulated in their enclosing component. A container shouldn't have to dig into the details of its components. But they messed it up by having the top-level shell control everything in the lower layers.

There is a great introduction of Node.js and why it is well suited for use with Socket.IO for client-server communication. Without getting bogged down in technical details, they make a case for resource management and how it is more lightweight than regular TCP connections.

There is also a good introduction to MongoDB and how to connect it to Node.js. Again, it is just enough to wet the appetite and start playing with the database.


Much of the writing is really juvenile. The lead ins are repetitive and often condescending. There are a few attempts at humor but they feel forced and fell flat. The whole just felt unprofessional and reduced their credibility.

They write their own custom frontend framework instead of relying on more widespread technology. They complain that current frameworks all have tradeoffs that they were not comfortable with and that they wanted to show the inner workings of a web framework. They end up having to build a lot of infrastructure and deploy patterns that are not trivial to understand. And because they build their framework incrementally, it is not clear where they are going.

The flows of control get so complicated that they could really have used some sequence and/or collaboration diagrams. I got lost in all the inter-module communication.

Throughout, the authors rely exclusively on manual testing. They build a piece of functionality and then try it out in a browser or make calls to the server using curl. There is an appendix that delves into automated testing, but it feels like a bolted on late addition.
Profile Image for Deodoro.
6 reviews1 follower
December 29, 2013
There are some glitches in this book, but you may learn some interesting things with it (although I suggest borrowing it instead of buying, definetely not that good).

First, a disclaimer: not a book for beginners, you'd better keep away if you don't already know some HTML+CSS+JS. Just saying it...

The goodies: lots of code to browse; some good software engineering in the way things are put together; a nice primer on node.js.

On the flip side:

Waaay too much code, I'd tell the authors to put the bulk of the code up on github (or wherever), leave the important comments on the text and let the readers browser the source there (besides, it's probably a better experience, one can view diffs easily online, for instance).

There are all sorts of lame excuses to justify things like "we don't include the js files at the end of the HTML, like everybody else" or "we don't like two-way binding" (they'd be better off merely stating one has the right to prefer one thing over the other instead of making up excuses).

And there's one thing I just can't agree to: they write HTML into JS strings. That's just not right. At all. Ever.
Profile Image for Dan.
Author 3 books7 followers
June 21, 2014
A decent introduction to SPA architecture, with a heavy focus on JavaScript and JavaScript-centric technologies. The code is mostly solid, albeit a bit verbose at times (more could easily have been offshored to downloads, or to force the user to recall previous code snippets), but the verbosity was put to good use in many places to explain the how and way of certain choices.

There are a few places that struck me as odd: the authors don't explain why a jQuery plugin is needed when bind and trigger will do all or most of the work of the plugin competently. Despite previous verbosity, the section on caching is extremely thin. I would have appreciate more there.

But the book is solid and recommendable.
40 reviews1 follower
August 26, 2016
Liked the hands on style of the book - the author takes us on a ride building (yet another) chat application. Loved the way of breaking down the development into discrete testable pieces and then tying them all up together.

I guess this is the book for SPAs at the moment. SPA differs from the usual web page by moving the entire client application over to the browser using JS + only relying on the server for initial load + data updates

However the content isn't sticky.. maybe I speed-read it. This book stopped just short of greatness...
10 reviews
November 24, 2014
A great book, I really appreciated the rout the author takes in writing the framework from scratch rather than relying on a pre-built framework such as angular or react.

This in-depth planning for the architecture of the application rather than being a bunch of web page templates/fragments with some JavaScript glue is focusing on the best thing that has happened to front end or client-side development in a long time - we are now building applications, not just web pages.
Profile Image for Andrew Gurinovitch.
6 reviews7 followers
December 6, 2013
maybe this book is not that bad technically, but i just become bored. too lengthy and not much new for me.
1 review
January 2, 2015
Probably the best all around text I have read with JavaScript as the subject. This will make you write. Enter code.
Displaying 1 - 14 of 14 reviews

Can't find what you're looking for?

Get help and learn more about the design.