This is my attempt at executing the Object Calisthenics exercise in JavaScript as described by Jeff Bay in this PDF, originally from the ThoughtWorks Anthology on Pragmatic Programmers:
PDF: http://www.bennadel.com/resources/uploads/2012/ObjectCalisthenics.pdf
ThoughtWorks Anthology: http://www.pragprog.com/titles/twa/thoughtworks-anthology
Object Calisthenics outlines 9 basic rules to apply when performing the exercise:
- One level of indentation per method.
- Don't use the ELSE keyword.
- Wrap all primitives and Strings in classes.
- First class collections.
- One dot per line.
- Don't abbreviate.
- Keep all classes less than 50 lines.
- No classes with more than two instance variables.
- No getters or setters.
More to come soon!
I wanted to give a special thanks to Brian Kotek who originally introduced me to this exercise:
http://www.briankotek.com/blog/index.cfm/2009/2/11/Taking-the-Object-Calisthenics-Challenge