This document outlines the SOLID principles of object-oriented design, including Single Responsibility Principle, Open-Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, and Dependency Inversion Principle. It defines each principle, provides examples, and discusses the benefits, such as increasing reusability, making code more extensible and flexible, and reducing coupling between modules. Applying these principles helps create software that is well-designed and able to easily handle changes, improving developer and customer satisfaction.
Design Principle and Design Pattern examples on C# .NET Core.
(Note: Not all the contents are original, I copied some of them from online tutorials while learning and found great explanations. A great thanks to all for this information.)
The presentation discusses software design. It discusses the characteristics of a good and bad design. Then it talks about how to achieve a good design. Then finally we discuss the SOLID Principles of Object Oriented Design. These are 5 principles compiled by Rober Cecil Martin aka Uncle Bob. The benefit of these principles is to achieve a good OO design which is high in cohesion and low in coupling thus easily adaptable to change
Writing Maintainable Software Using SOLID PrinciplesDoug Jones
Uncle Bob Martin (Robert C. Martin) conceptualized these 5 object oriented design principles (the SOLID principles) almost 20 years ago, yet they're just as applicable today. I'll walk through the SOLID principles and dependency injection, and offer a methodology that adheres to those principles that's worked well for me. I'll give you examples in .NET Core 2.0, but you'll find these timeless principles work in any language. Come enjoy a discussion away from the technology treadmill!
Design Principle and Design Pattern examples on C# .NET Core.
(Note: Not all the contents are original, I copied some of them from online tutorials while learning and found great explanations. A great thanks to all for this information.)
The presentation discusses software design. It discusses the characteristics of a good and bad design. Then it talks about how to achieve a good design. Then finally we discuss the SOLID Principles of Object Oriented Design. These are 5 principles compiled by Rober Cecil Martin aka Uncle Bob. The benefit of these principles is to achieve a good OO design which is high in cohesion and low in coupling thus easily adaptable to change
Writing Maintainable Software Using SOLID PrinciplesDoug Jones
Uncle Bob Martin (Robert C. Martin) conceptualized these 5 object oriented design principles (the SOLID principles) almost 20 years ago, yet they're just as applicable today. I'll walk through the SOLID principles and dependency injection, and offer a methodology that adheres to those principles that's worked well for me. I'll give you examples in .NET Core 2.0, but you'll find these timeless principles work in any language. Come enjoy a discussion away from the technology treadmill!
Nesta sessão iremos entender o conceito de Single Page Application, analisar algumas das suas vantagens e desvantagens e em que contextos, na minha opinião, fará sentido usar uma solução como esta face a uma aplicação web de múltiplas páginas.
No final veremos uma pequena demo de uma Single Page Application em Angular versão 1.
Using the SOLID design principles to write code that's easier to understand, maintain and extend.
The slides from the SOLID speech at the CodeTalks 2018 in Hamburg.
Becoming a better developer by using the SOLID design principlesKaterina Trajchevska
Learn the purpose of SOLID design principles and how to use them to write code that's easy to extend, maintain and understand.
Slides from the talk at Laracon EU.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )
Refatoração é um processo que torna o código mais organizado, limpo e gerenciável.
Com este webinar, apresentamos recursos valiosos para a refatoração em PHP, como o Solid e Design Patterns. Além de explorar a compreensão conceitual, o Archer, que é um de nossos colaboradores, apresentou um workshop em que todos os participantes puderam observar ao vivo um código PHP sendo refatorado.
Of the SOLID principles, made famous by Robert C. Martin, we'll discuss the Single Responsibility Principle and the Open/Closed Principle, two of the presenter's favorite principles. But at the same time the least understood and used principles. That's why this session will explain them thoroughly and give real life examples instead of the regular customer & order examples. You'll walk away knowing what the benefits are and how to use them properly.
Nesta sessão iremos entender o conceito de Single Page Application, analisar algumas das suas vantagens e desvantagens e em que contextos, na minha opinião, fará sentido usar uma solução como esta face a uma aplicação web de múltiplas páginas.
No final veremos uma pequena demo de uma Single Page Application em Angular versão 1.
Using the SOLID design principles to write code that's easier to understand, maintain and extend.
The slides from the SOLID speech at the CodeTalks 2018 in Hamburg.
Becoming a better developer by using the SOLID design principlesKaterina Trajchevska
Learn the purpose of SOLID design principles and how to use them to write code that's easy to extend, maintain and understand.
Slides from the talk at Laracon EU.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )
Refatoração é um processo que torna o código mais organizado, limpo e gerenciável.
Com este webinar, apresentamos recursos valiosos para a refatoração em PHP, como o Solid e Design Patterns. Além de explorar a compreensão conceitual, o Archer, que é um de nossos colaboradores, apresentou um workshop em que todos os participantes puderam observar ao vivo um código PHP sendo refatorado.
Of the SOLID principles, made famous by Robert C. Martin, we'll discuss the Single Responsibility Principle and the Open/Closed Principle, two of the presenter's favorite principles. But at the same time the least understood and used principles. That's why this session will explain them thoroughly and give real life examples instead of the regular customer & order examples. You'll walk away knowing what the benefits are and how to use them properly.
SOLID is a mnemonic device for 5 design principles of object-oriented
programs (OOP) that result in readable, adaptable, and scalable code.
S - Single Responsibility Principle.
O - Open Closed Principle.
L - Liskov Substitution Principle.
I - Interface Segregation Principle.
D - Dependency Inversion Principle.
This paper briefly talks about SOLID design principles. It aims to discuss the implementation of IoC to invert dependencies. The paper explains Dependency Injection, its types and building IoC Containers in detail.
4. Introduction
Page 4Confidential
S.O.L.I.D is an acronym for the first five object-oriented
design(OOD) principles by Robert C. Martin, popularly
known as Uncle Bob.
S – Single Responsibility principle
O – Open-closed principle
L – Liskov’s substitution principle
I – Interface segregation principle
D – Dependency Inversion principle
5. What are the issues that developers
always face to in software development
lifecycle?
Question
6. Requirements change
Page 6Confidential
Your requirements will always change (and grow) over
time
Your system need to evolve to handle the changes.
We should build a software which is smartly designed
enough to change.
.
7. What is “Smartly-designed Software” ?
Page 7Confidential
Handle the changes with minimal re-factor and effort.
Extendable
Reusable
Flexible
8. Customer and Developer satisfaction
Page 8Confidential
Customers are satisfied because the software:
+ Work well
+ Keeps working - always.
+ Can be changed, upgraded easily
+ Reuse to build other software.
+ Extendable, Flexible.
Help the developers:
+ Handle the changes easily.
+ Code better in any programming languages.
9. Page 9Confidential
PURPOSE OF USE
When combined together, these principles will help your
software:
Become well and smartly-designed
Easily handle the changes
Make both customer and developer satisfied with their
work.
⇒Save money and time.
11. SRP - Definition
Page 11Confidential
“An object should have one and only one reason to
change”
12. SRP - Explanation
Page 12Confidential
Responsibility is a family of functions that serves
one particular purpose.
If you have a class having more than one reason to
change
=> you should split the class into multiple classes
base on their responsibilities.
14. SRP – Why splitting is important ?
Page 14Confidential
- If classes have more than one responsibility ?
- Each responsibility is an axis of change.
+ Codes become complicated
+ One change effects another
- Big classes:
+ Difficult to change
+ Harder to read
+ Bugs
15. SRP – Benefit
Page 15Confidential
Increase the reusability of source code
Make your classes smaller, lesser complicated.
Restrict effects to other modules when we change
source codes.
Easier to read and write => less to write bugs.
Higher cohesion, lower coupling.
Smaller classes and smaller methods will give you
more flexibility
More classes != more complicated
16. Open – Close Principle (OCP)
Page 16Confidential
17. OCP - Definition
Page 17Confidential
“An object should be opened for extension and
closed for modification”
18. OCP - Explanation
Page 18Confidential
- You should extend a class without modifying it.
- if you read and understand all source code to find
what they are supposed to do and update.
⇒ so hard
⇒ cost time, effort
⇒ bugs
- But it’s easy to extend the source code to meet
the new requirements.
20. OCP – Benefit
Page 20Confidential
- Restrict effects to others because when you
change code.
- Not need to read all old source codes that already
worked well.
- Extend the existing libraries.
22. Liskov's Substitution (LSP) - Definition
Page 22Confidential
“Objects should be replaceable with their base
classes without altering the correctness of the
program”
23. LSP - Explanation
Page 23Confidential
+ Should always use a base class or interface
instead of the subclasses.
+ This works correctly with any subclasses of X.
⇒ Extends without replacing any base class's
functions
25. LSP – Benefit
Page 25Confidential
- This is an extension of OCP
⇒Wrong LSP => wrong OCP
⇒ Inherit all OCP's benefits.
- Preventing bugs caused by subclasses.
27. ISP - Definition
Page 27Confidential
“A client should not implement an interface, if it
doesn't use that”
28. ISP - Explanation
Page 28Confidential
Clients should not be forced to implement interfaces
they don't use
=> Split a fat interface which has many methods
into many small interfaces.
30. ISP – Benefit
Page 30Confidential
- Smaller interface => more reusable
- Extendable
- Flexible
- Allows people to use only the parts of objects that
they need.
- High cohesion, low coupling
- Comply SRP.
32. DIP - Definition
Page 32Confidential
“High level model should not depend on low level
module, both should depend on abstractions
Abstractions should not depend on details.
Details should depend on abstractions”
33. DIP - Explanation
Page 33Confidential
- Low level module: implement basic and primary
operations
- High level module: encapsulate complex logic
- The high level classes should not directly use and
heavily depend on low level classes.
=> we should create abstraction layer between high
level classes and low level classes
40. Conclusion
Page 40Confidential
With S.O.L.I.D principles, our software:
Easily handle the changes
Become well and smartly-designed
Make both customer and developer satisfied with their
work.
⇒Save money and time.
41. OOP vs OOD
Page 41Confidential
Object oriented design (OOD) = OOP + Design principles.
⇒The source code applied OOD will be:
+ Object oriented
+ Re-usable
+ Flexible: can be changed with minimal efforts.
+ Extendable: can be extended without changing existing
codes