Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Building Frameworks With Patterns “An Active Object-Model For A Dynamic Web-Based Application”

Similar presentations


Presentation on theme: "1 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Building Frameworks With Patterns “An Active Object-Model For A Dynamic Web-Based Application”"— Presentation transcript:

1 1 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Building Frameworks With Patterns “An Active Object-Model For A Dynamic Web-Based Application”

2 2 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Presenters Joseph W. Yoder - Dragos Manolescu -

3 3 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Goals u u Have fun u u Learn a little about our framework u u Overview of patterns used in the framework u u See how to implement the patterns using Java

4 4 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Outline u u Project Overview u u Active Object-Model u u Overview of Frameworks u u Preview of Patterns in the Framework u u Architecture & Design of the Framework u u Patterns in the Framework u u Future Development u u Summary

5 5 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder 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 F F explicit object model that it interprets at run-time F F 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 6 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Purpose Of Project “On-line Registration” Develop reusable Software System to be used for on-line Conference Registration – –Customizable F F Different Reports F F Different databases F F Different Business Logic – –Composable

7 7 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Requirements: u u Web Access u u Easy to Use u u Secure u u Platform Independent u u Integration with Legacy Databases u u Robust

8 8 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder How to Develop “Reusable Software” Reusable software is hard to develop – –Generalize from examples – –Refactor to pull out common parts – –Develop special interface/language for specifying application

9 9 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder u u 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 u u 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 Johnson’s tutorial or see: or cat.ncsa.uiuc.edu/~yoder/Research/Frameworks cat.ncsa.uiuc.edu/~yoder/Research/FrameworksFrameworks

10 10 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Frameworks Encode Domain Knowledge u u Frameworks solve particular sets of problems. get different points of view explain/defend current design u u Some frameworks are more technology (horizontal) frameworks verses application domain (vertical) frameworks. Are we solving GUI’s, object persistence verses more application domain related such as insurance, medical, or manufacturing.

11 11 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Frameworks u u Framework is: reusable design of an application or subsystem represented by a set of abstract classes and the way objects in those classes collaborate. u u Use framework to build application by: Creating new subclasses Configuring objects together Modifying working examples

12 12 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Frameworks u u Framework prescribes how to decompose a problem. u u 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 13 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Relevant Principles u u Frameworks are abstractions: people generalize from concrete examples u u Designing reusable code requires iteration u u Frameworks encode domain knowledge u u Customer of framework is application programmer

14 14 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Generalize from Concrete Cases u u People think concretely, not abstractly. u u Abstractions are found bottom-up, by examining concrete examples. u u Generalization proceeds by finding things that are given different names but 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 15 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Finding Abstract Classes u u Abstract classes are discovered by generalizing from concrete classes. u u 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 16 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Frameworks Require Iteration Reusable code requires many iterations. Basic law of software engineering (Johnson’s law) If it hasn't been tested, it doesn't work. Corollary: software that hasn't been reused is not reusable.

17 17 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder 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 18 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder 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 Patterns for Developing Frameworks

19 19 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder 5) Pluggable Objects 6) Fine-grained Objects 7) Black-box Framework 8) Visual Builder 9) Language Tools Patterns for Developing Frameworks

20 20 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Mapping Objects To Persistence Pattern Language u u Persistence Layer u u CRUD u u SQL Code u u Attribute Mapping Methods u u Type Conversion

21 21 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder u u Changed Manager u u OID Manager u u Transaction Manager u u Connection Manager u u Table Manager Mapping Objects To Persistence Pattern Language

22 22 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Security Patterns

23 23 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Architecture u u To be presented by Dragos Manolescu – –http://www- cat.ncsa.uiuc.edu/~yoder/Research/PLoP/arch.htmlhttp://www- cat.ncsa.uiuc.edu/~yoder/Research/PLoP/arch.html

24 24 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Future Development u u Metadata stored in database u u Visual Builders and Editors u u Debugging Tools u u Distribution through CORBA etc

25 25 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Patterns used in the System u u GOF Patterns – –Strategy, State, Singleton, Composite, Factory Method, Prototype u u Layered Architecture u u Security Patterns – –Limited View, Single Access Point, Roles, Check Point, Session, Secure Access Layer u u Persistence Object Patterns – –Attribute Mapping Methods, Transaction Manager, OID Manager, Change Manager, CRUD, Type Conversion, Connection Manager, Table Manager, Persistence Layer u u Type-Object, Properties, Metadata u u Evolving Frameworks

26 26 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Summary u u We have developed a reusable design for on-line registration u u Patterns can be very useful for solving problems in your domain u u Frameworks take time to develop but the payoff can be tremendous

27 27 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Where to Find more Information u u u u u u u u u u u u

28 28 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder That’s All


Download ppt "1 Copyright 1998 by Dragos Manolescu and Joseph W. Yoder Building Frameworks With Patterns “An Active Object-Model For A Dynamic Web-Based Application”"

Similar presentations


Ads by Google