Open Close Principle

810 views
675 views

Published on

SOLID design principle, Open Close Principle

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
810
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Open Close Principle

  1. 1. Open Closed Principle
  2. 2. ● OOP and OOD ● Open Closed Principle ● The Idea ● Problems Solved ● Example and Discussion
  3. 3. Object Oriented Programming
  4. 4. Object-oriented programming (OOP) is a programming paradigm that represents concepts as "objects" that have data fields (attributes that describe the object) and associated procedures known as methods.
  5. 5. Object Oriented Design
  6. 6. Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem.
  7. 7. Open Closed Principle
  8. 8. "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification"
  9. 9. The idea was that once completed, the implementation of a class could only be modified to correct errors; new or changed features would require that a different class be created.
  10. 10. Class keeps growing when requirements are increased, which is to add new functionalities to it.
  11. 11. Break single responsibility at some point
  12. 12. Break existing test and public API
  13. 13. Break application
  14. 14. Example
  15. 15. Discussion
  16. 16. When to know if a class is completed?
  17. 17. When to know that we are applying OCP?
  18. 18. What do I do if business logic has changed?

×