JQuery Fundamentals
rebeccamurphey.com
rebeccamurphey.com
I've been working with JavaScript on and off for years (though am far from an expert), but something like this is still a great primer for me, even the introductory stuff. It never hurts to retread the basics quickly and from the perspective of someone you know is a seriously expert developer right NOW (and not when I picked up most of my JS.. 7-8 years ago!)
Forgetting that, what I've read of it so far is well written and not padded to fill a certain page count like many books. It's open, it's free, and even if it's not going to win any prizes, it's certainly way above average in the gamut of programming books, free or not.
Also, putting the book on GitHub was genius. There are already 13 forks, and the author has been very quick to respond to issues posted there. (Full disclosure - one of the forks is mine. I can't contribute to the jQuery part, but I tried to help out with the installer script when the author mentioned it was a bit wonky.) Releasing a book in this way allows people to add value (if they can), and it's great to see an innovative use of GitHub. (There may be lots of other books available there, but it's new to me if so.)
Has any one read this book, have a review?
That said, Rebecca's very sharp, knows her stuff, and how to communicate and explain things well in person. I haven't read this yet, but assume much of that will translate to the written word.
What is here looks really solid, though there are nitpicks for the pedants to find and gripe about. I am especially interested to see what shows up eventually in Part III.
Big, big kudos to the author for putting everything onto a single page.
By the way, I've found the .chm format docs much, much easier to browse. There isn't an official .chm release but you can find a current version here: http://charupload.wordpress.com/2007/12/07/jquery-documentat...
Now, on the other hand, if you don't yet know Javascript and you're trying to use jQuery, I would suggest learning the syntax and semantics of the language first. But if you know Javascript, then jQuery is trivial.
In that respect, I think maybe the biggest value in this book is the Javascript overview at the beginning. Too many people try to use jQuery without grasping its foundation.
I often go looking for the wrong thing. I'll think "In Ruby/plain JavaScript/C/whatever, I'd achieve X by doing Y and then Z" and then look for jQuery's equivalents to Y and Z, rather than doing it the easier and conventional jQuery way.
Books are good at relaying the thought processes of experts rather than the function by function material that, yes, a reference site provides a lot better.
For a slightly convoluted example, let's say I have a little JavaScript and DOM knowledge and am a few days into using jQuery without following any serious tutorials or books. To change the code within an element I might try something like $('#whatever').innerHTML = 'whatever' rather than the more jQueryesque $('whatever').html('whatever') - a simple example but it can get a lot more elaborate than that.
However, it's definitely a case of different strokes for different folks. You might be able to pick up on the idioms and nuances of new libraries and languages without much guidance, but books like Rebecca's can provide a much needed "guided tour" for some people nonetheless.
All of the above is why I wrote Beginning Ruby despite the existence of the venerable Pickaxe. The Pickaxe is an awesome reference book with a relatively weak tutorialesque set of chapters tacked on the front. My book caters to people who want to learn in a more linear, narrative fashion (and, to be fair, has a relatively weak reference section tacked on the end ;-))
http://productsearch.barnesandnoble.com/search/results.aspx?...
23 books - about 18 of which look to be entirely about jQuery, many of them very recent (this year or new editions this year), and at all levels.
I learned a lot of bad habits this way - because there are always two (or more) ways of doing things, and one of them is usually better than the rest. I just figured out that I was doing those things wrong when reading the book.
Case for example: Increasing Performance with Event Delegation - http://www.rebeccamurphey.com/jqfundamentals/#N20DAA
When I started learning jQuery, I scratched my head over this issue - I assign event handlers for a class, but they don't apply for elements that were added later to the DOM. Had the aha! moment when I figured out what was happening. The best solution I could find was to keep on assigning the event handlers whenever I added something to the DOM.
It served me well but Rebecca just taught me that there is something called $.fn.live and $.fn.delegate designed solve exactly this problem. This I would not have searched in the docs because I did'nt know that there existed something to solve this; and even if I thought there did, I might not have been able to frame the right question.
And there are lots of other gems that I picked up from this book.. jQuery really needs this. Especially for beginning developers who discover the power of jQuery - it helps them learn the right habits from the get go.
And the book is very concise and informative that the author deserves great praise for an excellent job.
Thanks, Rebecca Murphy!