Home Company Services Experience Process Articles FAQs Contact Us

Software Design Principles


1.      Object-oriented Design Principles

The Open Closed Principle (OCP)

A module should be open for extension but closed for modification. It is essentially saying that, a module or an object shall be encapsulated, interface and implementation shall be separated, or programming against interface not implementation.

The Liskov Substitution Principle (LSP)

Subclasses should be substitutable for their base classes. It is essentially saying that subclass must have all the exact behaviors of the base class.

The Dependency Inversion Principle (DIP)

Depend upon abstractions not upon concretions. It is essentially saying that we shall program against interfaces not implementations, and use interface to define a variable.

The Interface Segregation Principle (ISP)

Many client specific interfaces are better than one general purpose interface. It is essentially saying that don’t put interfaces belong to different clients into one interface class. On the contrary, define one interface class for each client. If the system uses the façade pattern, the façade class shall provide handles to those client specific interfaces, rather than provide the functions directly.

2.      The Package Design Principles

The Release Reuse Equivalency Principle (REP)

The granule of reuse is the granule of release.

The Common Closure Principle (CCP)

Classes that change together belong together.

The Common Reuse Principle (CRP)

Classes that are not reused together should not be grouped together.

The Acyclic Dependencies Principle (ADP)

The dependencies between packages must not form cycles.


Jerry Zhong, February 2000.