Software Design

Design bridges requirements and coding. Engineers map business logic to structural components. You define interfaces, data models, and algorithms. Good design minimizes complexity. It enables developers to build features without breaking existing functionality.

Design Patterns

Patterns solve common codebase problems. They standardize code structure across projects. Engineers recognize patterns and understand the underlying intent.

Relationship to Requirements

Design defines the solution. Compare this to Requirements Engineering, which defines the problem. A solid design transforms abstract goals into concrete development tasks.

GRASP Principles

These are nine principles that are meant to guide object-oriented software design.

Information Expert: The object that has the information needed to perform a task is the Information Expert, and should be responsible for that task.

Low Coupling: Objects should be loosely coupled so that changes to one don't affect the others.

High Cohesion: A class's properties and methods should all be highly related to each other and aligned towards a common purpose.

Creator: A class that is responsible for creating other objects should be the one that has the most knowledge about those objects.

Controller: Use a dedicated controller class to handle coordination between other classes and user input.

Pure Fabrication: Create classes outside of domain model classes that are responsible for handling behavior outside of the domain model. Controllers are a type of pure fabrication class, since they have no real-world or domain equivalent.

Indirection: Create an intermediate class to handle mediation between two classes in order to reduce coupling.

Polymorphism: Responsibility for defining the variation of behavior based on type should be given to the class for which the variation happens.

Protected Variations: Identify points of instability or variation in the system and wrap them with interfaces or abstractions. Use polymorphism to create implementations of those interfaces/abstractions.