Solid Software Design

Preview:

DESCRIPTION

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

Citation preview

SOLID Software Design

Abbas Raza

Software Design

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

Software Design

Code is Design - Seminal Paper by Jack Reeves

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

What is Software Design

The source code is the design

The root cause

Abandoned code rots

The effect

The rotten code smells

What is a Design Smell

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

How does it smell?

Rigidity

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

Fragility

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

Immobility

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

Viscosity - Software

Design -preserving methods vs. Hacks

Viscosity - Environment

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

Needless Complexity

Elements not currently needed in the design. Overdesign.

Needless Repetition

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

Opacity

The tendency of a module to be difficult to understand.

SOLID Design Principles help fix the smells.

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

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

Derived classes must be substitutable for their base classes.

Make fine grained interfaces that are client specific.

Depend on abstractions, not on concretions.

References

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

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

Thank You!!

Recommended