4.1 Software Design Concepts
Software Design is the engineering phase that transforms the customer requirements defined in the SRS into a concrete technical blueprint for implementation. Key principles include:
- Abstraction: Exposing only conceptual essentials while suppressing underlying algorithmic or data structure details.
- Modularity: Decomposing a large monolithic system into discrete, independently compilable, and testable modules.
- Software Architecture: The macro-structure of components, relationships, and design constraints that ensure conceptual integrity.
- Stepwise Refinement: A top-down decomposition strategy proposed by Niklaus Wirth, successively breaking high-level statements into detailed procedural steps.
- Information Hiding: Modules communicate solely via published interfaces, making internal data structures and algorithms inaccessible to outside components.
4.2 Coupling and Cohesion: The Cardinal Quality Spectrum
The fundamental benchmark of architectural excellence is: High Cohesion within modules and Low Coupling between modules.
- Coupling: Measures the degree of interdependence between two modules. Low coupling is desirable so that changes to one module do not break others.
- Cohesion: Measures the degree of functional relatedness among elements within a single module. High cohesion ensures a module focuses exclusively on one dedicated task.
Figure 4.1: Software systems strive for the upper right: lowest coupling (Data Coupling) and highest cohesion (Functional Cohesion).
4.3 Architectural Design (Layered N-Tier Architecture)
Architectural design structures the high-level subsystems of an enterprise application. The most pervasive archetype is Layered (N-Tier) Architecture, where each layer depends strictly on the layer immediately beneath it.
Figure 4.2: In N-Tier layered systems, each tier isolates concerns and exposes clean service contracts to the tier above.
4.4 Structured Design vs Object-Oriented Design
Two major paradigms govern software design:
- Structured Design (Function-Oriented): Employs a top-down algorithmic approach. System behavior is decomposed into functional modules using Structure Charts and DFDs. Data is decoupled from functions, which risks global side effects in complex systems.
- Object-Oriented Design (OOD): Models the system as collaborating entities encapsulating both state and behavior. Uses UML diagrams to model classes, associations, and dynamic message sequences, yielding high maintainability and reuse.
4.5 UML Diagrams (Use Case & Structural Modeling)
The Unified Modeling Language (UML) is the industry-standard visual specification language for software systems. It encompasses structural diagrams (Class, Component, Deployment) and behavioral diagrams (Use Case, Sequence, Activity, State Machine).
Figure 4.3: UML Use Case diagram mapping primary actors (Customer, Admin) to functional use case boundaries.