Architecture principles
Principles
Law of Demetr (LOD)
Base postulates
Every unit should have limited knowledge about other units: only "closely" related to the current unit
Each unit should only talk to its friends; don't talk to stangers
Only talk to your immediate friends
Links
Wiki (en): https://en.wikipedia.org/wiki/Law_of_Demeter
Why its needed (ru): https://toster.ru/q/44822
Pros
Lower dependencies between classes
Safer code change
Potentialy lower Response for Class (RFC) Metric
Cons
Wrappers time & space overhead
Layer architecture is an implementation of LOD
Design Patters
Chain of responsibility
Relay messages
Command
Metrics
What is metrics: https://msdn.microsoft.com/en-us/library/bb385914.aspx
Metrics types
Response for Class (RFC)
inokation complexity on message
lower RFC - lower bugs
Weighted Methods per Class (WMC)
Sum of complexity of all class methods