Tuesday, September 15, 2015

Principles of Programming

S.O.L.I.D. Principles


  • SRP: The Single Responsibility Principle(SRP) states that each class, module in application should change only for a single reason.
  • OCP: Open/Closed Principle (OCP) states that software entities (classes, modules, functions, etc.)  should be open for extension but closed for modification. A class's behaviour should be extendible without modifying its behaviour.
  • LSP: Liskov Substitution Principle states that  Derived types must be substitutable for their base types.
  • ISP: Interface Segregation Principle (ISP) states that Clients should not be forced to depend upon interfaces  that they don’t use. 
  • DIP: Dependency Inversion Principle(DIP) states that a. Abstraction - High level modules should not depend upon low level modules, both should depend upon abstractions. b. Ownership - Low level implementation should depend on high level concepts.


No comments: