Visual Object Calisthenics
I've made a visual representation of Object Calisthenics by Jeff Bay. There's also a nice write-up about it by Willian Durand.
Here's the 9 rules:
- Only one level of indentation per method
- Don't use the
else
keyword - Wrap all primitives and Strings
- First class collections
- One dot per line
- Don't abbreviate
- Keep all entities small
- No classes with more than two instance variables
- No getters/setters/properties
I also made a pdf for easy printing.
Published in Nov 27, 2016