SOLID design Five design principles SOLID design 1

SOLID design Five design principles SOLID design 1
1 / 1
SOLID design Five design principles SOLID design 1 - slide 1 of 8 SOLID design Five design principles SOLID design 1 - slide 2 of 8 SOLID design Five design principles SOLID design 1 - slide 3 of 8 SOLID design Five design principles SOLID design 1 - slide 4 of 8 SOLID design Five design principles SOLID design 1 - slide 5 of 8 SOLID design Five design principles SOLID design 1 - slide 6 of 8 SOLID design Five design principles SOLID design 1 - slide 7 of 8 SOLID design Five design principles SOLID design 1 - slide 8 of 8
SOLID design Five design principles SOLID design 1 SOLID, what is it? Single responsibility principle A class should have only a SINGLE responsibility Change in the specification on that responsibility should only affect this class

Related Topics

Download this presentation From Below

"SOLID design Five design principles SOLID design 1" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

01
SOLID design Five design principles SOLID design 1<br>
02
SOLID, what is it? Single responsibility principle
A class should have only a SINGLE responsibility
Change in the specification on that responsibility should only affect this class
Open/close principle
Each class should be open for extensions (sub-classes), but closed for modifications
We should never need to modify an existing class
Liskov substitution principle
Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
Named after Barbara Liskov
Interface segregation principle
Many client-specific interfaces is better than one general purpose interface
Dependency inversion principle
Depend on abstractions, not on concretions SOLID design 2<br>
03
SOLID, what is it used for? The SOLID principles are used as a guideline
Designing systems
Refactoring systems
Detecting “smells” in code
Refactor until the code is SOLID SOLID design 3<br>