Preliminary Design

Component Specification

Gerson Sunyé


  • Preliminary Design is the first step of software design.  

  • During this phase, a high-level design concept that  meets the requirement specification is created. 

  • The concept is expressed as a set of components with clear interfaces. 

Preliminary Design Goals

  • Establish the system boundaries.  

  • Define system and component interfaces. 

  • Define component scope and responsibilities.  

  • Specify desired component operations. 

Typical Deliverables

  • Component Diagram. 

  • Precise specification of interfaces: 

    • signatures, pre and post conditions. 

  • Interaction diagrams. 

  • State machines. 


  • A component is a coherent package of software that can be independently developed and delivered as a unit.

dictionary component
Figure 1. UML Component

Provided and Required Interfaces

A component has an explicit and well-specified interfaces of the: 
  • provided services; 

  • services expected from other components; 

  • Components use these interfaces to communicate with each other.

component interfaces
Figure 2. UML Component: Provided and Required Interfaces


  • Components can be combined with other components to provide and use services. 

  • Components are substitutable: one component can replace another at design time or at runtime, if the successor component meets the requirements of the initial one.

Component based Software Engineering example2
Figure 3. A simple example of UML components (by Cmendes at English Wikipedia)

Ports assemble Interfaces

  • A port represents an interaction point between a component and its environment. 

  • The nature of the interactions is specified by interfaces. 

component ports

Benefits of Components

Component based architectures promote: 
  • Reusability and reliability. 

  • Maintainability, modularity,  testability, flexibility, extensibility. 

  • Portability. 

Design Process

Design Process Steps

  1. Adopt the domain model as the initial class model. 

  2. Define the boundaries: 

    1. consider the system as a single component 

    2. specify the system behavior that would meet the requirements. 

  3. Decompose components recursively:

    1. approaches: structural and behavioral 

  4. Add technical components (database, user interface, middleware, etc.). 

  5. Use interactions to validate component interfaces. 

  6. Use state machines to specify classes. 

Adopt the domain model as the initial class model.

  • 1-1 correspondence often not possible

  • A model that gives best performance is often different from one that clearly explains what the object does.

Domain Model Partition

seminar system refinement

Domain Model Partition

seminar system components

Interactions (v1)

find dates interaction

Interactions (v2)

find dates interaction v2

Interface Specification

component planning

Parameter Type Specification

  • Internal classes 

  • Primitive types 

  • Datatypes

interface schedule

Operation Specification

interface schedule v2

Parameter Types

interface schedule v3

Precise Specification of Operations

modifyInstructor(instructor:String, name:String, phone: String)

pre: instructor.size() > 0 and (...)

pre: instructor.notEmpty() and (...)

pre: self.instructors->exists(id = instructor) and (...)

Execution Mode

interface execution model

Additional  Readings

Design patterns: 
  • Command. 

  • Façade. 

  • Data Transfer Object (DTO). 

Avoid Cycles

component dependency