Single Responsibility Principle @ AgileCamp Feb, 27 2010
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Single Responsibility Principle @ AgileCamp Feb, 27 2010

on

  • 1,671 views

 

Statistics

Views

Total Views
1,671
Views on SlideShare
1,660
Embed Views
11

Actions

Likes
0
Downloads
3
Comments
0

3 Embeds 11

http://www.slideshare.net 7
http://www.linkedin.com 2
https://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Single Responsibility Principle @ AgileCamp Feb, 27 2010 Presentation 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 /