[YIDLUG] SOLID​ the ​five basic principles of object-oriented programming and design.

1,487 views

Published on

Presented BY:Yitzchok gottlieb a Software Developer working for GoFlow Commerce and one of the Co-founders of the NYALT.NET meetup group.

Description: SOLID stands for Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion

​​The principles when applied together intend to make it more likely that a programmer will create a system that is easy to maintain and extend over time.

Sample and other files are available: https://github.com/Yitzchok/YIDLUGSOLIDSample

Video of the presentation is available:https://www.youtube.com/watch?v=TU3VMmNFSlM

YIDLUG is a Yiddish speaking Linux (and other software development) Users Group,
check us out at http://www.yidlug.org

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

No Downloads
Views
Total views
1,487
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
23
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

[YIDLUG] SOLID​ the ​five basic principles of object-oriented programming and design.

  1. 1. YIDLUG TOPIC: SOLID THE PRINCIPLES OF OBJECT ORIENTED DESIGN YITZCHOK GOTTLIEB SOFTWARE DEVELOPER AT GOFLOW COMMERCE
  2. 2. OBJECT ORIENTED DESIGN CONCEPTS • Object/Class – A tight coupling or association of the data with the methods that act on the data. • Information hiding – The ability to protect some components of the object from external entities. • Inheritance – The ability for a class to extend or override functionality of another class • Interface - The ability to defer the implementation of a method. • Polymorphism - The ability to replace an object with a sub object.
  3. 3. WHAT IS SOLID? S.O.L.I.D. is a collection of best-practice object-oriented design principles that you can apply for design to accomplish various desirable goals like losecoupling, higher maintainability, etc. These principles were pioneered and first collected into a written work by Robert „Uncle Bob‟ Martin.
  4. 4. S.O.L.I.D. DESIGN PRINCIPLES • SRP – Single Responsibility Principle • OCP – Open Closed Principle • LSP – Liskov Substitution Principle • ISP – Interface Segregation Principle • DIP – Dependency Inversion Principle Let‟s check them out…
  5. 5. S.R.P. - SINGLE RESPONSIBILITY PRINCIPLE A class should have one, and only one, reason to change.
  6. 6. THIS LEADS TO HIGHER QUALITY CODE Because the code is • More readable, that is easier to understand • Less error prone • Robust • Testable • Maintainable
  7. 7. O.C.P - OPEN CLOSED PRINCIPLE You should be able to extend a class behavior, without modifying it.
  8. 8. The code should be “Open for Extension” and “Closed for Modification”
  9. 9. L.S.P - LISKOV SUBSTITUTION PRINCIPLE A.K.A. DESIGN BY CONTRACT Derived classes must be substitutable for their base classes.
  10. 10. I.S.P - INTERFACE SEGREGATION PRINCIPLE (INTERFACE POLLUTION) Make fine-grained interfaces that are client specific.
  11. 11. Clients shouldn‟t be forced to implement interfaces they don‟t use.
  12. 12. D.I.P - DEPENDENCY INVERSION PRINCIPLE Depend on abstractions, not on concretions
  13. 13. A. High level modules should not depend upon low level modules. Both should depend upon abstractions. B. Abstractions should not depend upon details. Details should depend upon abstractions

×