Skip to main content

Posts

Showing posts with the label software architecture

SOLID Principles in Software Development

  The SOLID principle was introduced by Robert C. Martin, also known as Uncle Bob and it is a coding standard in programming. This principle is an acronym of the five principles which is given below- Single Responsibility Principle (SRP) Open/Closed Principle Liskov’s Substitution Principle (LSP) Interface Segregation Principle (ISP) Dependency Inversion Principle (DIP) Single Responsibility Principle:  A class should have only one reason to change This  means every class should have a single responsibility or purpose. The class shall be updated only when a the behavior for this single responsibility changes. For E.g. If a class is responsible for login logic, then that is all it should do. Any other similar functionalities like Registration or Change Password should be implemented separately. As such, only when a change is required in Login logic will cause the class to be updated. If we keep updating a class for adding features which are not related to a single purpose, it makes the