Skip to main content
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with: Chris Peters
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with: Chris Peters

Programming JavaScript Applications (Early Release) By Eric Elliott

By
Published in , Comments (4)

On my journey up to cf.Objective() 2012, I read the Early Release edition of Programming JavaScript Applications by Eric Elliott. I've read a couple of "early release" editions lately and I have to admit that they kind of confuse me. The O'Reilly website states that early release books should have all the content, just in its raw, unedited form; yet, the early release editions seem to be missing entire chapters (if not entire sections) according to the "what we'll cover" lists.

For example, in the beginning of the book, it states that the author will discuss:

  • JavaScript features and best practices for application developers.
  • 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.

As such, I can't really give a fair review of the book at this time as it is clearly far from being done. That said, the content that is in place is pretty good. I don't necessarily agree with everything Elliott says about Object creation (I love constructor functions even though I don't often deal with inheritance); but, Elliott definitely knows his JavaScript and brings some really interesting points of view to the table.

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.

Reader Comments

4 Comments

Hi Ben,

Thank you for your excellent review of my new book. BTW, I've been reading your blog for many months. It's an excellent resource. =)

You are correct here that the early release is NOT complete. This book is organized into two parts: A JavaScript language primer / best practices, and an Application organization part. I'm still working on the second half of the book, and it will be a few months before that is complete, but as a purchaser of the early release, you will automatically receive all of the updates.

And, rest assured, your feedback is extraordinarily valuable to me, and I will share your thoughts about setting buyer expectations with the marketing folks at O'Reilly.

- Eric Elliott

5 Comments

Hey there Ben,

I know this is completely off-topic, but I couldn't find it anywhere - not even with Google...
Did you have your arm-wrestling rematch with Jason Dean? After cf.Objective()2011, you were throwing a nice verbal contest, so I was wondering if this rematch even happened...

15,902 Comments

@Eric,

Awesome, I'm definitely looking forward to reading the second half. I'm trying to gobble up as much JavaScript goodness as I can. I feel like I have a solid understanding of JavaScript from a technical standpoint; so, its the bigger-picture "how it all fits together" stuff that I am craving. Definitely excited to see what you put down.

@Ben R,

Ha ha, we actually never did it. By the time cf.Objective() 2012 came up, I was pretty out of shape and Jason was sleep deprived from the new baby. We decided that it would probably embarass both of us so we just called it off. It was better than both having to fake injuries :D

5 Comments

@Ben,

hahaha, so that was it!
Well, I guess it couldn't be helped, man.
At least you both keep up the good work on programming :D

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel