Lets learn "Software design patterns"
In this tutorial, we'll be learning about the introduction of software design patterns and different design patterns that are being followed while writing the code. This would be an introductory tutorial we'll go in detail about all design patterns in detail in other tutorials.
Introduction
So whenever we are writing any application code, there are many ways to achieve the same behavior but sometimes we write a code in a way that whenever a new requirement comes it becomes difficult to extend the existing code but to rewrite everything. That's when design patterns would are helpful.
Design patterns are the coding patterns that are adapted over time by experienced object-oriented developers. So such patterns are already tested. Code written with such patterns is scalable, readable, and extendable. So it's helpful for any developer to use the correct design pattern to write a code in a way that is scalable, readable, and maintainable.
Types of design patterns
There are three types of design patterns
- Creational: These types of design patterns are related to object creation and class instantiation. These can be further categorized as object creational patterns and class creational patterns. Examples of creational design patterns are the Factory method, Abstract Factory, Builder, Singleton, Object pool, and prototype.
- Structural: These types of design patterns include organizing different classes and objects to form larger structures and provide new functionality. Examples of structural patterns are Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Private class data, and proxy.
- Behavioral: Behavioral pattern is for communication patterns between objects. Examples of behavioral patterns are a Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Observer, Strategy, Visitor, etc.
Some popular design patterns
We'll cover these in detail in separate tutorials.
- Factory method
- Observer pattern
- Singleton design pattern
- Decorator pattern
- Strategy pattern
- Adapter pattern
- Command pattern
- Iterator pattern
- Curiously recurring template pattern
- Flyweight design pattern
- Facade design pattern
- Proxy design pattern
- Composite design pattern
- Prototype design pattern
- Abstract design pattern
- Bridge design pattern
- Template method design pattern
- Builder design pattern
- Chain of possibility design pattern
HOPE YOU LIKE THIS TUTORIAL. FEEL FREE TO COMMENT BELOW IF YOU HAVE ANY DOUBTS. AND STAY TUNED FOR MORE TUTORIAL :)
Comments
Post a Comment