Successfully reported this slideshow.
Your SlideShare is downloading. ×

Object Calisthenics; Practices for Writing Object-Oriented C#

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 17 Ad

Object Calisthenics; Practices for Writing Object-Oriented C#

Download to read offline

According to Wikipedia, Calisthenics are a form of exercise consisting of a variety of simple, often rhythmical, movements, generally without using equipment or apparatus. Since programming without Visual Studio is going to be a bit challenging you can define Object Calisthenics as a programming exercise that uses simple rules to motivate you to take an object-oriented approach to programming. As an experienced developer practicing Test Driven Development I was a bit sceptical of whether I really needed those rules to be a better programmer. But to my surprise those little rules really reinforced my beliefs about building high-quality software using the principles of object-orientation, SOLID and Clean Code. So what are those rules? I won’t tell you…yet. Just come to my session and I’ll let you in on my secrets….

According to Wikipedia, Calisthenics are a form of exercise consisting of a variety of simple, often rhythmical, movements, generally without using equipment or apparatus. Since programming without Visual Studio is going to be a bit challenging you can define Object Calisthenics as a programming exercise that uses simple rules to motivate you to take an object-oriented approach to programming. As an experienced developer practicing Test Driven Development I was a bit sceptical of whether I really needed those rules to be a better programmer. But to my surprise those little rules really reinforced my beliefs about building high-quality software using the principles of object-orientation, SOLID and Clean Code. So what are those rules? I won’t tell you…yet. Just come to my session and I’ll let you in on my secrets….

Advertisement
Advertisement

More Related Content

More from Dennis Doomen (20)

Recently uploaded (20)

Advertisement

Object Calisthenics; Practices for Writing Object-Oriented C#

  1. 1. #comdaybe Object Calisthenics Practices for Writing Object-Oriented Aviva Solutions Dennis Doomen
  2. 2. Object…what? Object Calisthenics Object..ˌka-ləs-ˈthe-niks
  3. 3. Like this?
  4. 4. “…9 rules of thumb that will help push your code into good object-oriented shape...” Jeff Bay
  5. 5. So who am I? Principal Consultant Aviva Solutions Fluent Assertions C# Coding Guidelines @ddoomen TDD, DDD, BDD Application Lifecycle Management Agile XP www.dennisdoomen.net
  6. 6. demo One level of indentation per method Rule 1
  7. 7. demo One dot per line Don’t use the else keyword Rules 2 & 5
  8. 8. demo Wrap all primitives and strings …a.k.a. first-class types Rule 3
  9. 9. demo First-class collections Rule 4
  10. 10. Choose names carefully …not too short …and…not too long …contextual Rule 6
  11. 11. Keep all classes small …a.k.a. Single Responsibility Principle Rule 7
  12. 12. No more than two instance variables Rule 8
  13. 13. demo No properties Rule 9
  14. 14. demo …no protected properties …test data builders …more refactoring Final result
  15. 15. Q&A
  16. 16. Resources • Example Code (original by Johan Martinsson) • Object Calisthenics (by Jeff Bay) • C# Coding Guidelines (by me) • www.dennisdoomen.net (by me…again ) • Agile Principles, Patterns, and Practices in C# (by Uncle Bob)
  17. 17. Thank you! Object Calisthenatics

×