Free webook, "Learning JavaScript Design Patterns" (168 pages)
Bram.us - JavaScript Design Patterns – An Updated Free Book For Developers
Over the past year or so I’ve been actively trying to encourage more developers to invest time in learning about the benefits of design patterns and how they can be applied to JavaScript. To help with this, I wrote a book on the topic which I released for free.
Learning JavaScript Design Patterns →
Learning JavaScript Design Patterns (GitHub) →
Learning JavaScript Design Patterns
Contents
- Introduction
- What is a Pattern?
- 'Pattern'-ity Testing, Proto-Patterns & The Rule Of Three
- The Structure Of A Design Pattern
- Writing Design Patterns
- Anti-Patterns
- Categories Of Design Pattern
- An Introduction To Design Patterns
- Patterns In Greater Detail
- Examples Of Design Patterns In jQuery
- Modular JavaScript Design Patterns
- Bonus: jQuery Plugin Design Patterns
- Conclusions
- References
At the beginning of this book I will be focusing on a discussion about the importance and history of design patterns in any programming language. If you're already sold on or are familiar with this history, feel free to skip to the chapter 'What is a Pattern?' to continue reading.
One of the most important aspects of writing maintainable code is being able to notice the recurring themes in that code and optimize them. This is an area where knowledge of design patterns can prove invaluable.
Design patterns can be traced back to the early work of a civil engineer named Christopher Alexander. He would often write publications about his experience in solving design issues and how they related to buildings and towns. One day, it occurred to Alexander that when used time and time again, certain design constructs lead to a desired optimal effect.
In collaboration with Sarah Ishikawra and Murray Silverstein, Alexander produced a pattern language that would help empower anyone wishing to design and build at any scale. This was published back in 1977 in a paper titled 'A Pattern Language', which was later released as a complete hardcover book.
Some 30 years ago, software engineers began to incorporate the principles Alexander had written about into the first documentation about design patterns, which was to be a guide for novice developers looking to improve their coding skills. It's important to note that the concepts behind design patterns have actually been around in the programming industry more than likely since its inception, albeit in a less formalized form.
One of the first and arguably most iconic formal works published on design patterns in software engineering was a book in 1995 called 'Design Patterns: Elements Of Reusable Object-Oriented Software'. This was written by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides - a group that became known as the Gang of Four (or GoF for short).
The GoF's publication is considered quite instrumental to pushing the concept of design patterns further in our field as it describes a number of development techniques and pitfalls as well as providing twenty-three core Object-Oriented design patterns frequently used around the world today. We will be covering these patterns in more detail in the section ‘Categories of Design Patterns’.
In this book, we will take a look at a number of popular JavaScript design patterns and explore why certain patterns may be more suitable for your projects than others. Remember that patterns can be applied not just to vanilla JavaScript, but also to abstracted libraries such as jQuery or Dojo as well. Before we begin, let’s look at the exact definition of a ‘pattern’ in software design.
..."
Looking to take your JavaScript development to the next level? Then take a level headed look at this free webook...
No comments:
Post a Comment