Design patterns are simply solutions to problems that experienced software engineers encounter during the development of a software product. They provide a general best practice approach to problems that have been solved by try and error from renowned software engineers. Design patterns are good and helps software engineers keep their project organized. Maintaining software projects is very hard and it is very important we follow some set of rules to keep our code readable, reusable and easily maintainable.
In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software
which initiated the concept of Design Patterns in Software development.
These authors are collectively known as Gang of Four (GOF)
.
Design patterns can be grouped into three main categories. There are a lot of design patterns currently been used but all these patterns fall under one of these three categories.
- Behavioral Patterns
- Structural Patterns
- Creational Patterns
This repo contains a lot of code examples for design patterns in javascript and typescript. I have organized them into different folders covering different topics with relevant examples. You can access any of the links below to learn by looking at the code example. Feel free to contribute by creating a pr and sending me an email at manteycaleb@gmail.com