Framework Design by Systematic Generalization - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Framework Design by Systematic Generalization

Description:

Framework design requires a great deal of experience and experimentation ... Description: more facilities to compose a document ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 36
Provided by: jian6
Category:

less

Transcript and Presenter's Notes

Title: Framework Design by Systematic Generalization


1
Framework Design by Systematic Generalization
  • Jian Tang
  • CSCE 896
  • Software Framework and Architecture

2
Overview
  • Introduction
  • Framework Design Activities
  • Summary

3
Introduction
  • Framework Domain
  • Hot spot VS. Frozen spot
  • Framework design requires a great deal of
    experience and experimentation
  • Flexibility and Variability
  • 3 heuristics
  • start with a fixed application
  • work on different variable aspects at one time
  • capture and specify the degree of variability and
    flexibility

4
Framework Design Activities
  • Create Class Model of Fixed Application
  • Hot-Spot high-Level Analysis
  • Detail Analysis and Specification of Hot-spots
  • High-Level design of Hot-Spot Subsystem
  • Transform Class Model by Generalization with
    Hot-Spot Subsystem

5
Step1 Create Class Model of Fixed Application
  • Class Model
  • fixed entities
  • fixed relationship
  • Example
  • Editor
  • Class diagram in next page

6
Step1 Create Class Model of Fixed Application
(Contd)
  • Class Diagram of Editor

7
Hot Spots
  • Characteristics
  • Name
  • Description
  • Responsibility
  • Concrete examples
  • Variability
  • Parameterization
  • Granularity
  • Multiplicity
  • Binding time

8
Step 2 3 Hot Spot Analysis
  • All variables from the framework domain
  • Hot Spot high-level analysis
  • collects all hot spots
  • Hot spot detail analysis
  • create hot spot specification for each hot spot

9
Step 2 Hot-Spot High-level Analysis
  • Identify and collect all hot spots
  • overview of all variability and flexibility
  • Editor
  • Other Elements besides texts (hs1)
  • other composition facilities (hs2)
  • different formatting algorithms (hs3)
  • portability(hs4)
  • variable application window embellishment (hs5)
  • look-and-feel standards(hs6)

10
Step 3 Hot-Spot Detail Analysis and Specification
  • Do separately for each hot spot
  • Describe its characteristics
  • Partition to elementary HS
  • Examples in next page

11
Hot-Spot Detail Analysis and Specification (HS1)
  • HS1 Variability of basic document elements
  • Description other elements besides characters
  • Responsibility print, width, height
  • Concrete examples graphics, raster pic,
    character
  • Variability same interface, different
    implementation
  • Parameterization no
  • Granularity elementary
  • Multiplicity one
  • Binding time runtime

12
Hot-Spot Detail Analysis and Specification (HS2)
  • HS2 Variable aggregation of document elements
  • Description more facilities to compose a
    document
  • Responsibility basic plus aggregation-related
    responsibility
  • Concrete examples row, column
  • Variability variable hierarchy of aggregation
  • Parameterization no
  • Granularity elementary
  • Multiplicity n
  • Binding time runtime, multiple times

13
Hot-Spot Detail Analysis and Specification (HS3)
  • HS3 Variability of formatting algorithms
  • Description different algorithms
  • Responsibility format a document on a service
    request
  • Concrete examplesdifferent algorithms
  • Variability different algorithms can be used
  • Parameterization no
  • Granularity elementary
  • Multiplicity 1
  • Binding time runtime, multiple times

14
Hot-Spot Detail Analysis and Specification (HS4)
  • HS4Variability of window system
  • Description portable in different window systems
  • Responsibility drawing operations, iconify,
    resize
  • Concrete examples Mac, PM, Windows
  • Variability can be used in different window
    system
  • Parameterization no
  • Granularity elementary
  • Multiplicity 1
  • Binding time creation time

15
Hot-Spot Detail Analysis and Specification (HS5
HS6)
  • HS5Variability of user interface embellishments
  • Description different window embellishments
  • Variability attach different decorations to
    object
  • Multiplicity n
  • Binding time creation time
  • HS6Variability of look-and-feel standards
  • Description different look-and-feel standards
  • Variability create object from different classes
  • Multiplicity 1
  • Binding time creation time

16
Step 4 High-level Design of Hot-Spot Subsystem
  • Hot Spot Subsystem
  • base class (typically, abstract)
  • common R for all HS alternatives
  • concrete derived class
  • one of the instance
  • possibly, additional classes and relationship
  • Hot spot Subsystem design
  • derives the high-level design of a hot-spot
    subsystem from the hot-spot specification

17
Hot Spot Subsystem
  • How to introduce variability and flexibility
  • Inheritance
  • Inheritance-based hot spot subsystem
  • aggregation
  • Composition-based hot spot subsystem

18
Inheritance-based hot spot sub-system and
composition-based sub-system
  • Inheritance-based Vs. Composition-based

19
Hot Spot Subsystem
  • Three categories
  • Nonrecursive
  • service provided from one subclass object.
  • Pattern Ex. Strategy
  • 11 (chain-structured) recursive
  • service provided by n chained subclass objects
  • Pattern Ex. Decorator
  • 1n (tree-structured) recursive
  • service provided by a tree of n subclass objects
  • Pattern Ex. Composite

20
Hot Spot Subsystem (contd)
  • Diagrams for three categories

21
Hot Spot Subsystem (contd)
  • Diagrams for three categories (contd)

22
Hot Spot Subsystem (contd)
  • Design patterns
  • describe typical, common and frequently observed
    relationships among classes.
  • Characteristics
  • provide a different kind of variability and
    flexibility
  • center around a base class and subclass
  • some contains additional classes
  • Get a clue?
  • Structuring a hot-spot system following a design
    pattern

23
Hot Spot Subsystem High-level Design
  • Derives the high-level design of a hot-spot
    subsystem from the hot-spot specification
  • Hot-spot specification
  • description of variable aspects
  • multiplicity
  • kind of variability
  • select appropriate design pattern
  • examples in next page

24
Hot Spot Subsystem High-level Design (contd)
  • Examples of hot spot subsystem HL design
  • HS1
  • Multiplicity 1 gt Nonrecursive DP
  • Variability common interface with different
    implementationsgtInterface Inheritance Pattern
  • HS2
  • Multiplicity n gt 1n recursive DP
  • Variability flexible hierarchical aggregation gt
    Composite Pattern

25
Step 5 Generalization Transformation
  • Transforms the framework class structure and
    generalizes it with regard to one aspect
  • Transform frozen spot to hot spot subsystem
  • replace fixed, specialized class with hot spot
    subsystem.

26
Expanding VS. Extending
  • Expanding transformation
  • the base class of the HS subsystem is introduced
    as a new class
  • Extending transformation
  • the responsibility of an existing class is
    extended by the responsibility of the base class

27
Expanding Transformation
  • Example (HS1)

28
Extending Transformation
  • Example (HS2)

29
Transformations Generalizing the Editor
  • Introducing Hot spot 4

30
Transformations Generalizing the Editor
  • Introducing hot spot 1

31
Transformations Generalizing the Editor
  • Introducing hot spot 2

32
Transformations Generalizing the Editor
  • Introducing hot spot 5

33
Transformations Generalizing the Editor
  • Introducing hot spot 6

34
Transformations Generalizing the Editor
  • Introducing hot spot 4

35
Summary
  • 5 activities
  • Review 3 important phases
  • Hot spot specification
  • Hot spot subsystem high-level design
  • Transformations
Write a Comment
User Comments (0)
About PowerShow.com