Your SlideShare is downloading. ×
Single Responsibility Principle @ AgileCamp Feb, 27 2010
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

Single Responsibility Principle @ AgileCamp Feb, 27 2010

1,193
views

Published on

Published in: Technology, Business

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,193
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
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

Transcript

  • 1. SRP Andrea Francia
  • 2.
    • What is SRP?
    • Why you should apply SRP?
    • Why you shouldn’t apply SRP?
  • 3. The Principle
    • Single Responsibility Principle:
    • “ A class should have only one reason to change”
    • from the PPP Book: “Agile Software Development Principle, Patterns, and Practice” by Robert C. Martin
  • 4. Problems without SRP
    • Problems:
      • Linking of gui.lib in CalcApp
      • If a change in GraphApp forces a change in Rectangle we may be force to rebuild, retest and redeploy CalcApp.
  • 5. Applying SRP
    • Is better? Depends
      • More Complex
      • Less Fragile … but in respect of what type of change?
  • 6. Violation example: use of wxWidgets instead of wxBase
  • 7. Violation example: bad use of wxWidgets
    • Solution: extract responsibiliy
  • 8. Too much SRP
  • 9. Bad use of JPA Entities
  • 10. Thanks
    • Andrea Francia
      • [email_address]
      • http:// www.andreafrancia.it /
      • http:// blog.andreafrancia.it /