A fantastic read, and two great things brought up are the
constructor property of a variable to see what type it is (more solid than
typeof), and the
apply methods. I’ve actually missed out on the latter methods, but they are superb for setting context for a function/event.
John then explains AJAX in a good way, and then he presents three use cases:
- Enhancing blogs with AJAX
- Autocomplete search
- An AJAX Wiki
I liked the one about auto-completing search, since it’s exactly what we see in all the fancy web-apps out there, while the other two were, frankly, kind of uninteresting. I would’ve preferred more “real” scenarios that web developers come across every day, than two cases, albeit technically challenging, who weren’t that interesting from a business and end user perspective. Maybe sometimes the use cases focuses too much on the goal, and not the way to get there.
I think I would’ve preferred him delving into the depths of jQuery; what obstacles he has come across, which interesting design decisions he has made etc. After all, I think the people reading this book are more prone (and hungry) to be creating their own libraries, as opposed to using existing ones. However, I guess some people would just see the book as jQuery pimping then, so I can understand why it is mentioned so sparsely.
Other people’s code
The book mentions and displays a fair amount of code from other people, where Douglas Crockford‘s and especially Dean Edwards‘ work is prominently featured. My stand on this swayed a little; sometimes I felt that maybe I instead should’ve read a book from one of those gentlemen, while at other times, I thought John did what was the right thing to do: showing and mentioning the best code out there.
In the end, though, I’m happy to see the best code and solution out there, no matter whose name is on it.
Pick it up, if you dare!