几个简单易行的原则
class design principles
SOLID(wiki, article): SRP, OCP, LSP, ISP, DIP.
SRP(wiki, pdf): Single responsibility principle. A class should have one, and only one, reason to change.
OCP(wiki, pdf): Open/closed principle. You should be able to extend a classes behavior, without modifying it.
LSP(wiki, pdf): Liskov substitution principle. Derived classes must be substitutable for their base classes.
ISP(wiki, pdf): Interface segregation principle. Make fine grained interfaces that are client specific.
DIP(wiki, pdf): Dependency inversion principle. Depend on abstractions, not on concretions.
package cohesion principles
REP(pdf): The Release Reuse Equivalency Principle. The granule of reuse is the granule of release.
CCP(pdf): The Common Closure Principle. Classes that change together are packaged together.
CRP(pdf): The Common Reuse Principle. Classes that are used together are packaged together.
packages coupling principles
ADP(pdf): The Acyclic Dependencies Principle. The dependency graph of packages must have no cycles.
SDP(pdf): The Stable Dependencies Principle. Depend in the direction of stability.
SAP(pdf): The Stable Abstractions Principle. Abstractness increases with stability.
架构原则
GRASP. wiki
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。