I'm looking to improve the standard of my javascript as I'm moving beyond simple AJAX forms towards much richer interactions and it's quickly getting out of hand.
There's lots of resources about how to write proper javascript, many of the best are from Doug开发者_运维问答las Crockford, but very little about relevant design patterns and how to implement them.
Do you know of any resource, books or blogs, on how to produce and manage non-trivial javascript applications?
I plan to read Pro JavaScript Techniques by John Resig as well as his upcoming Secrets of the JavaScript Ninja.
Also, in my mind, "advanced" and "JavaScript" are often associated with Dean Edwards.
EDIT: it's not strictly devoted to JavaScript, though I'm also learning a lot from 24ways.org
EDIT2: from time to time, gems also pop up from Simon Willison's feed: today Dean's getElementsByTagName()
implementation and John's jQuery.require()
.
As mentioned :
Pro JavaScript Techniques by John Resig is an excellent book.
If you're intention is to use Javascript for more than just everyday form validation etc then I personally think understanding OO principles is important.
With Javascript being such a flexible language I would reccommend reading up on discipline and approaches to coding Javascript, not just the syntaxy stuff.
This book Pro Javascript design patterns should help there.
You're halfway there already with Douglas Crockford, but there are plenty of others writing great articles on the web.
UPDATED: I'm finding that over and above most languanges and tech there is a real buzz about Javascript right now and it's difficult to keep up with new stuff so I tend to check out relevant news sites like Ajaxian for posts with content linking to good authors for up to to date advances with libraries, frameworks and the like.
I recently visited the fullfrontal09 Javascript conference, all the speakers there gave excellent talks on Javascript so read anything they have written!
Read up on Closures and Scope, sugaring and currying! Robert Nyman's slides from FullFontal09 should get you started
If you can stomach the tone of some of the regulars, the comp.lang.javascript newsgroup is an excellent resource. I have learned a great deal there.
Regarding design patterns, there is a book called "Pro JavaScript Design Patterns" by Ross Harmes and Dustin Diaz, although having read it I wouldn't recommend several of the practices it suggests.
Make sure to also have a look at free web toolkits that are available, such as: Google Web Toolkit and Dojo or Jquery. These will help your application development efforts go much faster.
Also check out the Javascript tutorials at: http://www.w3schools.com/ajax/ajax_intro.asp
Hope that helps. :)
Apart from books, i would say start hacking the existing JS libraries (like amazing JQuery). Its a better way to look around the power of javascript..
Lynda.com has an introduction to jQuery (and other Javascript classes). It provides a decent introduction as you go deeper and read the excellent books already recommended.
Here's the link: http://www.lynda.com/home/DisplayCourse.aspx?lpk2=48370
This was only published recently (8th Dec.) but I've already found it extremely useful as a refresher of common JS practices.
http://stevej.name/js_executable_guide.html
精彩评论