At the start the trainer presented the overriding tenet for Spring as an acronym: "DRY SOCs". That is, Don't Repeat Yourself and Separation of Concerns.
That got me thinking about the acronyms/tenets that I've embraced. Here are a few:
- DTI - Design To Interfaces
- LCSC - Loose Coupling / Strong Cohesion
- FCOI - Favor Composition Over Inheritance
- SUFC - Separate Use From Construction
- TWVAEI - Take What Varies And Encapsulate It
- DOD - Do Or Delegate - A class/method should either do work or delegate work to others. When it does both it's less cohesive and harder to understand and test. Also know as the Sargent/Private principle: either give orders or take orders.
- LYTOP - Limit Yourself To One Perspective - A class/method should operate at either the conceptual or implementation level. Comprehension is easier when you don't have to move between the perspectives.