read_notes

1. Separation of Concerns

Separation of Concerns(Soc): In computer science, separation of concerns(SoC) is the process of breaking a computer program into distinct features that overlap in functionality as little as possible.

 

2. MSDN - Patterns In Practice: The Open Close Principle Jeremy Miller

Open Close Principle: software entities should be open for extension but closed for modification.

single Responsibility Priciple: a class should have one, and only one, reason to change.

The Chain of Responsibility Pattern:

Double Dispath:

Model View Presenter(MVP) pattern, Application Controller patter

Liskov Substitution Principle: If you can use any implementation of an abstraction in any place that accepts that abstraction.

Just remember, the Open Closed Principle is only realized by polymorphism if a class only depends on the public contract of the other calsses it interacts with. If a class that uses an abstraction has to downcast to a specific subclass in one section, you're not following the Open Closed Principle.

 

3. Information hiding

Information hiding in computer science is the principle of hiding of design decisions in a computer program that are most likely to change, thus protecting other parts of the program from change if the design decision is changed.

 

4. TDD Design Starter Kit - Responsibilities, Cohesion, and Coupling

Cohesion - A measure of whether a class has a well defined, meaningful responsibility. High cohesion is desirable. If a class contains unrelated functions or responsibilities, it is not cohesive.

Coupling - More or less, how entangled or dependent a class is with other classes. A loosely coupled desin implies that classes or subsystems can largely be modified independently of one another.

 

 

 

posted on 2008-12-14 23:32  zhaorui  阅读(221)  评论(0编辑  收藏  举报

导航