Saturday, November 12, 2011

OODesign - Design Pattern 1 (Principles)

Ref: http://www.oodesign.com/design-principles.html

Principles:
3 important characteristics of a bad design that should be avoided
1. Rigidity
2. Fragility
3. Immobility

Open Close Principle
classes, modules and functions should be open for extension but closed for modifications

Dependency Inversion Principle
High-level modules should not depend on low-level modules. Both should depend on abstractions.
Abstractions should not depend on details. Details should depend on abstractions.

Interface Segregation Principle
Clients should not be forced to depend upon interfaces that they don't use.

Single Responsibility Principle
A class should have only one reason to change.

Liskov's Substitution Principle
Derived types must be completely substitutable for their base types.

No comments:

Post a Comment