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
  1. 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. 
  2. 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.
  3. 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.
  1. Factory method
  2. Observer pattern
  3. Singleton design pattern
  4. Decorator pattern
  5. Strategy pattern
  6. Adapter pattern
  7. Command pattern
  8. Iterator pattern
  9. Curiously recurring template pattern
  10. Flyweight design pattern
  11. Facade design pattern
  12. Proxy design pattern
  13. Composite design pattern
  14. Prototype design pattern
  15. Abstract design pattern
  16. Bridge design pattern
  17. Template method design pattern
  18. Builder design pattern
  19. 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

Popular posts from this blog

Lets learn "About kube proxy in iptables mode"

Lets learn "System design for paste bin (or any text sharing website)"

Lets learn "Factory design pattern"