Thursday, October 25, 2007

Principles of Object Oriented Design

http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf

Do u know about Viscosity? Higher viscosity means that it is easy for someone to implement hacks in the software than to do things that are right as per design.

The Open Closed Principle (OCP)
A module should be open for extension but closed for modification.

The Liskov Substitution Principle (LSP)
Subclasses should be substitutable for their base classes.

The Dependency Inversion Principle (DIP)
Depend upon Abstractions. Do not depend upon concretions.

The Interface Segregation Principle (ISP)
Many client specific interfaces are better than one general purpose interface

Principles of Package Architecture

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 aren’t reused together should not be grouped together.

The Package Coupling Principles.

The Acyclic Dependencies Principle (ADP)
The dependencies betwen packages must not form cycles.

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

The Stable Abstractions Principle (SAP)
Stable packages should be abstract packages.

No comments: