Version 3 (modified by clange, 4 years ago)

one more link

Tools

* JSLint, a code validator

References

Harmes, Diaz: Pro JavaScript Design Patterns

 homepage of the book

Chapters from a JOBAD point of view:

  1. Expressive JavaScript: the basics for high-level programming in JS, a must-read
  2. Interfaces: something you know from object-oriented language and that will be useful for the design of a library. They describe how to do it in JS.
  3. Encapsulation and Information Hiding: another basic object-oriented concept
  4. Inheritance: same. There are several ways of doing it in JS.
  5. The Singleton Pattern: may be needed for certain global JOBAD objects, e.g. the document-wide event handler
  6. Chaining: is provided by jQuery, AFAIK, but this chapter is helpful for understanding it. Note that the book is quite generic; it doesn't mention jQuery explicitly.
  7. The Factory Pattern: There is an Ajax-related example of a factory for XmlHttpRequest objects, which may be useful.
  8. The Bridge Pattern: Not sure whether we need this
  9. The Composite pattern: Not sure either
  10. The Facade Pattern: May be useful when integrating functionality from existing libraries, e.g. JavaScript standard functionality like DOM, or jQuery, and providing convenience functions.
  11. The Adapter Pattern: They have sample code related to library integration
  12. The Decorator Pattern: Not sure about this
  13. The Flyweight Pattern: Not sure either
  14. The Proxy Pattern: Not sure either
  15. The Observer Pattern: Not sure either
  16. The Command Pattern: seems quite useful to me for implementing the commands behind menu items, buttons, and any other GUI elements in a uniform way.
  17. The Chain of Responsibility Pattern: Not sure about this

Other