Jeremy Miller : Cohesion And Coupling
Zajímavý článek od Jeremy Millera Cohesion And Coupling vyšel již před časem v MSDN Magazine.
Obsah
- Decrease Coupling
- Increase
Cohesion
- Eliminate Inappropriate Intimacy
- The Law of Demeter
- Tell,
Don't Ask
- Say It Once and Only Once
- Wrapping Up
Základní principy
- Keep things that have to change together as close together in the code as
possible.
- Allow unrelated things in the code to change independently (also known as
orthogonality).
- Minimize duplication in the code.