The Unified Modeling Language User Guide - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

The Unified Modeling Language User Guide

Description:

Seam(Webster's)-The line of junction of 2 edges. ... Seams represent lines of demarcation between the various software components. ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 12
Provided by: Don168
Category:

less

Transcript and Presenter's Notes

Title: The Unified Modeling Language User Guide


1
The Unified Modeling Language User Guide
  • Chapter 11
  • Interfaces, Types and Roles

2
Chapter 11 Topics
  • Terms and concepts
  • Seams
  • Common modeling techniques
  • Static and dynamic type checking

3
Terms and Concepts
  • An interface is a collection of operations that
    are used to specify a service of a class or
    component.
  • A class may have multiple interfaces.
  • Each interface portrays the class is a particular
    role.
  • Interfaces are used to manage complexity by
    providing a simplified view of the implementation
    class.
  • Interfaces separate the specification and the
    implementation of a component.

4
Terms and Concepts
  • Graphically, an interface is a circle with a line
    running to the implementation class.
  • An interface my optionally be a class icon with
    an ltinterfacegt stereotype.
  • Interfaces have no attributes other than a
    pointer to the implementation class.
  • Each interface has a(n)
  • Name - a textual string used for identification.
  • Operations - behaviors of the interface that, if
    shown, appear in a stereotyped class icon.

5
Terms and Concepts
  • Each interface has a(n) continued
  • Relationships - Since an interface is a kind of
    class, it may participate in the same
    relationships as any other class.
  • Role (implicit) - The face that an abstraction
    presents to the world. Interface names can be
    used to qualify role names on associations
    involving the implementation class - role
    SpecifierClass. (see figure 11-5, page 162)
  • A class may use the stereotype lttypegt.
  • Type classes are the same as interfaces except
    that they may contain attributes.

6
Realizations
7
Roles
8
Seams
  • Seam(Websters)-The line of junction of 2 edges.
  • Interfaces are used to model the seams of a
    system composed of software components.
  • Seams represent lines of demarcation between the
    various software components.
  • Seams (interfaces) provide well defined paths of
    communication between the software on either side
    of the line.
  • As long as the interfaces remain constant, the
    implementation classes on either side of a seam
    may be freely changed.

9
Common Modeling Techniques
  • To model the seams in a system -
  • Given the set of all classes in a system,
    identify subsets of classes that are tightly
    coupled.
  • Tightly coupled classes interact extensively
    (collaborate) with each other to carry out a
    particular functionality.
  • Identify the operations that cross the various
    collaboration boundaries.
  • Package logically related sets of these
    operations as interfaces.
  • For each collaboration, identify the interfaces
    it relies on (imports) and those it provides to
    others (exports).
  • Imports are modeled as dependency relationships
  • Exports are modeled as realization relationships.

10
Modeling System Seams
11
Static and Dynamic Type Checking
  • Technically, once and object is created its type
    cannot be changed.
  • Interfaces allow the implementation class to
    assume a variety of roles.
  • This gives the illusion that an object of the
    implementation class can dynamically change its
    type to match the role it is assuming.
  • Sometimes it is useful to model these type
    changes using an interaction diagram.
  • See figures 11-7 and 11-8 on page 166.
Write a Comment
User Comments (0)
About PowerShow.com