Your SlideShare is downloading. ×
0
TDD & S.O.L.I.D.Two ingredients for high-quality software<br />Dennis Doomen<br />dennis.doomen@avivasolutions.nl<br />
About Me<br />Principal Consultant at Aviva Solutions<br />35 years<br />6-month daughter<br />12 years of experience<br /...
Agenda<br />About quality<br />Test Driven Development & S.O.L.I.D<br />Demos & examples<br />Guidelines to get started<br />
What is quality?<br />Or, how do you measure it?“I don&apos;t care howgoodyouthinkyour design is. If I can&apos;t walk in ...
How?<br />Use coding guidelines<br />Apply common design principles<br />Test Driven Development<br />Refactoring<br />Use...
Test Driven Development<br />Is a design process<br />Tests are your first users<br />Tests can be your documentation<br /...
S.O.L.I.D.<br />Single ResponsiblityPrinciple<br />Open ClosedPrinciple<br />LiskovSubstitutionPrinciple<br />Interface Se...
Demo<br />Attendee registration<br />TDDSingle Reponsibility Principle<br />Dependency Inversion Principle<br />
What you have seen<br />TDD<br />Arrange-Act-Assert<br />Red-Green-Refactor<br />Mocking<br />Intention revealing tests<br...
Phases of unit testing<br />Refusing<br />Getting too excited<br />Testing everything!<br />Integration testing<br />Disco...
Example<br />Types of attendees<br />Open Closed Principle<br />Dependency Inversion Principle<br />
Naive Solution<br />
Better Solution<br />
Best Solution<br />
What you have seen<br />Open Closed Principle<br />Single Responsibility Principle<br />Dependency Inversion Principle<br ...
Example<br />Billing<br />Liskov Substitution Principle<br />
Naive Solution<br />
Better Solution<br />new EmployeeBuilder().Build() ??<br />
Best Solution<br />
What you have seen<br />Liskov Substition Principle<br />Single Responsibility Principle<br />
Example<br />Event listening<br />Interface seggregation<br />
Naive Solution<br />
Better Solution<br />
Best Solution<br />
What you have seen<br />Interface Seggregation<br />
Getting started guidelines<br />Test should be<br />Small and focused<br />Intention revealing<br />Repeatable<br />Have n...
Getting started guidelines<br />Mocking<br />Don&apos;t mock chatty interfaces<br />Don&apos;t have more than 2-3 mocks pe...
Resources<br />xUnit Patternshttp://xunitpatterns.com/<br />Applying Domain Driven Design and Design Patternshttp://www.am...
Q&A<br />Emaildennis.doomen@avivasolutions.nl<br />Blogwww.dennisdoomen.net<br />Twitterwww.twitter.com/dennisdoomen<br />
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
Upcoming SlideShare
Loading in...5
×

TDD and S.O.L.I.D.; Two Ingredients For High Quality Software

