Full description not available
C**A
A definitive and critical work. This is essential reading.
Mikowski and Powell's Single Page Web Applications is an exceptional book, which will probably become one of the definitive SPA references. The subject knowledge is extensive and it is apparent that the authors know the material and just as importantly, have the ability to present it in a clear and understandable manner.The scope of this work is defined in the subtitle, JavaScript end-to-end.The book constructs a single page web application, describing the client and server components and how, some of the standard libraries, jQuery, Node.js, Socket.IO as well as MongoDB are leveraged to create a robust and scalable application. Be forewarned, the subject matter is not an entry level text, it is as Thoughtworks' Mark Rydall commented,"Thorough, comprehensive and methodical". The authors are upfront about the amount of client side JavaScript code and methodically build the application step by step. There's a deep dive on the client-side scripting with some reprieve on the server side code, which covers Node.js, Socket.IO and the MongoDB persistence layer.A minor criticism, it would have been nice to have integrated and expanded the testing appendix into the main body before the chapter on production concerns. There are just too many horror stories about inadequately tested code released into production, not to have made testing a first class discussion.Mikowski and Powell have also included two items which should be considered a prerequisite before moving to the client/server components. Appendix A, JavaScript coding standard is a gem, distilling the authors hard learned lessons on writing maintainable code and validating JavaScript. Have a look at the JSLint section and Doug Crockford's JSLint documentation, the JSLint pre-commit hook and the reference to David Pashley's bash script standards. It's very hard not to emphasize the importance of this section. No one starts with the goal of writing poorly documented code, but without a well defined coding standard and validation program, that's where a lot of code ends up. Kudos to the authors for acknowledging and addressing the issue that writing code is more than getting the syntax correct. Chapter 2, then continues to lay the foundation with a very clear overview of JavaScript scoping, anonymous functions and closures, completing the foundation for the client and server components.All in all, Single Page Web Applications is an exceptionally well written book which will be a constant reference point.
J**C
Chapter 2 alone is worth the price of the book
I wrote my first computer program in 1974 (on punched cards). In 1975 I actually soldered together a computer built from transistors (because motherboards didn't exist yet). I've written code in dozens of languages, many of which most developers today have never heard of (WATFIV or SNOBOL, anyone?). I've done Master's level work in Computer Science, including writing an operating system in a VM assembly language and writing a compiler for a high level language. I understand code. Javascript is the only language I've used in the last 20 years that I simply could not master just by reading and tinkering with existing code, and maybe reading a little doc here and there. I can get by in Javascript: I can tweak scripts, I can handle jQuery pretty well, I can even write some basic functionality from scratch. But there is good quality, professional grade Javascript code out there that I simply cannot read. I read it and I have no idea what it does or why it's doing it. So I can't tweak it. That is highly unusual for me, not to mention extremely frustrating.Chapter 2 of this book, Reintroducing Javascript, has lifted the veil, opened my eyes, and revealed to me Javascript's true nature. It very clearly, very simply describes what's different in Javascript vs. every other language I've ever used. Here are the concepts I now genuinely understand:+ Every other language I've used scopes variables lexically, i.e. based on the lexical blocks (not functions) in which the variable's declaration is nested. Javascript scopes variables dynamically, i.e. based on the functions (not blocks) that are on the runtime stack at the time the function is defined (not run).+ Because variables are scoped dynamically (based on the runtime stack), Javascript requires "closures", which "close over" the stack and save the runtime states of variables deeper in the stack for functions defined on that stack but (potentially) run later with a different stack state. Javascript creates closures automatically, but programmers often explicitly use (to my eyes) peculiar syntax to force closures they know they'll need.+ Every other language I've used defines objects using classes (blueprints). Javascript defines objects using prototypes (examples).Having these differences explicitly called out and explained so clearly and concisely has truly changed my (professional) life. I get Javascript now. I now not only recognized the "immediate function" syntax, but I understand why it was written that way. Eureka! Really. Eureka!The book probably also helps you build single page web applications. I'm manually typing in the examples and working through the code. I've made it through Chapter 3, and I can imagine by the end of the book I'll end up with a handy little chat app. But I truly don't care what comes later in the book - they could spend the whole rest of the book telling me stories about their pets. I got double my money's worth from Chapter 2, and that's worth 5 stars to me. Thanks, Michael and Josh! Thanks tons!