4. Design Smells
1. Rigidity The system is hard to change because
every change forces many other
2. Fragility changes to other parts of the system.
3. Immobility
4. Viscosity
5. Needless Complexity
6. Needless repetition
7. Opacity
5. Design Smells
1. Rigidity Changes cause the system to break in
places that have no conceptual
2. Fragility relationship to the part that was changed.
3. Immobility
4. Viscosity
5. Needless Complexity
6. Needless repetition
7. Opacity
6. Design Smells
1. Rigidity It is hard to disentangle the system into
components that ca be reused in other
2. Fragility systems.
3. Immobility
4. Viscosity
5. Needless Complexity
6. Needless repetition
7. Opacity
7. Design Smells
1. Rigidity Doing things right is harder than doind
things wrong.
2. Fragility
3. Immobility
4. Viscosity
5. Needless Complexity
6. Needless repetition
7. Opacity
8. Design Smells
1. Rigidity The design contains infrastructure that
adds no direct benefit.
2. Fragility
3. Immobility
4. Viscosity
5. Needless Complexity
6. Needless repetition
7. Opacity
9. Design Smells
1. Rigidity The design contains repeating structures
that could be unified under a single
2. Fragility abstraction.
3. Immobility
4. Viscosity
5. Needless Complexity
6. Needless repetition
7. Opacity
10. Design Smells
1. Rigidity It is hard to read and understand. It does
not express its intent well.
2. Fragility
3. Immobility
4. Viscosity
5. Needless Complexity
6. Needless repetition
7. Opacity
11. • Cohesion
– All responsibilites of a module should be
related and focused.
• Coupling
– How much a module depends upon others
12. S.O.L.I.D.
• Single Responsibility
• Open Closed
• Liskov Substitution
• Interface Segregation
• Dependency Inversion
Photo by Jean Christophe Prunet http://www.fotopedia.com/items/_avPIZmqM3w-vdSxZGLACsg
17. Open Closed Principle
• Open for extension
• Closed for modification
• Design modules to never change.
• A change should impact only one
module.
• Abstraction
24. 4 rules of simple design
1. Runs all the tests
2. Contains no duplication
3. Expresses the intent of the
programmer
4. Minimizes the number of classes and
methods
Kent Beck
27. References
• http://www.slideshare.net/JuanjoFuchs/solid-cmo-
lo-aplico-a-mi-cdigo
• SOLID Development by Chris Deweese
http://www.slideshare.net/cdeweese/solid-
development
• SOLID Design Principles by Bruno Bossola
http://www.slideshare.net/bbossola/geecon09-
solid
• Solid Development Practices in Motivational
Pictures
http://lostechies.com/derickbailey/2009/02/11/soli
d-development-principles-in-motivational-
pictures/
28. Moltes Gràcies
(Thank you very much)
Toni Tassani
Toni Tassani
@atassani
http://alapamui.blogspot.com
Barcelona -