Maxim Hierarchy
From CSSEMediaWiki
Revision as of 05:06, 28 September 2009 by BenMcDonald (Talk | contribs)
This is an attempt to categorise maxims.
Contents |
Design & Implementation
All those maxims related to the system itself.
Separate and group system parts rationally
Class & Package Level
This is a rather large block... are there any overarching rules that can group these components...
Data & Behaviour
- Avoid downcasting
- Common reuse principle
- Model the real world
- Avoid equals
- Behavioral completeness
- Single responsibility principle
- Separation of concerns
- Dependency injection
- Encapsulate that which varies - Could be Hide Stuff
- Encapsulation is hierarchical - Could be Hide Stuff
- Encapsulation boundary - Could be Hide Stuff
- Interface segregation principle
- One responsibility rule
- Stable dependencies principle - ?
Hide Stuff
- Fat interfaces
- Hide your decisions
- Information hiding
- Tell, Don't Ask
- Program to the interface not the implementation
Inheritance
- Dependency inversion principle
- Favor composition over inheritance
- Avoid inheritance for implementation
- Don't burn your base class
- Law of leaky abstractions
- Liskov substitution principle
- No concrete base classes
- Stable abstractions principle
- Open closed principle - ?
- Design by contract - The placement of this maxim is difficult...
Mutability
- Don't expose mutable attributes
- Getters and setters
- Keep accessors and mutators separate
- Command query separation
- Avoid side effects
Avoid unnecessary complexity
Reuse
Do only what is necessary
- Do the simplest thing that could possibly work
- You ain't gonna need it
- Premature optimization
- Keep it simple
- Establishing priorities
Readable Code is Good Code
Group Stuff To Reduce Complexity
Minimise connections
Process & Organisation
All the maxims related to the development processes and management of the development team.