3,345

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,345
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
59
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • PROVIDE YOU SESSION CODE AND NAME AS IT WAS DEFINED BY AGENDA OWNERS.WELCOME ATTENDEES. INTRODUCE YOURSELF AND YOUR SESSION.
  • PROVIDE 5 MIN BEFORE SESSION ENDS FOR Q&A.
  • Transcript of "TDD and S.O.L.I.D.; Two Ingredients For High Quality Software"

    1. 1. TDD & S.O.L.I.D.Two ingredients for high-quality software<br />Dennis Doomen<br />dennis.doomen@avivasolutions.nl<br />
    2. 2. About Me<br />Principal Consultant at Aviva Solutions<br />35 years<br />6-month daughter<br />12 years of experience<br />C++ origins<br />On .NET since 2001<br />
    3. 3. Agenda<br />About quality<br />Test Driven Development & S.O.L.I.D<br />Demos & examples<br />Guidelines to get started<br />
    4. 4. What is quality?<br />Or, how do you measure it?“I don&apos;t care howgoodyouthinkyour design is. If I can&apos;t walk in and write a test foranarbitrarymethod of yours in fiveminutes, itsnot as good as youthinkit is, and whetheryouknowitornot, you&apos;repaying a pricefor it.”Michael Feathers, ObjectMentor<br />
    5. 5. How?<br />Use coding guidelines<br />Apply common design principles<br />Test Driven Development<br />Refactoring<br />Use Design Patterns<br />Pair Programming<br />Socialize design & architecture<br />
    6. 6. Test Driven Development<br />Is a design process<br />Tests are your first users<br />Tests can be your documentation<br />If TDD hurts then you&apos;re doing it wrong<br />
    7. 7. S.O.L.I.D.<br />Single ResponsiblityPrinciple<br />Open ClosedPrinciple<br />LiskovSubstitutionPrinciple<br />Interface SeggregationPrinciple<br />DependencyInversionPrinciple<br />
    8. 8. Demo<br />Attendee registration<br />TDDSingle Reponsibility Principle<br />Dependency Inversion Principle<br />
    9. 9. What you have seen<br />TDD<br />Arrange-Act-Assert<br />Red-Green-Refactor<br />Mocking<br />Intention revealing tests<br />Single Responsibility Principle<br />Dependency Inversion Principles<br />
    10. 10. Phases of unit testing<br />Refusing<br />Getting too excited<br />Testing everything!<br />Integration testing<br />Discover mocking<br />Mocking everything<br />Becoming effective<br />
    11. 11. Example<br />Types of attendees<br />Open Closed Principle<br />Dependency Inversion Principle<br />
    12. 12. Naive Solution<br />
    13. 13. Better Solution<br />
    14. 14. Best Solution<br />
    15. 15. What you have seen<br />Open Closed Principle<br />Single Responsibility Principle<br />Dependency Inversion Principle<br />Chain of Responsibility Pattern<br />Factory Method Pattern<br />
    16. 16. Example<br />Billing<br />Liskov Substitution Principle<br />
    17. 17. Naive Solution<br />
    18. 18. Better Solution<br />new EmployeeBuilder().Build() ??<br />
    19. 19. Best Solution<br />
    20. 20. What you have seen<br />Liskov Substition Principle<br />Single Responsibility Principle<br />
    21. 21. Example<br />Event listening<br />Interface seggregation<br />
    22. 22. Naive Solution<br />
    23. 23. Better Solution<br />
    24. 24. Best Solution<br />
    25. 25. What you have seen<br />Interface Seggregation<br />
    26. 26. Getting started guidelines<br />Test should be<br />Small and focused<br />Intention revealing<br />Repeatable<br />Have no side-effects<br />Independent<br />Test what you know now (and assemble the rest from those pieces)<br />
    27. 27. Getting started guidelines<br />Mocking<br />Don&apos;t mock chatty interfaces<br />Don&apos;t have more than 2-3 mocks per test<br />Only mock your nearest neigbors<br />Keep your tail short<br />Isolate the ugly stuff<br />Conform to SOLID (and other principles)<br />
    28. 28. Resources<br />xUnit Patternshttp://xunitpatterns.com/<br />Applying Domain Driven Design and Design Patternshttp://www.amazon.com/Applying-Domain-Driven-Design-Patterns-Examples/dp/0321268202<br />Jeremy D. Millerhttp://codebetter.com/blogs/jeremy.miller/default.aspxhttp://msdn.microsoft.com/en-us/magazine/cc720886.aspx<br />InfoQ Recommended TDD Tutorialshttp://www.infoq.com/news/2009/05/recommended-tdd-tutorials<br />Los Techies S.O.L.I.D. Principles E-Bookhttp://www.lostechies.com/content/pablo_ebook.aspx<br />C# 3.0 Coding Guidelineshttp://blog.avivasolutions.nl/archive/2009/03/06/new-coding-guidelines-for-c-3-0.aspx<br />
    29. 29. Q&A<br />Emaildennis.doomen@avivasolutions.nl<br />Blogwww.dennisdoomen.net<br />Twitterwww.twitter.com/dennisdoomen<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×