Principle of Object Oriented Design <ul><li>New Frontier Solutions </li></ul>Dependency Inversion Principle Interface Segr...
Agenda <ul><li>Principle of Object Oriented Design
DIP
ISP </li></ul>
Prerequisite <ul><li>Basic OOP Concept
SRP
OCP
LSP </li></ul>
Dependency Inversion Principle <ul><li>Depend upon Abstractions. Do not depend upon  concretions. </li></ul>
Dependency Structure Procedural Architecture
Dependency Structure Object Oriented Architecture
Copy Program
Copy Program
Copy Program with DIP
Copy Program with DIP
DIP Summary <ul><li>High level modules should not depend low level moduls. Both should depend upon absraction
Abstraction should not depend upon detail. Detail should depend upon abstraction
Since the abstractions and details are all isolated from each other, the code is much easier to maintain. </li></ul>
The Interface Segregation Principle <ul><li>Many client specific interfaces are better than one general purpose interface ...
Fat Service with Integrated Interfaces
Fat Service with Integrated Interfaces
Segregated Interfaces
Upcoming SlideShare
Loading in …5
×

Principles of Object Oriented Design

3,107 views

Published on

Dependency Inversion Principle
Interface Segregation Principle

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
3,107
On SlideShare
0
From Embeds
0
Number of Embeds
76
Actions
Shares
0
Downloads
39
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Principles of Object Oriented Design

  1. 1. Principle of Object Oriented Design <ul><li>New Frontier Solutions </li></ul>Dependency Inversion Principle Interface Segregation Principle Jon Kartago Lamida http://lamida.net
  2. 2. Agenda <ul><li>Principle of Object Oriented Design
  3. 3. DIP
  4. 4. ISP </li></ul>
  5. 5. Prerequisite <ul><li>Basic OOP Concept
  6. 6. SRP
  7. 7. OCP
  8. 8. LSP </li></ul>
  9. 9. Dependency Inversion Principle <ul><li>Depend upon Abstractions. Do not depend upon concretions. </li></ul>
  10. 10. Dependency Structure Procedural Architecture
  11. 11. Dependency Structure Object Oriented Architecture
  12. 12. Copy Program
  13. 13. Copy Program
  14. 14. Copy Program with DIP
  15. 15. Copy Program with DIP
  16. 16. DIP Summary <ul><li>High level modules should not depend low level moduls. Both should depend upon absraction
  17. 17. Abstraction should not depend upon detail. Detail should depend upon abstraction
  18. 18. Since the abstractions and details are all isolated from each other, the code is much easier to maintain. </li></ul>
  19. 19. The Interface Segregation Principle <ul><li>Many client specific interfaces are better than one general purpose interface </li></ul>
  20. 20. Fat Service with Integrated Interfaces
  21. 21. Fat Service with Integrated Interfaces
  22. 22. Segregated Interfaces
  23. 23. Segregated Interfaces
  24. 24. Door Application
  25. 25. Door Application
  26. 26. Door Application
  27. 27. Door Application
  28. 28. ISP Summary <ul><li>Client should not be forced to depend upon interfaces that they do not use
  29. 29. E.g WoodDoor should not be forced depend to TimerClient
  30. 30. Segregate TimerClient hierarchy so only client who need that will implement </li></ul>
  31. 31. Discussion <ul><li>Thank you </li></ul>

×