0
Object Oriented Design Principles with silly names but help you code more betterer.
SOLID
FREDDY NOSTRILS
Illegal Muppets
1. Single Responsibility Principle
Classes should only have one reason for change
Border Patrol patrol_border accept_illegal_shipments_of_muppets
DAMN POSTAL STRIKE! Border guards can't patrol whilst waiting for packages
2. Open/Closed Principle
Classes Should be Open for Extension but Closed for Modification
Border Guard accept_tequila_bribe
Border Guard accept_bribe(bribe)
Look for the Abstractions!
Liskov Substitution Principle
Subtype should be completely substitutable for the Supertype
Border Guard drink(Fluid)
!=
Although Freddy Will be Happy the Guards' Boss won't be!
Interface Segregation Principle
Clients should not be forced to depend on methods they do not use.
Shipment Illegal Muppets circulate_air(airholes_count) ship
Dependency Inversion Principle
High Level Business Logic shouldn't depend on lower level details.
-find muppets -pack muppets -bribe border patrol -phone pedro to come and pick up muppets. -celebrate Freddy's Business Lo...
Upcoming SlideShare
Loading in...5
×

Object Oriented Design Principles - SOLID

1,083

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,083
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "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?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×