Open anitsh opened 4 years ago
In the software engineering, design principle and design pattern are not the same.
Design Principle
It provides high level guide lines to design better software applications. Design principles do not provide implementation and are not bound to any programming language.
For example, in SOLID (SRP, OCP, LSP, ISP, DIP) principles, Single Responsibility Principle (SRP) suggests that a class should have only one and one reason to change. This is high level statement which we can keep in mind while designing or creating classes for our application. SRP does not provide specific implementation steps but it's on you how you implement SRP in your application.
Design Pattern
It provides low level solution (implementation) for the commonly occurring Object Oriented
problems. In another word, design pattern suggest specific implementation for the specific object oriented programming problem.
For example, if you want create a class that can only have one object at a time, then you can use Singleton Design Pattern
which suggests the best way to create a class that can only have one object.
Gang of Four patterns: Abstract Factory, Factory, Singleton, Command etc.
Architectural pattern: Concerned with the subsystems of an application with their relationships and collaborations with each other.
Design pattern: Concerned with the (further small) components of a subsystem with their relationships and collaborations with each other.