Building Frameworks With Patterns - PowerPoint PPT Presentation

About This Presentation
Title:

Building Frameworks With Patterns

Description:

none – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 29
Provided by: joseph233
Category:

less

Transcript and Presenter's Notes

Title: Building Frameworks With Patterns


1
Building Frameworks With Patterns
  • An Active Object-Model For A Dynamic Web-Based
    Application

2
Presenters
  • Joseph W. Yoder -
  • j-yoder_at_uiuc.edu
  • http//www.uiuc.edu/ph/www/j-yoder
  • Dragos Manolescu -
  • manolesc_at_uiuc.edu
  • http//www.uiuc.edu/ph/www/manolesc

3
Goals
  • Have fun
  • Learn a little about our framework
  • Overview of patterns used in the framework
  • See how to implement the patterns using Java

4
Outline
  • Project Overview
  • Active Object-Model
  • Overview of Frameworks
  • Preview of Patterns in the Framework
  • Architecture Design of the Framework
  • Patterns in the Framework
  • Future Development
  • Summary

5
Active Object-Model(Dynamic Object-Model)
  • An ACTIVE OBJECT-MODEL is an object model that
    provides meta information about itself so that
    it can be changed at runtime
  • explicit object model that it interprets at
    run-time
  • change the object model, system changes its
    behavior
  • ACTIVE OBJECT-MODELS usually arise as
    domain-specific frameworks
  • Business rules can be stored in ACTIVE
    OBJECT-MODELS

6
Purpose Of ProjectOn-line Registration
  • Develop reusable Software System to be used for
    on-line Conference Registration
  • Customizable
  • Different Reports
  • Different databases
  • Different Business Logic
  • Composable

7
Requirements
  • Web Access
  • Easy to Use
  • Secure
  • Platform Independent
  • Integration with Legacy Databases
  • Robust

8
How to DevelopReusable Software
  • Reusable software is hard to develop
  • Generalize from examples
  • Refactor to pull out common parts
  • Develop special interface/language for specifying
    application

9
Frameworks
  • Interface design and functional factoring
    constitute the key intellectual content of
    software and are far more difficult to create or
    re-create than code.
  • Peter Deutsch
  • Difference between framework and component
    library for framework (components get plugged in
    and are concrete sub-classes that do all the
    work).
  • For detailed information about Frameworks attend
    Ralph Johnsons tutorial or see
  • http//st-www.cs.uiuc.edu/users/johnson/
  • or http//www-cat.ncsa.uiuc.edu/yoder/Research/F
    rameworks

10
Frameworks Encode Domain Knowledge
  • Frameworks solve particular sets of problems.
  • get different points of view
  • explain/defend current design
  • Some frameworks are more technology (horizontal)
    frameworks verses application domain (vertical)
    frameworks.
  • Are we solving GUIs, object persistence verses
    more application domain related such as
    insurance, medical,or manufacturing.

11
Frameworks
  • Framework is
  • reusable design of an application or subsystem
  • represented by a set of abstract classes and
    the way objects in those classes collaborate.
  • Use framework to build application by
  • Creating new subclasses
  • Configuring objects together
  • Modifying working examples

12
Frameworks
  • Framework prescribes how to decompose a problem.
  • Not just the classes, but the way instances of
    the classes collaborate.
  • shared invariants that objects must maintain, and
    how they maintain them
  • framework imposes a collaborative model that you
    must adapt to.

13
Relevant Principles
  • Frameworks are abstractions people generalize
    from concrete examples
  • Designing reusable code requires iteration
  • Frameworks encode domain knowledge
  • Customer of framework is application programmer

14
Generalize from Concrete Cases
  • People think concretely, not abstractly.
  • Abstractions are found bottom-up, by examining
    concrete examples.
  • Generalization proceeds by
  • finding things that are given different
    namesbut are really the same,
  • parameterizing to eliminate differences,
  • breaking large things into small things so that
    similar components can be found, and
  • categorizing things that are similar.

15
Finding Abstract Classes
  • Abstract classes are discovered by generalizing
    from concrete classes.
  • To give two classes a common superclass
  • give them common interface
  • rename operations so classes use same names
  • reorder arguments, change types of arguments,
    etc.
  • refactor (split or combine) operations
  • if operations have same interface but different
    implementation, make them abstract
  • if operations have same implementation, move to
    superclass

16
Frameworks Require Iteration
  • Reusable code requires many iterations.
  • Basic law of software engineering (Johnsons law)
  • If it hasn't been tested, it doesn't work.
  • Corollary software that hasn't been reused is
    not reusable.

17
White-box vs. Black-box
Black-box Customize by configuring Emphasize
polymorphism Must know interfaces Complex, harder
to design Easier to learn, requires less
programming. Harder to customize because you
need to learn how objects collaborate
  • White-box
  • Customize by subclassing
  • Emphasize inheritance
  • Must know internals
  • Simpler, easier to design
  • Harder to learn, requires more programming.
  • Easier to customize because you can overwrite the
    code

18
Patterns for Developing Frameworks
  • 1) Three Examples
  • 2) White-box Framework
  • 3) Component Library
  • Build applications and add components to library
  • 4) Hot Spots
  • Separate Changeable from Stable Code
  • Design Patterns

19
Patterns for Developing Frameworks
  • 5) Pluggable Objects
  • 6) Fine-grained Objects
  • 7) Black-box Framework
  • 8) Visual Builder
  • 9) Language Tools
  • http//st-www.cs.uiuc.edu/users/droberts/evolve.ht
    ml

20
Mapping Objects To Persistence Pattern Language
  • Persistence Layer
  • CRUD
  • SQL Code
  • Attribute Mapping Methods
  • Type Conversion

21
Mapping Objects To Persistence Pattern Language
  • Changed Manager
  • OID Manager
  • Transaction Manager
  • Connection Manager
  • Table Manager

22
Security Patterns
23
Architecture
  • To be presented by Dragos Manolescu
  • http//www-cat.ncsa.uiuc.edu/yoder/Research/PLoP/
    arch.html

24
Future Development
  • Metadata stored in database
  • Visual Builders and Editors
  • Debugging Tools
  • Distribution through CORBA etc

25
Patterns used in the System
  • GOF Patterns
  • Strategy, State, Singleton, Composite, Factory
    Method, Prototype
  • Layered Architecture
  • Security Patterns
  • Limited View, Single Access Point, Roles, Check
    Point, Session, Secure Access Layer
  • Persistence Object Patterns
  • Attribute Mapping Methods, Transaction Manager,
    OID Manager, Change Manager, CRUD, Type
    Conversion, Connection Manager, Table Manager,
    Persistence Layer
  • Type-Object, Properties, Metadata
  • Evolving Frameworks

26
Summary
  • We have developed a reusable designfor on-line
    registration
  • Patterns can be very useful for solving problems
    in your domain
  • Frameworks take time to develop butthe payoff
    can be tremendous

27
Where to Find more Information
  • http//www-cat.ncsa.uiuc.edu/yoder/Research/PLoP
  • http//www-cat.ncsa.uiuc.edu/yoder/Research/metad
    ata
  • http//st-www.cs.uiuc.edu/users/droberts/evolve.ht
    ml
  • http//www-cat.ncsa.uiuc.edu/yoder/papers/pattern
    s
  • http//hillside.net
  • http//st-www.cs.uiuc.edu/

28
Thats All
Write a Comment
User Comments (0)
About PowerShow.com