22
Generating Enterprise Applications from Models Vinay Kulkarni, R Venkatesh, Sreedhar Reddy Tata Research Development and Design Centre, Pune, INDIA

Generating Enterprise Applications from Models Vinay Kulkarni, R Venkatesh, Sreedhar Reddy Tata Research Development and Design Centre, Pune, INDIA

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Generating Enterprise Applications from Models

Vinay Kulkarni, R Venkatesh, Sreedhar Reddy

Tata Research Development and Design Centre, Pune, INDIA

Outline

Engineering large software systems Model-based development Meta-modeling Generating enterprise applications from models A model driven software development

environment Future work

Typical decomposition

Analysis

Design

Application

Coding

DatabaseUser

Interface

UI Prototype

JSPimplementation

GUIstandards

UMLdiagrams

Java code

Designstrategies

RDBMSimplementation

ER diagramsTable design

Model-based Approach

Decompose specification A into views A1…An to achieve

Structural simplicity Efficiency

Each Ai is an instance of a more generic model Mi

e.g. use-case as a model for user interaction specification

Model-based Approach

A

A2 A3A1

Decomposes into

Model-based Approach

A

A2 A3A1

C1 C2 C3

C

Abstraction ofDecomposes into

Model-based Approach

A

A2 A3A1

M1 M2 M3

C1 C2 C3

C

Instance of

Abstraction ofDecomposes into

Relationship between Views

The views need not be independent: property p of A may appear in two different views Ai and Aj

Ai and Aj must be ‘consistent’ with respect to property p:

e.g. data being displayed in a window being passed as a parameter to a method

Implementations of the Ais are composed to get an implementation of A. The Ais need to be consistent for the composition to be correct.

Models and Meta-models

Using independent models for each set of views is functionally adequate

hard to manage consistency

An alternative is to define the models as instances

of a unified meta-model.

Meta-models

Models M1, M2, M3 instances of a unified meta-model MM

Define relationship between models

Address consistency at model level

M1 M2 M3

MM

A1 A2 A3

P1

P2

P3P

Generating enterprise applications from models

Illustrative example:

Client Server application

Application layer meta model

Class

Method

Association

has

source

DataType

ofType

destination

Attribute

has

Process

Task

has

realizes

precedes

1..* 1..*

1..*

1..*

1..*

1..*

*

* *

* * *

*

*

* *

UI layer meta model

UIAttribute

*

Window

UIClass Button

has has

Class

Method Attribute

has has

mapstocallshas

opens

1..* 0..1

0..1

*

*

*

*

1..*

*

1..* 1..*

**

0..1 0..1

GUI standards meta model

representedBy

Control

CalendarControl

DataType

Date

instanceOfinstanceOf

representedBy

0..10..1

**

Database layer meta model

Class

Attribute Association

has source

Table

Key Column

has has

implements

DataType

ofType

destination

mapsto

composed

1..* 1..*

1..*

***

1..* 1..*

**

0..10..1 0..1 0..1 * 1..*

1..*

*

inherits

Some inter model consistency checks

UI should allow specification of all Tasks in the business process and be consistent with precedes relationship between Tasks

UI should display data that is consistent with respect to the Parameters being passed to the Operations invoked from the Window

DB layer should ensure that implements association is implemented in a consistent manner

Consistency across layers - unified meta model

MM

A1 A2 A3

C1

C2

C3C

instanceOfinstanceOfinstanceOf

DMUIM AM

Integration across layers

User String Name;

Database

UserNameAccNo

AccountAccNoBalance

has

Account String AccNo; Double Balance;

Withdraw, Deposit

ApplicationUser Interface

Withdraw Deposit

Name

A/c No

Amount

A model driven software development environment

MasterCraft Models

Data Model, Class Model, GUI Model State Diagram, Use Cases, Sequence Diagram

Semantics for models weak

Generate code from high-level description unit tests

MasterCraft

bxl

GUI specification

GUI model UML ER model

MasterCraft meta model

JSP

Java

OracleC

guimod dmgen

Business logic DB specification

instanceOf instanceOf instanceOf

MasterCraft

Achieves component-based development multiplatform code-generation (… from .NET to

mainframes …) multi-language code generation complete separation of application specification from

implementation

Next generation MDSD framework

Refinement

Reqmntsmodel

Analysismodel

Aspectweaver

Compospec

Aspectspecs

Comp code

Compodesc

Compodesc

Composition

App code

REPOSITORY

Framework

Specify/ Refine

Compose/ Adapt

Develop/ Adapt

Search

Store