JavaScript Web Applications: jQuery Developers' Guide to Moving State to the Client 1st Edition
| Alex MacCaw (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
Building rich JavaScript applications that bring a desktop experience to the Web requires moving state from the server to the client side—not a simple task. This hands-on book takes proficient JavaScript developers through all the steps necessary to create state-of-the-art applications, including structure, templating, frameworks, communicating with the server, and many other issues.
Throughout the book, you'll work with real-world example applications to help you grasp the concepts involved. Learn how to create JavaScript applications that offer a more responsive and improved experience.
- Use the Model-View-Controller (MVC) pattern, and learn how to manage dependencies inside your application
- Get an introduction to templating and data binding
- Learn about loading remote data, Ajax, and cross-domain requests
- Create realtime applications with WebSockets and Node.js
- Accept dropped files and upload data with progress indicators
- Use major frameworks and libraries, including jQuery, Spine, and Backbone
- Write tests and use the console to debug your applications
- Get deployment best practices, such as caching and minification
Editorial Reviews
About the Author
Alex MacCaw is a Ruby/JavaScript developer & entrepreneur. He has written a JavaScript framework, Spine and developed major applications including Taskforce and Socialmod, as well as a host of open source work. He speaks at Ruby/Rails conferences in NYC, SF and Berlin. In addition to programming he is currently traveling round the world with a Nikon D90 and surfboard.
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : O'Reilly Media; 1st edition (September 13, 2011)
- Language : English
- Paperback : 278 pages
- ISBN-10 : 144930351X
- ISBN-13 : 978-1449303518
- Item Weight : 1.02 pounds
- Dimensions : 7 x 0.6 x 9.19 inches
- Best Sellers Rank: #3,394,132 in Books (See Top 100 in Books)
- #1,647 in JavaScript Programming (Books)
- #2,893 in Software Design & Engineering
- #6,359 in Software Development (Books)
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
While all the examples and everything work if you use his libraries and versions of backbone.js, his version of backbone.js is 0.3.0 while the current version is 1.1.0!
I wasted a lot of time trying to work through the examples but using my own project's needs. For example the "bind" call in Chapter 12 is actually now "listenTo". And the "refresh" event doesn't work, I had to use the "sync" event.
Also the author's "spine" library no longer looks supported.
When you're learning something new, it's always a challenge. This is particularly difficult if you have a library that is outdated, and the text refers to that outdated library.
Unfortunately, I didn't find out in time before I could return the book.
I would look for something that is more modern and uses some latest version of backbone.js.
But, you need to be at the right stage... which is basically, when you can follow the book, although it may take a bit of effort. If you're already a ninja, you probably don't need to read the book at all, unless you simply want to be exposed to another POV. And, for a lot of non-ninja, the book will be too advanced. Luckily, O'Reilly put the entire first chapter on-line so you can judge for yourself.
Chapter 1 is no namby pampy intro. In the chapter McCaw defines a constructor function used to create constructor functions that emulate classes in languages which support classes natively. He also includes a useful discussion of how the 'this' context switches in JS and how to control it with bind or by defining a jQ-like proxy method. Later design patterns have some similarity to what he does in chapter 1 (using Object.create instead of constructors), so if you can follow this chapter, you're probably ready to take on the book.
I'd describe the audience for the book as developers who've already built an app, or at least added fairly complex functionality to web pages and are comfortable with prototypal inheritance, closures on inner functions, call/apply and who know basic DOM scripting. Additionally, you may well have a sneaking suspicion that although your apps work, they're not designed as cleanly as they could be. If you're part of that audience, you just might learn a boatload of stuff as you follow McCaw's thinking as to how to design large-scale JS apps. Despite the sub-title, you don't really need to know jQuery (jQ) all that well, as long as you're somewhat familiar with it and the way it chains methods. One of the nice things about the book is that McCaw often gives you the plain old JavaScript (PoJS) for some of the basic methods he adds to his template objects and constructors, before switching to jQ for convenience. For example, after chapter 1 you'll have the PoJS equivalents for jQ's extend and proxy so it's easy to create a PoJS version for say the Model object or the Controller object which he defines later. For other jQ methods used in examples, you should be at the level where you can figure out what jQ is doing and write the equivalent in PoJS if that's what you want to do.
Some of the other reviews have touched on a few negatives, but to my mind they're not enough to downgrade the book. Occasionaly, the discussion seems to jump over an explanatory detail, but if you make a lab page that links to the book errata page and download the code for the examples, you should be able to fill in any gaps. I found the first five chapters fascinating, and chapters 6-13 useful and concise roll ups on various topics like dependency management, debugging and various libraries. In addition there are appendices that do a quick survey of jQuery and CSS3.
The problem with learning JS in the contemporary landscape is that what used to be advanced, even esoteric, technique is commonplace now. If you go back and look at the Sitepoint JavaScript Anthology or PPK on JavaScript which came out ~2005/2006, you'll see relatively straightforward and easy to understand JS and DOM scripting. But, as Crockford noted "JavaScript is Lisp in C's clothing" and if you don't have a theoretical background in functional programming, it can be very challenging to follow the ninja use of function scope to create modules, encapsulate values in closures etc... Wrapping your head around the core of this book can really deepen your understanding of JS.
Top reviews from other countries
Before reading this book, I wasn't aware of the existence or function of these MVC Javascript frameworks. Now I've started experimenting with Backbone.js and it seems like these frameworks are the future of large Javascript apps.
So this book has been a great introduction to a new way of writing Javascript apps. However, this field is moving very fast, so various things get out of date: Spine has evolved to use CoffeeScript (not mentioned in this book atall) and the templating library mentioned earlier in the book has also been discontinued.
Auf einzelne Inhalte einzugehen, würde den Rahmen deutlich sprengen. Jedenfalls bekommt man gut leserlich und verständlich einen Überblick über sehr viele Aspekte der Erstellung von Web-Applikationen, die sich hauptsächlich am Client abspielen. Für Leute, die bisher typische Webanwendungen mit PHP oder Java programmiert haben, steckt jede Menge interessanter Informationen in diesem Buch. Aber auch "alte JavaScript-Hasen" werden sich bestimmt nicht langweilen, besonders wenn sie noch keine weitreichende Erfahrung mit "echten" JavaScript Applikationen haben.
In einem Untertitel heißt es zwar: "jQuery Developers' Guide to Moving State to the Client". Ich würde das Buch aber auch den (wenigen) Leuten empfehlen, die jQuery gar nicht einsetzen. Themen wie Model-Classes, Observer-Pattern, Controller, Dependency Management, WebSockets, Testing/Debugging und Deploying sind für Nicht-jQuery-Programmierer genauso nützlich.
"JavaScript Web Applications" has been the perfect book for me, because it is driven by real world problems and uses real world frameworks (jQuery) in the examples. It is very well written, explains the MVC architecture really well and drives you away from writing spaghetti code JavaScript and/or jQuery. I highly recommend this book for everyone who wants to know how to architect real world JavaScript applications.



