i.what ii.when iii.how iv.why metadata architectures are adaptive program frameworks built using a...

25

Upload: lauren-hawkins

Post on 20-Jan-2018

214 views

Category:

Documents


0 download

DESCRIPTION

Metadata architectures are adaptive program frameworks built using a new software design methodology. Metadata architectures enable the end-user to dynamically change the behavior of the program without changing its code [Lie96, Foo98]. I.WHAT [1] Lieberherr, K. J. Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns. PWS Publishing Company, [3] Foote, B., and J. W. Yoder. “Metadata and Active Object-Models.” Technical Report, WUSC-98-25, Department of Computer Science, Washington University, 1998.

TRANSCRIPT

Page 1: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…
Page 2: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

I. WHAT

II. WHEN

III. HOW

IV. WHY

Page 3: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Metadata architectures are adaptive program frameworks built using a new software design methodology. Metadata architectures enable the end-user to dynamically change the behavior of the program without changing its code [Lie96, Foo98].

I. WHAT

 

[1]    Lieberherr, K. J. Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns. PWS Publishing Company, 1996.

[3]     Foote, B., and J. W. Yoder. “Metadata and Active Object-Models.” Technical Report, WUSC-98-25, Department of Computer Science, Washington University, 1998.

Page 4: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Framework - A framework is a reusable design expressed as a set of abstract classes and the way their instances collaborate. It is a reusable design for all or part of a software system.

Example GUI framework

I. WHAT

 

[1]    Lieberherr, K. J. Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns. PWS Publishing Company, 1996.

[3]     Foote, B., and J. W. Yoder. “Metadata and Active Object-Models.” Technical Report, WUSC-98-25, Department of Computer Science, Washington University, 1998.

Page 5: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

I. WHAT

Metadata architectures are thus frameworks (reusable design of collaborating instances) that adapt at run time to new user requirements.

They accomplish this with structures, constraints, rules, and other programming constructs.

They are a different level of abstraction.

Page 6: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

I. WHAT

More difficult to build and understand.

Less code than traditional programs.

Relies heavily on dynamic programming language with reflective capabilities.

Page 7: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

MetaData Program

Family of Programs

Page 8: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

MetaData Program - GUI

Family of Views (screens)

Infinitely many XML class structures for different GUI screens

Page 9: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

II. WHEN

AnalysisDesign

Implementation

Page 10: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Traditional Analysis – identify customer domain entities.Metadata Analysis – additionally we need to:

1. Identify those entity or entity characteristics which will require adaptation during the entities life cycle.

2. Define a KNOWLEDGE level for those entities that allows the easy adaptation of their values/procedures.

HOW

Page 11: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Simple Example: Traditionally, we encoded code table values in the code as constants.

CityValues.add (Tallahassee) CityValues.add (Appalachacola)

…….Each time we added a code table value, NewCity, etc. we had to change the code and add another value.

We learned to make a table contining these code values and allow the user to add code table values. Thus the code table became metadata to the program.

HOW

Page 12: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Code alues first attempt at building metadata architectures.Business rules another attempt.

