星期六, 十月 07, 2006

Design Principles : Single-Responsiblity Principle

SRP - Single-Responsibility Principle

A class should have only one reason to change.

Why?

If class have more than one reason , then there will be more than one reason to change.

An axis of change is an axis of change only if the changes actually occur. It is not wise to apply the SRP , or any other principle for that matter , if there is no symptom.

没有评论: