What are the best resources on Design Patterns catering specifically to web development with JavaScript and JQuery?
I'm particularly interested in information on programming my own libraries, reusable ponents, widgets, etc. and the merits of various techniques (for instance in the case of ponents/widgets paring those employed in jQuery UI vs. rolling your own).
I'm also curious about the intricacies of JavaScript as a programming language, and the finer points of object-based programming with JavaScript.
Big fan of Douglas Crockford and the Yahoo video series. Looking for additional examples.
What are the best resources on Design Patterns catering specifically to web development with JavaScript and JQuery?
I'm particularly interested in information on programming my own libraries, reusable ponents, widgets, etc. and the merits of various techniques (for instance in the case of ponents/widgets paring those employed in jQuery UI vs. rolling your own).
I'm also curious about the intricacies of JavaScript as a programming language, and the finer points of object-based programming with JavaScript.
Big fan of Douglas Crockford and the Yahoo video series. Looking for additional examples.
Share Improve this question edited Feb 25, 2010 at 17:04 Pointy 414k62 gold badges594 silver badges626 bronze badges asked Feb 25, 2010 at 17:04 jverdijverdi 1,50613 silver badges14 bronze badges 2- This could provoke a silly flame war so it might get closed; tagged as "subjective" to stave that off, possibly. – Pointy Commented Feb 25, 2010 at 17:05
- 1 I'd say get one of John Resig's books (Pro JS techniques and Secrets of a JS Ninja). He wrote JQuery. He addresses techniques for developers interested in creating their own libraries. Douglas Crockford also has a small (but condensed) book titled "Javascript: the good parts". It's dedicated to js the language, not the DOM. He makes some remendations as to which techniques to adopt and which other to thoroughly avoid (the bad parts). – Michael Ekoka Commented Feb 28, 2010 at 19:45
4 Answers
Reset to default 6One very instructional thing you might do is read over the jQuery source code. It's a treasure-trove of interesting and efficient coding techniques. You might then broaden your horizons by reading over the source for Prototype or some other library.
The nice thing about reading good code and trying to understand it is that it's really real; it is the good code, so you bypass a layer of rhetoric.
Similar to Pointy's answer, you should take a look at these two videos, which help you understand the source code of JQuery (it might be difficult for some to dive into the code from start to finish):
- 10 things I learned from the jquery source
- 11 more things I learned from the jquery source
Paul Irish, a member of the JQuery team, goes through some very interesting design patterns in the JQuery source in a humorous way. I think he picks some really interesting spots, which really gives you a lot of usable knowledge you can use elsewhere.
It's probably the resource that has given me the most knowledge about a particular field in the shortest time. It's just really valuable.
This guy has some really good stuff as far as the "intricacies of JavaScript as a programming language" part of your question is concerned:
http://devlicio.us/blogs/sergio_pereira/default.aspx
e.g. http://devlicio.us/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx
The p.lang.javascript group on Usenet is an excellent resource: pretty much everything related to browser scripting has been discussed there and is available in the archive, and some of the regulars, while not always the most polite, are incredibly knowledgeable.