Introduction to Software Design and Architecture
Design
You design to mitigate risks. Design is the creative process of transforming a problem into a solution. It's the process of defining the architecture, components, interfaces and other characteristics of a system or component and the result of that process.
Objectives of Design
- Create design representations
- Evaluate construction alternatives
- Assess requirements satisfaction
- Assess feasibility
Key risks
- understanding problems
- large systems
- team work
- ensuring qualities
- evolution of systems
Evolution
- cost per line of code increases over time
- productivity per release goes down over time
Software Design Process
- Solution Postulation
- problem (requirements, constraints)
- diversification (enumeration of alternatives)
- convergence (choice of the alternative that better satisfies requirements)
- problem (requirements, constraints)
- Solution representation
- Solution Elaboration
Design Strategies
- Decompositional
- break the problem down
- Compositional
- look at the problem as a whole
- Template-based
- look for a common pattern
Representation of Design Decisions
- code
- text
- modelling language
Why Model?
- Capture Ideas
- Share
- Validate
- Track
Architectural Design
- addresses architectural significant requirements
How much design?
Big Design Up Front (BDUF)
- issues found before implementation
- commits too early
- produces heavy documentation
Emergent Design
- simpler, just enough design
- adapts to changing requirements
- technical debt (cost)
Rough Up-Front Design (RUFD)
- avoids issues with BDUF and Emergent Design
- based on good prioritization
Principles
- Frameworks
- Patterns
- Principles
Abstraction Principle
- Create abstractions for repeated things
- Factor in commonalities
- Abstract out varying parts
- Don't Repeat Yourself (DRY) Principle
Modularity
- Division in components
- Cohesion
- Coupling
Separation of Concerns
- Allocate different concerns to different modules
- separation of policy and mechanism
- separation of interface and implementation