Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs

Tuesday, August 23, 2011

The SOLID Principles :: BlackWasp Software Development

The SOLID Principles :: BlackWasp Software Development


The SOLID Principles
This is the first article in a series of six that describe the SOLID principles of object-oriented design and programming. The SOLID principles provide five guidelines that, when followed, can dramatically enhance the maintainability of software.

Single Responsibility Principle
The second article in the SOLID Principles series describes the Single Responsibility Principle (SRP). The SRP states that each class or similar unit of code should have one responsibility only and, therefore, only one reason to change.

Open / Closed Principle
The third article in the SOLID Principles series describes the Open / Closed Principle (OCP). The OCP states that all classes and similar units of source code should be open for extension but closed for modification.

Liskov Substitution Principle
The fourth article in the SOLID Principles series describes the Liskov Substitution Principle (LSP). The LSP specifies that functions that use pointers of references to base classes must be able to use objects of derived classes without knowing it.

Interface Segregation Principle
The fifth article in the SOLID Principles series describes the Interface Segregation Principle (ISP). The ISP specifies that clients should not be forced to depend upon interfaces that they do not use. Instead, those interfaces should be minimised.

Dependency Inversion Principle
The sixth and final article in the SOLID Principles series describes the Dependency Inversion Principle (DIP). The DIP states that high level modules should not depend upon low level modules and that abstractions should not depend upon details.


No comments:

Post a Comment