Example – insurance business rule:if home = brick reducePremium (.001)if fireDepartdistance < 1.0 reducePremium (0.0005)if homeZipCode in hurricaneSet (increasePremium

(0.01)

We can build a metadata class containing the reduction rates or values needed to implement the rules. (example

type of construction – brick - .001, stucco - .0005, etcfireDepartmentdistance <=1 - .00005, >1<10

- .00002, etchomeZipcode hurricaneSet – 0.01, tornadoSet – 0.005

HOW

Page 13: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Yet another technique used in building metadata arch is using polymorphism to implement adaptive behavior code.

We define the different behavior as subclasses, include the name of the class as the metadata. Then we make an instance of the needed class AT RUN TIME using a technique called “reflection”.

Using the CLASS class, we use methods such as forName to implement the needed behavior

HOW

Page 14: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

How does this work?Example: ONLY ONE GUI program is needed for all screens AND use metadata that allows us to execute 420 simple entry GUIs needed for a system.

Example: We define ONLY ONE Servlet or ASP or .net Application for a typical CRUD applications using metadata to execute over 300 application programs.

Example: We define ONLY ONE Case Based Reasoner and implement it with metadata as a reasoner in various domains such as packet sniffing, facial recognition with nodals, or medical diagnostics.

HOW

Page 15: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Attribute Phenom Type Size Validator Min Max Error Table Label

DOB Date String 8 DateRange Invalid Date Date of Birth

Shoesize Shoesize Integer 2 Range 0 15 Valid Size is between 0 and 15 Size of Shoe

SSN FedID String 9 Numeric SSN is 9 digits 0 to 9 Social Security Number

Entry Date

Date String 8 Current+ Date must be greater than current date

Date of Entry to University

Gender Gender String 1 Gender must be in “Gender” table

Gender Gender

ZipCode ZipCode String 9 Discrete Zip Code must be in ZipCode Table

ZipCode Zip Code

Classification

Classification

String 1 Discrete Classification must be in Classification Table

Classification

Classification

Deposit Money Real 6.2 Range 1.00 2000.00

Deposits must be more than 1.00 and less than 2000.00

Deposit Amount

Student Last Name

Name String 20 Alpha Name must be only alphabetic characters

Student Last Name

HOW

Page 16: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

HOW

ScreenDemographic124 = Name + DOB

Attribute Position

Name 5,30

DOB 5,70

Attribute

Name

DOB

Page 17: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

HOWAttribute Position

Student Last Name 5,30

DOB 5,70

Entry

Screen

Attribute Phenom Type Size

Validator Min

Max Error Table Label

DOB Date String 8 Date Invalid Date Date of Birth

Shoesize Shoesize Integer 2 Range 0 15 Valid Size is between 0 and 15

Size of Shoe

SSN FedID String 9 Numeric SSN is 9 digits 0 to 9 Social Security Number

Entry Date

Date String 8 Current+ Date must be greater than current date

Date of Entry to University

Gender Gender String 1 Gender must be in “Gender” table

Gender Gender

ZipCode ZipCode String 9 Discrete Zip Code must be in ZipCode Table

ZipCode Zip Code

Classification

Classification

String 1 Discrete Classification must be in Classification Table

Classification

Classification

Deposit Money Real 6.2 Range 1.00

2000.00

Deposits must be more than 1.00 and less than 2000.00

Deposit Amount

Student Last Name

Name String 20 Alpha Name must be only alphabetic characters

Student Last Name

ScreenDemographic124

Classes

Page 18: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

Validator 

Range 

Discrete 

Alphabetic ….

Classes

Attribute Phenom Type Size

Validator Min

Max Error Table Label

DOB Date String 8 Date Invalid Date Date of Birth

Shoesize Shoesize Integer 2 Range 0 15 Valid Size is between 0 and 15

Size of Shoe

SSN FedID String 9 Numeric SSN is 9 digits 0 to 9 Social Security Number

Entry Date

Date String 8 Current+ Date must be greater than current date

Date of Entry to University

Gender Gender String 1 Gender must be in “Gender” table

Gender Gender

ZipCode ZipCode String 9 Discrete Zip Code must be in ZipCode Table

ZipCode Zip Code

Classification

Classification

String 1 Discrete Classification must be in Classification Table

Classification

Classification

Deposit Money Real 6.2

Range 1.00

2000.00

Deposits must be more than 1.00 and less than 2000.00

Deposit Amount

Student Last Name

Name String 20 Alpha Name must be only alphabetic characters

Student Last Name

HOW

Page 19: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

              

 

$$$$$$$$$

WHY

Page 20: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

              

  AOM – Adaptive Object ModelElements:

MetadataType of Objects (TO)Meta Types of Objects (TO2)ER ModelsRule ObjectsInterpreters/BuildersEditors,/ GUIs

i.e. REFLECTIVE ARCHITETURE i.e. METADATA ARCHITECTURE

Page 21: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

              

  Examples of Patterns used in MetaData Architectures:

1. Party2. Accountability3. Observation4. Inventory5. Accounting6. Trading7. Contracts8. Facades

Page 22: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

PartyType

Party 

1

0..M1

1

              

 

Knowledge level

Operational level

Person 

Organization 

Post (appointments)

 

John Doe FSU Dean

Party Type ObjectRecord Min Max TableStudent Person StudentRecordUniversity Organization University UniversityT

1. Party Pattern

Page 23: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

AccountabilityType

Accountability 

1

0..M1

1

              

 

Knowledge level

Operational level

Person is Dean of a Campus

Accountability Related Types ObjectRecord Actions Time PeriodManager of Person, department manages hires, fires begin end

Person, campus manages hires,fires begin endEnrolls in Person, class enrollment add,drop semesterAccepts in Person, campus accepts applies,… semester

Person, department accepts applies,… semester

2. Accountability Pattern

Person works for a Department

Page 24: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

              

  3. Observation Pattern

Knowledge level

Operational level

PhenomenonType

1

Phenomenon

1

Observation

0..M1

1

0..M

Observation Type DataType Validator Min Max Table Label ErrorMessage

Show size Showsize Integer Range 4 20 Show Size Range is from 0 to 15Hair color Haircolor String Discrete HairTable Hair Color Color Must be ……Name Personname String Null Name

0..M1

Page 25: I.WHAT II.WHEN III.HOW IV.WHY Metadata architectures are adaptive program frameworks built using a new…

              

  Anything you can do I can do

better

meta………