Lehrstuhl für Angewandte Softwaretechnik
Chair for Applied Software Engineering

 

Chapter 9: Object Design: Specifying Interfaces

 

plane 

 

Abstract

During object design, we identify and refine solution objects to realize the subsystems defined during system design. During this activity, our understanding of each object deepens: we specify the type signatures and the visibility of each of the operations, and, finally, we describe the conditions under which an operation can be invoked and those under which the operation raises an exception. As the focus of system design was on identifying large chunks of work that could be assigned to individual teams or developers, the focus of object design is on specifying the boundaries between objects. At this stage in the project, a large number of developers concurrently refines and changes many objects and their interfaces. The pressure to deliver is increasing and the opportunity to introduce new, complex faults into the design is still there. The focus of interface specification is for developers to communicate clearly and precisely about increasingly lower-level details of the system.

The interface specification activities of object design include

 

  • identifying missing attributes and operations
  • specifying type signatures and visibility
  • specifying invariants
  • specifying preconditions and postconditions.

In this chapter, we provide an overview of the concepts of interface specification. We introduce UML’s Object Constraint Language as a language for specifying invariants, preconditions, and postconditions. We discuss heuristics and stylistic guidelines for writing readable constraints. Finally, we examine the issues related to documenting and managing interface specifications.