Your SlideShare is downloading. ×
0
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
TDD and S.O.L.I.D.; Two Ingredients For High Quality Software
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

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

3,308

Published on

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

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
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

    • 1. TDD & S.O.L.I.D.Two ingredients for high-quality software<br />Dennis Doomen<br />dennis.doomen@avivasolutions.nl<br />
    • 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. Agenda<br />About quality<br />Test Driven Development & S.O.L.I.D<br />Demos & examples<br />Guidelines to get started<br />
    • 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. 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. 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. S.O.L.I.D.<br />Single ResponsiblityPrinciple<br />Open ClosedPrinciple<br />LiskovSubstitutionPrinciple<br />Interface SeggregationPrinciple<br />DependencyInversionPrinciple<br />
    • 8. Demo<br />Attendee registration<br />TDDSingle Reponsibility Principle<br />Dependency Inversion Principle<br />
    • 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. 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. Example<br />Types of attendees<br />Open Closed Principle<br />Dependency Inversion Principle<br />
    • 12. Naive Solution<br />
    • 13. Better Solution<br />
    • 14. Best Solution<br />
    • 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. Example<br />Billing<br />Liskov Substitution Principle<br />
    • 17. Naive Solution<br />
    • 18. Better Solution<br />new EmployeeBuilder().Build() ??<br />
    • 19. Best Solution<br />
    • 20. What you have seen<br />Liskov Substition Principle<br />Single Responsibility Principle<br />
    • 21. Example<br />Event listening<br />Interface seggregation<br />
    • 22. Naive Solution<br />
    • 23. Better Solution<br />
    • 24. Best Solution<br />
    • 25. What you have seen<br />Interface Seggregation<br />
    • 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. 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. 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. Q&A<br />Emaildennis.doomen@avivasolutions.nl<br />Blogwww.dennisdoomen.net<br />Twitterwww.twitter.com/dennisdoomen<br />

    ×