anitsh / til

Today I Learn (til) - Github `Issues` used as daily learning management system for taking notes and storing resource links.
https://anitshrestha.com.np
MIT License
77 stars 11 forks source link

Understanding The Differences In Software Design, Principles and Architecture #209

Open anitsh opened 4 years ago

anitsh commented 4 years ago

Resources:

anitsh commented 4 years ago

Difference between Design Principle, Design Pattern And Architecture

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.

Difference between Architecture Pattern and Design Pattern

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.