Your SlideShare is downloading. ×
SOLID principles
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

SOLID principles

2,901
views

Published on

Slides from presentation at agiledays09.

Slides from presentation at agiledays09.

Published in: Technology

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

  • Be the first to like this

No Downloads
Views
Total Views
2,901
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
54
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. Agile Object Oriented Design SOLID principles [email_address]
  • 2. Why it is Agile?
  • 3.  
  • 4.  
  • 5.  
  • 6. ?
  • 7.  
  • 8. principles != rules
  • 9. Single Responsibility Principle
  • 10. Problem domain Conceptual model Implementation
  • 11. Problem domain Conceptual model Implementation ? ?
  • 12.  
  • 13. NOooo!!
  • 14. Book Instrument 1 * 1 1 Position value: double
  • 15. Book Position Listener 1 BookPosNode Book Position Listener 2 Network Application position position position
  • 16. BookPosNode AbstractBookPosNode Subscriber SnapshotProvider HeartbeatMonitor StateMachine
  • 17. 1
  • 18. 2
  • 19. 3
  • 20. 4 the rest of the class is collapsed
  • 21. 5 the rest of the class is collapsed
  • 22. Open/Closed Principle
  • 23. AbstractPositionNode BookPosNode Client
  • 24. AbstractPositionNode BookPosNode JMSNode Client PositionWatcher Add Change
  • 25. AbstractPositionNode BookPosNode JMSNode Client PositionWatcher Add NodeV2
  • 26. Front-end Back-end Database Change
  • 27. Liskov Substitution Principle
  • 28.  
  • 29.  
  • 30.  
  • 31. Ellipse-circle problem rectangle-square
  • 32. Point x, y : int #equals() #hashCode()
  • 33. Point x, y : int #equals() #hashCode() ColorPoint color : Color #equals() #hashCode()
  • 34. Point x, y : int #equals() #hashCode() ColorPoint color : Color #equals() #hashCode() Can't extend like this preserving equals contract (Effective Java, Item 8)
  • 35. @IViolateLSP
  • 36. class Dog implements ICanBark … class Button implements IClickable …
  • 37. Interface Segregation Principle
  • 38. <<interface>> BigService Client1 Client2 Client3
  • 39. <<interface>> BigService <<interface>> Service1 <<interface>> Service2 <<interface>> Service3 Client1 Client2 Client3
  • 40.  
  • 41. BookPositionNode <<interface>> ResubscribingNode AbsPosNode StateMachine Client uses uses
  • 42. Dependency Inversion Principle
  • 43. Client Service client service
  • 44. Client <<interface>> Service ServiceImpl client service
  • 45. client service
  • 46. Client <<interface>> Service ServiceImpl client service
  • 47. Client <<interface>> Service ServiceImpl client service
  • 48. client service
  • 49. Client <<interface>> Service ServiceImpl client service api
  • 50.  
  • 51. S RP O CP L SP I SP D IP
  • 52. Single Responsibility Principle
  • 53. Open/Closed Principle
  • 54. Liskov Substitution Principle
  • 55. Interface Segregation Principle
  • 56. Dependency Inversion Principle
  • 57. What else?
  • 58. Problem domain Conceptual model Implementation
  • 59. F**k Design
  • 60. Zen Coding
  • 61.  
  • 62. and only then for computers Code is written for people
  • 63. REP CRP CCP ADP SDP SAP
  • 64. UML, patterns, and more...
  • 65.  
  • 66. Thanks!
  • 67. S RP O CP L SP I SP D IP
  • 68. http://weblogs.java.net/blog/82/2003/09/02/aristotles-error-or-agile-smagile http://blog.objectmentor.com/articles/2009/01/31/quality-doesnt-matter-that-much-jeff-and-joel http://www.codinghorror.com/blog/archives/000805.html http://www.youtube.com/watch?v=2k1uOqRb0HU http://blogs.msdn.com/brada/archive/2003/10/02/50420.aspx http://www.joelonsoftware.com/articles/LeakyAbstractions.html http://www.joelonsoftware.com/items/2009/09/23.html
  • 69.  
  • 70.  
  • 71.