These are my personal notes from the book Learning JavaScript Design Patterns by Addy Osmani.
- Chapter 1. Introduction
- Chapter 2. What is a Pattern?
- Chapter 3. "Pattern"-ity Testing, Proto-Patterns & The Rule Of Three
- Chapter 4. The Structure Of A Design Pattern
- Chapter 5. Writing Design Patterns
- Chapter 6. Anti-Patterns
- Chapter 7. Categories Of Design Pattern
- Chapter 8. Summary Table Of Design Pattern Categorization
- Chapter 9. JavaScript Design Patterns
- Chapter 10. JavaScript MV* Patterns
- Chapter 11. Modern Modular JavaScript Design Patterns
- Chapter 12. Design Patterns In jQuery
- Chapter 13. jQuery Plugin Design Patterns
- Chapter 14. JavaScript Namespacing Patterns
Due to self-learning purposes, I have added tests for the code snippets to facilitate my comprehension of what they do. It's easier an better than using console.log
all over the place.
This is a technique I learned from the book Test-Driven JavaScript Development by Christian Johansen, Chapter 4. Test to learn.
Install Mocha.js globally
npm install -g mocha
Run the tests:
npm run test