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.
Pros
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.
Cons
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.