Compare commits

...

2 Commits

Author SHA1 Message Date
simonsan 3719748cfe
style: dprint fmt 1 month ago
simonsan 1030dd2699
Add CRP (Composition over Inheritance) to design principles 1 month ago

@ -22,6 +22,13 @@
- [Dependency Inversion Principle (DIP)](https://en.wikipedia.org/wiki/Dependency_inversion_principle):
One should "depend upon abstractions, [not] concretions."
## [CRP (Composite Reuse Principle) or Composition over inheritance](https://en.wikipedia.org/wiki/Composition_over_inheritance)
“a the principle that classes should favor polymorphic behavior and code reuse
by their composition (by containing instances of other classes that implement
the desired functionality) over inheritance from a base or parent class” -
Knoernschild, Kirk (2002). Java Design - Objects, UML, and Process
## [DRY (Dont Repeat Yourself)](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself)
"Every piece of knowledge must have a single, unambiguous, authoritative

Loading…
Cancel
Save