solid software design

30
SOLID Software Design Abbas Raza

Upload: theceo

Post on 29-Nov-2014

1.697 views

Category:

Technology


0 download

DESCRIPTION

SOLID Software Design Principles as outlined by Uncle Bob. Presented to software artists.

TRANSCRIPT

Page 1: Solid Software Design

SOLID Software Design

Abbas Raza

Page 2: Solid Software Design

Software Design

“ […] the design of a software project is documented primarily by its source code .” Robert C. Martin

Page 3: Solid Software Design

Software Design

Code is Design - Seminal Paper by Jack Reeves

http://www.developerdotstar.com/mag/articles/reeves_design.html

Page 4: Solid Software Design

What is Software Design

The source code is the design

Page 5: Solid Software Design

The root cause

Abandoned code rots

Page 6: Solid Software Design

The effect

The rotten code smells

Page 7: Solid Software Design

What is a Design Smell

A design smell is a symptom of the violation of design principles.

Page 8: Solid Software Design

How does it smell?

Page 9: Solid Software Design

Rigidity

The tendency for software to be difficult to change, even in simple ways. The design is hard to change.

Page 10: Solid Software Design

Fragility

The tendency of a program to break in many places when a single change is made. The design is easy to break.

Page 11: Solid Software Design

Immobility

It is hard to disentangle the system into components that can be reused in other systems. The design is hard to reuse.

Page 12: Solid Software Design

Viscosity - Software

Design -preserving methods vs. Hacks

Page 13: Solid Software Design

Viscosity - Environment

Slow and inefficient development environment like very long compile times, hours to check-in, several minutes to deploy

Page 14: Solid Software Design

Needless Complexity

Elements not currently needed in the design. Overdesign.

Page 15: Solid Software Design

Needless Repetition

The design contains repeating structures that could be unified under a single abstraction.

Page 16: Solid Software Design

Opacity

The tendency of a module to be difficult to understand.

Page 17: Solid Software Design

SOLID Design Principles help fix the smells.

Page 18: Solid Software Design
Page 19: Solid Software Design
Page 20: Solid Software Design

A class should have one, and only one, reason to change.

Page 21: Solid Software Design
Page 22: Solid Software Design

You should be able to extend a classes behavior, without modifying it.

Page 23: Solid Software Design
Page 24: Solid Software Design

Derived classes must be substitutable for their base classes.

Page 25: Solid Software Design
Page 26: Solid Software Design

Make fine grained interfaces that are client specific.

Page 27: Solid Software Design
Page 28: Solid Software Design

Depend on abstractions, not on concretions.

Page 29: Solid Software Design

References

1. Agile Principles, Practices, and Patterns by Robert Martin

2. SOLID Posters from http://lostechies.com

Page 30: Solid Software Design

Thank You!!