Who killed object oriented design?

download Who killed object oriented design?

of 104

  • date post

    02-Jul-2015
  • Category

    Technology

  • view

    1.011
  • download

    1

Embed Size (px)

description

Presentation about Object Oriented Design common anti-patterns, bad habits and how to avoid them.

Transcript of Who killed object oriented design?

  • 1. Who killedObject OrientedDesign?

2. Colonel PHPwith a lead pipe inthe study? 3. Just look around... 4. Is OOD makingprogramming moreenjoyable? 5. How many abstractclasses have youwritten lately? 6. When was the lasttime that you had adesign meeting? 7. Which one is yourfavorite LINQexpression? 8. Why would you useyield or yieldreturn? 9. PrimitiveAddiction 10. Be lazy 11. Make your life easier 12. Avoid repetition 13. Use the source Luke 14. Creating dates ispainful? 15. DateTime.Parse("...") 16. new DateTime(y, m, d) 17. On.Jan(1)On.Aug(3, 2013) 18. Date arithmetic makesyou crazy? 19. DateTime.Today.AddDays(-3) 20. 3.Days().Ago 21. 5.Days().Span 22. 1.Month().Ago +5.Days().Span 23. On.Dec(10) - 2.Months().Span 24. 2.Months().Before(On.Dec(10)) 25. Date from and to inevery method? 26. Whats missing? 27. Use a DateRange 28. new DateRange(!!!!!!On.Jul(1),!!!!!!1.Month().Span) 29. public class DateRange:!!!!!IEnumerable 30. var r = new DateRange(!!!!!!!!!!!!!!On.Jul(1),!!!!!!!!!!!!!!On.Sep(3))r.Select(d => ....) 31. Generates a sequenceof dates 32. public IEnumerator GetEnumerator(){var counter = this.StartDate;while (counter c.Address == address)}} 68. How manyrepositories? 69. Only one genericimplementation on topof your favorite ORM 70. IOC container caninstantiate the right one 71. UnitOfWorkcan be a factory ofrepositories 72. Having an ORM do wereally need arepository? 73. Testing thetestable test istested 74. A test is about behavior 75. Not implementation 76. Writing expectationsabout implementationmakes it brittle 77. public int ImportantMethod(){var c1 = _dependency1.Calculate();var c2 = _dependency2.Adjust(c1);return c2 + 10;} 78. public void ImportantTest(){// arrange ...._dependency1! ! ! .Expect(d => d.Calculate())! ! ! .Once()! ! ! .AndReturn(50)_dependency2! ! ! .Expect(d => d.Adjust(50))! ! ! .Once()! ! ! .AndReturn(100)// actvar actual = sut.ImportantMethod()// assertAssert.That(actual, Is.EqualTo(110))! VerifyAllExpectations()} 79. public int ImportantMethod(){var c1 = _dependency1.Calculate();var c2 = _dependency2.Adjust(c1);return _dependency2.Adjust(c1) + 10;} 80. public void ImportantTest(){// arrange ...._dependency1! ! ! ! .Stub(d => d.Calculate())! ! ! ! .AndReturn(50)_dependency2! ! ! ! .Stub(d => d.Adjust(50))! ! ! ! .AndReturn(100)// actvar actual = sut.ImportantMethod()// assertAssert.That(actual, Is.EqualTo(110))} 81. Abstractionsubtraction 82. Exercise in groups 83. Hospital Domain Model 84. Versions 85. What the domainlooked likeX months ago 86. DB DrivenDevelopment 87. Model may or may notmatch the database 88. Active Record 89. Transaction Script 90. Data Mapper 91. Coding is likeTelling a Story 92. Leave the code cleanerthan you found it 93. Meaning is KING 94. Dont code what youdont need 95. Know yourcollections 96. Let LINQ do the workfor you 97. Use extension methodsto mimic a DSL 98. Discuss designoptions 99. Explore F# 100. Thank you! 101. http://smartviewapp.comThe Smartest toolfor lean projectmanagement 102. amir@barylko.com@abarylkohttp://bit.ly/abarylkoslides 103. Photo Credit Under http://creativecommons.org/licenses/by/2.5/ Joe Cheng, DSC_7820-01, http://flic.kr/p/2Zt2u Bill Ward, Derek Schin's Trucks 1, http://flic.kr/p/m5L5S Jeremy Keith, Roast beef, http://flic.kr/p/TKUz Rob Campbell, Field of daisies, http://flic.kr/p/6QJjU4 Karin Dalziel, The Thinker, http://flic.kr/p/4UYArc 104. Photo Credit 2 Under https://creativecommons.org/licenses/by-sa/2.0/ Don LaVange, To Irene, https://flic.kr/p/49ihZX Under http://creativecommons.org/licenses/by-sa/3.0/us/ Derick Bailey, SOLID Motivational Posters, http://bit.ly/17aVaHg MGA Roadster 1600 in Chariot Red: http://www.carandclassic.co.uk/car/C414652 Cone of Uncertainty, http://www.agilenutshell.com/cone_of_uncertainty Burning Money, http://en.wikipedia.org/wiki/Money_burning#mediaviewer/File:Burning-money-and-yuanbao-at-the-cemetery-3249.JPG