Types of Design Patterns
This lesson will introduce the types of design patterns such as creational, structural, behavioral, and architectural design patterns.
We'll cover the following
In the previous lesson, you learned about what design patterns are. Now we’ll look at some popular design patterns in JavaScript. These include the following:
Creational design patterns
These patterns are used to provide a mechanism for creating objects in a specific situation without revealing the creation method. The normal approach for creating an object might lead to complexities in the design of a project. These patterns allow flexibility in deciding which objects need to be created for a specific use case by providing control over the creation process.
Let’s look at the patterns that fall under this category.
We will be practicing all of these creational patterns in this course.
Structural design patterns
These patterns concern class/object composition and relationships between objects. They allow adding new functionalities to objects such that restructuring some parts of the system does not affect the rest. Hence, when some parts of structure change, the entire system does not need to change.
Let’s look at the patterns that fall under this category.
We will be practicing all of these structural patterns in this course.
Behavioral design patterns
These patterns are concerned with communication between dissimilar objects in a system. They streamline the communication and make sure that the information is synchronized between such objects.
Let’s look at the patterns that fall under this category.
We will be practicing some of these behavioral patterns in this course.
Architectural design patterns
These patterns are used for solving architectural problems within a given context in software architecture.
Let’s look at the patterns that fall under this category.
We will be practicing all of these architectural patterns in this course.
As discussed, design patterns play a major role in the structuring of an application; hence, being of great use to a JavaScript developer. This course is designed to help you practice some of these patterns so you can confidently answer any questions related to them in an interview and be able to implement them at your job.
In the next chapter, you’ll find details for the creational design patterns followed by some challenges and quizzes.