Blog Logo
TAGS

Object Calisthenics: Principles for Better Object-Oriented Code

Ready to up your coding game? Object Calisthenics will help you create code that is cleaner, more flexible, more agile, and more reusable. Object Calisthenics were first introduced by Jeff Bay in The ThoughtWorks Anthology, a compilation of essays on software engineering. The primary objective of Object Calisthenics is to apply certain SOLID principles. SOLID principles are basically a set of best practices to increase the quality of your code by focusing on maintainability, readability, testability, and comprehensibility. The main purpose of Object Calisthenics is to make designs easier to understand, maintain, and extend. This JSON structure also includes a list of principles which are: 1) Only One Level of Indentation Per Method 2) Dont Use the ELSE Keyword 3) Wrap All Primitives and Strings 4) Use only one dot per line 5) Dont abbreviate 6) Keep all entities small 7) Dont use any classes with more than two instance variables 8) Use first-class collections 9) Dont use any getters/setters/properties.