Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Object Calisthenics; Practices for Writing Object-Oriented C#

3,609 views

Published on

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….

Published in: Technology
  • These are one of the best companies for review articles. High quality with cheap rates. ⇒⇒⇒WRITE-MY-PAPER.net ⇐⇐⇐ I highly recommend it :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • My personal experience with research paper writing services was highly positive. I sent a request to ⇒ www.HelpWriting.net ⇐ and found a writer within a few minutes. Because I had to move house and I literally didn’t have any time to sit on a computer for many hours every evening. Thankfully, the writer I chose followed my instructions to the letter. I know we can all write essays ourselves. For those in the same situation I was in, I recommend ⇒ www.HelpWriting.net ⇐.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello! I can recommend a site that has helped me. It's called ⇒ www.WritePaper.info ⇐ They helped me for writing my quality research paper.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Object Calisthenics; Practices for Writing Object-Oriented C#

  1. 1. #comdaybeObject CalisthenicsPractices for Writing Object-OrientedAviva SolutionsDennis Doomen
  2. 2. Object…what?Object CalisthenicsObject..ˌka-ləs-ˈthe-niks
  3. 3. Like this?
  4. 4. “…9 rules of thumb that will help pushyour code into good object-orientedshape...”Jeff Bay
  5. 5. So who am I?Principal ConsultantAviva SolutionsFluent AssertionsC# CodingGuidelines@ddoomenTDD, DDD, BDDApplication LifecycleManagementAgileXPwww.dennisdoomen.net
  6. 6. demoOne level of indentation per methodRule 1
  7. 7. demoOne dot per lineDon’t use the else keywordRules 2 & 5
  8. 8. demoWrap all primitives and strings…a.k.a. first-class typesRule 3
  9. 9. demoFirst-class collectionsRule 4
  10. 10. Choose names carefully…not too short…and…not too long…contextualRule 6
  11. 11. Keep all classes small…a.k.a. Single Responsibility PrincipleRule 7
  12. 12. No more than two instance variablesRule 8
  13. 13. demoNo propertiesRule 9
  14. 14. demo…no protected properties…test data builders…more refactoringFinal result
  15. 15. Q&A
  16. 16. Resources• Example Code (original by JohanMartinsson)• Object Calisthenics (by Jeff Bay)• C# Coding Guidelines (by me)• www.dennisdoomen.net (by me…again )• Agile Principles, Patterns, and Practices inC# (by Uncle Bob)
  17. 17. Thank you!Object Calisthenatics

×