cs2340: Framework Design - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

cs2340: Framework Design

Description:

Building Application Frameworks: Object-Oriented Foundations of Framework Design; ... Lighter Overviews. Wikipedia's 'Software Frameworks' ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 22
Provided by: joche1
Category:

less

Transcript and Presenter's Notes

Title: cs2340: Framework Design


1
cs2340 Framework Design
  • Summer 2007

2
References
  • Building Application Frameworks Object-Oriented
    Foundations of Framework Design Mohammed Fayed,
    Douglas Schmidt, Ralph Johnson Wiley 1999
  • Framework-Based Software Development in C
    Gregory Rodgers Prentice Hall 1997

3
Lighter Overviews
  • Wikipedia's "Software Frameworks"
  • http//www.wikipedia.org/wiki/Software_framework
  • Evolving Frameworks, Roberts Johnson
  • http//st-www.cs.uiuc.edu/users/droberts/evolve.ht
    ml
  • ACM Crossroads
  • http//www.acm.org/crossroads/xrds7-4/frameworks.h
    tml

4
Definition-What is a framework?
  • A set of classes that embodies an abstract design
    for solutions to a family of problems (Brian
    Foote)
  • A reusable design that describes how system in
    decomposed into objects.
  • A class library that captures interaction
    patterns between objects.
  • A set of abstract and concrete class
  • A skeleton application that can be fleshed out by
    developers

5
Examples
  • SUnit
  • Java Swing
  • .Net Framework
  • Game Development Engines (XNA)
  • Windows Workflow Framework
  • Windows Communication Framework

6
Frameworks vs. Design Patterns
  • Both let you reuse design, but frameworks
  • include code
  • include many more classes
  • are not as widely reusable
  • are more pragmatic, less abstract
  • may be made up of many design patterns

7
vs. Applications
  • Both include code, but frameworks
  • Have loose ends that need instantiating
  • Are MUCH more expensive to develop
  • But are reusable within application domains

8
vs. Libraries
  • Frameworks are like libraries except
  • They use inheritance more heavily
  • They evolve more quickly
  • They are often modified on the spot if they are
    not quite right
  • They have a more plug-in feel
  • They include dynamic flow rather than simply
    reusable classes

9
Framework Issues (Development or Using)
  • Development Complexity (Build vs Buy)
  • Learning Curve (Usability)
  • Extensibility
  • Maintainability
  • Validation
  • Efficiency
  • Composition

10
Framework Design Issues
  • KISS Keep it simple (7 /- 2 Rule)
  • May use cliques (mini-frameworks) GUI vs. Drawing
  • Help user be productive quickly
  • Identify tools for task (Internal vs. External)
  • Use real-world knowledge to speed understanding
  • Be consistent
  • Dont make things almost the same (aStreamgtgtdoc
    aStreamgtgtdec)

11
Framework design issues
  • Design to prevent user errors (i.e. Adopt/Orphan
    naming conventions)
  • Have default behavior
  • Be modeless
  • Provide immediate and reversible results
  • Have documentation
  • Especially interactions
  • Framework not equal to Class Library

12
Framework Design
  • Frozen spots the implemented architecture
    components and connections (existing classes to
    reuse directly)
  • Hot spots the locations where users are expected
    to extend and modify framework. (Abstract classes
    to implement yourself)

13
Hotspots
14
Framework Design Parts
  • Hot Spots/Frozen Spots for components
  • Backbone for the control and dynamic interaction
  • Backbone not modified by users/developers

15
Framework Development
  • Domain Analysis
  • Architectural Design
  • Framework Design
  • Framework Implementation
  • Framework Testing
  • Documentation

16
Domain Analysis
  • Context Analysis
  • Abstraction Modeling
  • Domain Architecture (Clustering)
  • Basically we want to figure out important
    concepts and their relationships. Then we
    prepare models that are used in later parts of
    the design. Focus is on the problem space and
    problem category.

17
Architectural Design
  • Frequently uses
  • Layers
  • Roles
  • Transfer Domain Architecture into something that
    can be implemented, tested, extended and
    maintained.
  • Enforcing constraints via the architecture can be
    challenging.

18
Case study of a framework
  • xUnit unit testing frameworks
  • Domain analysis
  • What are concepts in domain of testing?

Test Case Test Suite Test Fixture Test Check Test
Result Something to run the tests
19
xUnit Architecture
20
xUnit Framework Design Patterns
TestCase uses the Command Pattern,
implements abstract run interface. Run is a
Template Method Pattern run setUp
runTest tearDown TestSuite Composite
Pattern
21
Class Exercise
  • Designing a Framework for final project
  • Looking at Chart Widget
Write a Comment
User Comments (0)
About PowerShow.com