Coding Light Wiki

SOLID Principles

Modified: March 22, 2010 12:38 PM by DavidMorton - Categorized as: Architecture, Best Practices, Fundamentals, Object Oriented Programming
The SOLID principles are best outlined by Bob Martin on his website, and serve as the basis of Object Oriented Design. The SOLID principles are most concerned with dependency management, or the ability to keep code loosely coupled and flexible.

SOLID is a programming fundamental.

Edit

Class Design Principles

SRP - The Single Responsibility Principle - A class should have one, and only one, reason to change

OCP - The Open Closed Principle - You should be able to extend a classes behavior, without modifying it.

LSP - The Liskov Substitution Principle - Derived classes must be substitutable for their base classes.

ISP - The Interface Segregation Principle - Make fine grained interfaces that are client specific.

DIP - The Dependency Inversion Principle - Depend on abstractions, not on concretions.

Edit

Package Design Principles

Edit

Cohesion

REP - The Release Reuse Equivalency Principle - The granule of reuse is the granule of release.

CCP - The Common Closure Principle - Classes that change together are packaged together.

CRP - The Common Reuse Principle - Classes that are used together are packaged together.

Edit

Coupling

ADP - The Acyclic Dependencies Principle - The dependency graph of packages must have no cycles.

SDP - The Stable Dependencies Principle - Depend in the direction of stability.

SAP - The Stable Abstractions Principle - Abstractness increases with stability.

ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.