For example, in the beginning of the book, it states that the author will discuss:
- Code organization, modularity, and reuse.
- Separation of concerns on the client side (MVC).
- Communicating with servers and APIs.
- Designing and programming RESTful APIs with Node.js.
- Build, test, collaboration, deployment, and scaling.
- Expanding reach via platform targets and internationalization.
Of these topics, the "early release" edition only covers the first two - best practices and organization. The rest are only mentioned in passing (if at all) and alluded to in chapter references that don't exist.
All of his code samples are accompanied by QUnit tests. I love that this drives home how important testing is. Unfortunately, his code never indicates whether or not the tests pass. And, as someone who is not familiar with unit testing, I was sometimes left wondering if a given test was supposed to prove a point by failing or, by passing?
One thing that Elliott mentioned that I do want to put into effect is the use of Command Objects (also known as, Action Objects) instead of Switch statements. The idea here is to replace Case statements with method calls in order to make the code more readable, extendible, and less error prone.
In this approach, you would convert Switch cases to methods and then invoke the case as a method invocation:
commandObject[ caseValue ]( );
There's something about this approach that feels good. Plus, it prevents you from accidentally using the "fall-through" feature of Case statements!
The content of the early release edition is good - Elliott really does lay down some excellent best practices and design patterns and provides a good review of the technical abilities of the language; but, the real take-away for me is to stop buying early release editions. Honestly, I don't think it's even a good idea for O'Reilly to be selling them. It'd be one thing if all the content was done (and simply unedited); but, these books are incomplete and can result in an unfair assessment of the material.