Object Oriented Design Principles - SOLID

1,320 views

Published on

In this presentation I will explain the principles of OO design with the help of Freddy Nostrils and his Illegal Muppet trade.

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
1,320
On SlideShare
0
From Embeds
0
Number of Embeds
23
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Object Oriented Design Principles - SOLID

  1. 1. Object Oriented Design Principles with silly names but help you code more betterer.
  2. 2. SOLID
  3. 3. FREDDY NOSTRILS
  4. 4. Illegal Muppets
  5. 5. 1. Single Responsibility Principle
  6. 6. Classes should only have one reason for change
  7. 7. Border Patrol patrol_border accept_illegal_shipments_of_muppets
  8. 8. DAMN POSTAL STRIKE! Border guards can't patrol whilst waiting for packages
  9. 9. 2. Open/Closed Principle
  10. 10. Classes Should be Open for Extension but Closed for Modification
  11. 11. Border Guard accept_tequila_bribe
  12. 12. Border Guard accept_bribe(bribe)
  13. 13. Look for the Abstractions!
  14. 14. Liskov Substitution Principle
  15. 15. Subtype should be completely substitutable for the Supertype
  16. 16. Border Guard drink(Fluid)
  17. 17. !=
  18. 18. Although Freddy Will be Happy the Guards' Boss won't be!
  19. 19. Interface Segregation Principle
  20. 20. Clients should not be forced to depend on methods they do not use.
  21. 21. Shipment Illegal Muppets circulate_air(airholes_count) ship
  22. 22. Dependency Inversion Principle
  23. 23. High Level Business Logic shouldn't depend on lower level details.
  24. 24. -find muppets -pack muppets -bribe border patrol -phone pedro to come and pick up muppets. -celebrate Freddy's Business Logic : What's the problem here?

×