Last active
December 12, 2015 05:08
-
-
Save phosphene/4719380 to your computer and use it in GitHub Desktop.
Law of Parsimony in Practical Object-Oriented Design
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Occam's Razor or Lex Parsimoniae or the Law of Parsimony | |
"It is vain to do with more what can be done with fewer" | |
It is an heuristic for design; it is not a golden hammer. | |
applying the razor to SOLID: | |
We get: Cohesive responsibility, cohesion, object coherence, or single responsibility. | |
Design in the simplest sense here is domain modeling through classes that are: | |
cohesive units that are as independent as possible or SRP without entanglement. | |
applying the razor to OOD: favor composition over inheritance. | |
Practical Object-Oriented Design is focused on behavior, on messages, not on Data. | |
In Rails that means: You should be focused on modeling behavior and not on the Data Model | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment