CS 691z / 791z Topics on Software Engineering - PowerPoint PPT Presentation

About This Presentation
Title:

CS 691z / 791z Topics on Software Engineering

Description:

Topics on Software Engineering. Chapter 17: Interfaces and ... Techniques for finding interfaces in a designed system or subsystem: Challenge each association ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 20
Provided by: cse52
Learn more at: https://www.cse.unr.edu
Category:

less

Transcript and Presenter's Notes

Title: CS 691z / 791z Topics on Software Engineering


1
CS 691z / 791zTopics on Software Engineering
  • Chapter 17 Interfaces and Subsystems
  • Arlow Neustadt, 2002
  • March 6, 2007

2
Outline
  • Interfaces and subsystems
  • Introduction
  • Interfaces and component-based development
  • Finding interfaces
  • Subsystems and interfaces
  • Advantages and disadvantages of interfaces

3
Interfaces Introduction
  • Chapter 17 roadmap, Fig. 17.1 Arlow Neustadt,
    2002

4
Interfaces .Introduction..
  • An interface specifies a named set of operations
  • It defines a contract to be implemented by a
    classifier
  • It also separates specification from
    implementation
  • If the classifier that realizes (implements) the
    interface is physically packaged in a subsystem
    or component and the interface is public in this
    subsystem or component, then the subsystem or
    component also realizes the interface

5
Interfaces ..Introduction.
  • Interfaces allow design to contract as compared
    to design to implementation supported by
    classes
  • Each operation in an interface must have a
    complete operation signature (name, types of all
    parameters, and return type), semantics (recorded
    as text or pseudo-code) and, optionally, a
    stereotype and set of constraints
  • Interfaces may not have
  • Attributes
  • Operation implementations
  • Relationships navigable from the interface

6
Interfaces Introduction
  • UML interface syntax, Fig. 17.2 Arlow
    Neustadt, 2002

7
Interfaces and Component-based Development.
  • Interfaces are key elements for component-based
    development
  • They allow addition of plug-in parts (with
    varied implementations) without changing the
    specification
  • Both with components and subsystems, interfaces
    support low coupling and provide high
    architectural flexibility

8
.Interfaces and Component-based Development
  • Example of interface, Fig. 17.3 Arlow
    Neustadt, 2002

9
..Interfaces and Component-based Development..
  • Example of interfaces
  • and subsystems
  • Fig. 17.4 Arlow
  • Neustadt,2002

10
Interfaces and Component-based Development.
  • Another example of interface, Fig. 17.5 Arlow
    Neustadt, 2002

11
. Interfaces and Component-based Development
  • Interfaces in Java the
  • collection classes
  • Fig. 17.6
  • Arlow Neustadt,2002

12
Finding Interfaces
  • Techniques for finding interfaces in a designed
    system or subsystem
  • Challenge each association
  • Challenge each message sent
  • Factor out groups of operations reusable
    elsewhere
  • Factor out sets of operations that repeat in
    classes
  • Look at classes that have similar roles in the
    system
  • Consider future extensions

13
Subsystems..
  • Subsystems are packages stereotyped ltltsubsystemgtgt
  • They are used both in design and implementation
  • Design subsystems contain
  • Design classes and interfaces
  • Use case realizations
  • Other subsystems
  • Specification elements such as use cases
  • Subsystems are used to
  • Separate design concerns
  • Represent large-grained components
  • Wrap legacy systems

14
.Subsystems.
  • Alternatives for drawing subsystems
  • Fig. 17.7 Arlow Neustadt, 2002

15
..Subsystems
  • More detailed representation of a subsystem
  • Fig. 17.8 Arlow Neustadt, 2002

16
Subsystems and Interfaces..
  • By introducing public interfaces in subsystems
    many of the classes in the subsystems could be
    hidden. As such subsystems could act as black
    boxes.
  • Using interfaces in a subsystem is different from
    listing subsystem operations (see Figure 17.8).
    In the latter case, public classes must realize
    the operations.
  • When a class of a subsystem realizes an
    interface, the subsystem realizes that interface
  • A subsystem that provides a set of services by
    realizing one or more interfaces can be seen as a
    component

17
.Subsystems and Interfaces.
  • Example of subsystems that realize interfaces
  • Fig. 17.9 Arlow Neustadt, 2002

18
..Subsystems and Interfaces
  • Physical architecture and the layering pattern,
    Fig. 17.10
  • Arlow Neustadt, 2002

19
Advantages and disadvantages of interfaces
  • Designing with interfaces increases flexibility
    and extensibility
  • Also, using interfaces supports low coupling by
    reducing the number of dependencies between
    classes, subsystems and components
  • With interfaces, a model can be neatly separated
    in cohesive subsystems
  • Drawbacks of interfaces relate to added
    complexity and increased performance costs
  • As a guideline, use interfaces for the more
    fluid parts of the system and dispense of them
    for the more stable parts of the system
Write a Comment
User Comments (0)
About PowerShow.com