Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager,...

115
Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion <[email protected]> Product Manager, Together Products Borland Software Corporation

Transcript of Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager,...

Page 1: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model Driven Development

With Borland® Together ® ControlCenter

Tom Gullion <[email protected]>

Product Manager, Together Products

Borland Software Corporation

Page 2: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Agenda

Page 3: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

1. Introduction

Page 4: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Tutorial Description

In this tutorial, we discuss the background concepts behind model-driven

development and how it relates to industry trends like MDA. We concentrate on showing what you can do today and

present a vision for what you'll be able to do in the future.

Prerequisites: Some experience with UML, OOAD, and Java.

Page 5: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Tutorial Goals

Define and describe model-driven development (MDD)

Describe model-driven architecture (MDA)

We all leave with a somewhat clear picture of present and future functionality

Page 6: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model-Driven Development Defined

Models are the focus of development– not an intermediate work product

Model and Code are of equal importance– LiveSourceTM is key

• Model and code are always in sync

– “The code is the model, the model is the code”

Page 7: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

LiveSourceTM is key

Model and code are always in sync

Page 8: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Ban on intermediate work products!

Models are the focus of development, not an intermediate work product

No more stale design documents

No more out-of-date requirements documents

Leverage integrations to always work with “live” project artifacts!

Page 9: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDD/MDA Terms

Model

Platform

CIM

PIM

PSM

Transformations

Page 10: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model

Merriam-Webster Online:• “structural design”• “a system of postulates, data, and

inferences presented as a mathematical description of an entity or state of affairs”

Joaquin Miller:• “Specification of a system and its

environment”

Page 11: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model Taxonomy

Page 12: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Platformgeneral definition

– middleware platforms• J2EE• .NET

– OS platforms• Linux• Mac OSX

– can be more specific• BEA WebLogic Platform 8.1

OMG definition– general approach

Page 13: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

OMG definition of “platform”

MDA recognizes that the target "platform" will likely be a collection of platforms: Linux+JBoss+J2EE+Hibernate+ MySQL+Struts+JSP

Page 14: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

CIM

Computation Independent Model– Collection of UML diagrams

• Use case, activity, class, state, etc.

– High-level of abstraction– Color modeling– Analysis model

Page 15: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

CIM in TogetherSeparate project vs separate package• Separate project provides good isolation

– Can be a challenge for traceability• Separate package partitions ok

– Much better for managing tracability

Configure diagrams to Analysis Detail

- [see ControlCenter]

Page 16: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

High-level of abstraction

Reduce complexity

Model the “what” – not the “how”

Visualize collaborations

Form over function

Page 17: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Color modeling

Peter Coad’s advice:– Assign colors to categories of classes [diagram

elements]– ‘Spatial Layering’– How many colors

• “Five is too many” - Hideaki Chijiiwa (Color Harmony)

– Which colors – Leonardo Da Vinci• red, yellow, green, blue

– Soften to pastels so text is easy to read• Pink, pastel yellow, pastel green, pastel blue

– 3M was there before us• Four color Post-itTM Notes

Page 18: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

analysis model

Page 19: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PIM

Platform Independent Model– Collection of UML diagrams

• Use case, activity, class, state, etc.

– Always important to define “platform” for your context

– Independence is relative• Must specify the platform from which this

model is independent

Page 20: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PIM

PIM in Together– design model– design model with OCL– color modeling here too

Page 21: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

design model

Page 22: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

design model with OCL

Page 23: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

color modeling here too

Page 24: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PSM

Platform Specific Model– Generally specific to

• Some technology;• A programming language;• Middleware• Execution environment

– Typically class diagrams

Page 25: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PSM in Together

Together’s historic "sweet spot"

can be reverse-engineered too

Page 26: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Transformations

CIM->PIM– Biz process model to UML model

PIM->PSM– the classic design to impl transformation– Single class to multiple transformation

PIM->PIM– Analysis to Design transformation– Object model to ER Logical transformation

PSM->Code– MDA term for LiveSource– Model compiler

Page 27: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Transformations (continued)

Model->Model– Activity diagram to Ant script tranformation– Interaction diagram to test scripts

Tool Support– Built-in

• LiveSource Approach• Deployment Support• Executable Model Support

– Pluggable• Provide an API for transformation plug-ins

– Customizable• Provide an API for transformation plug-ins

Page 28: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PIM->PIM

Analysis to Design transformation

Object model to ER Logical transformation

Page 29: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PIM->PSMthe classic design to impl transformation

Single class to multiple classes transformation

Page 30: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PIM->PSM

analysis class to EJB collection (EJB + remote + home interface classes)

Page 31: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

PSM->Code

MDA term for LiveSource

Together does this today…automatically!

Model compiler

Page 32: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model->Model

Activity diagram to Ant script transformation

Interaction diagram to test scripts

Page 33: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Tool SupportBuilt-in

– LiveSource Approach– Design Pattern Approach– Deployment Support– Executable Model Support– Export

Pluggable– Provide an API for transformation plug-ins

Customizable– Provide an API for transformation plug-ins

Page 34: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 35: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Iterative Devel Defined

"Development is organized into a series of short, fixed-length mini-projects called iterations; the outcome of each is a tested, integrated, and executable system.“

Craig Larman. Applying UML and Patterns, Second Edition. Prentice-Hall PTR, 2002

Page 36: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Iterative, incremental…

From Walker Royce, From Walker Royce, http://www.sei.cmu.edu/cbs/spiral2000/february2000/Royce/http://www.sei.cmu.edu/cbs/spiral2000/february2000/Royce/

Page 37: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Benefits

mitigate risks early, rather than late

visible progress

early feedback

manage complexity by breaking up work into manageable chunks

learning within an iteration can be methodically used to improve subsequent iterations

Craig Larman, Applying UML and Patterns, Second Edition. Prentice-Hall PTR, 2002

Page 38: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

FDD

Note: two-week timeboxing

Page 39: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Iterative Modeling Guidelines

Don’t have to do it all right now

Freedom to Delete

Avoid intermediate work products

Automate documentation generation

Page 40: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 41: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Modeling Requirements

Plain Text Requirements

Verify Requirements with an Object Model

Visualize Requirements

Model the User Interface

Page 42: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Plain Text Requirements

The customer’s credit card is scanned. The system creates a transaction and the financial institution verifies the credit card. If the credit is declined, an error logged.

The transaction is finalized and a receipt is printed. Finally, the customer receives their goods.

Note the “miracle” and “black hole” activities discovered

when the narrative was visually modeled.

Page 43: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Verify Requirements with an Object Model

Streamlined Object Modeling suggests:

"clients are intimately familiar with details but are stuck in how it is done now, overlooking potential improvements"

talking about users and user scenarios is bad because it "tends to bring focus on how the old system worked, not what the real underlying business process should be."

"Object modeling succeeds because it focuses on the domain objects and forces everyone in the group to take the object's viewpoint. Putting people in the same viewpoint is a powerful technique for gaining group consensus. By contrast, building scenarios around users compels every participant to consider the system from his own personal viewpoint, and how he wants it to work."

"Once the object model is created, then user scenarios are helpful in fleshing out the "how".'

Page 44: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Visualizing Requirements 1

Page 45: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Visualizing Requirements 2

Page 46: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Visualizing Requirements 3

Page 47: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Visualizing Requirements 4

Page 48: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

User Interface Models

from

Lean Interaction Design

and Implementation:

Using Statecharts with

Feature Driven Development

By David J. Anderson and

Brían O’Byrne

Page 49: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 50: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Modeling Conventions

See Scott Ambler’s BorCon 2004 session!– read his book or web site:

www.agilemodeling.com/style

Examples:• Visual layout suggests order• Naming conventions• Size matters• Color modeling• Model structure• Traceability

Page 51: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Visual layout suggests order

perce

ived tim

e/o

rde

r

Page 52: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Naming conventions

The value of naming conventions for code is well-known.

The same applies for model elements

Consider Ambler’s advice about use case naming:• Singular• A role, not a job title• Don’t start with “process,” “perform” or “do”

Page 53: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Size matters

Page 54: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Color modeling

Page 55: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model structure

Page 56: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Traceability

Requirements Traceability links

AND

Together Hyperlinks

Establish norms around when to trace and what to trace – otherwise it will quickly become unmanageable – and cease to be useful…

Page 57: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 58: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Design Patterns

Stock Patterns

Custom Patterns

Templates

Documenting Pattern Usage– Better Software Faster suggestion

Pattern Harvesting– example graphic diagram from

designer

Page 59: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Stock Patterns

Gang of Four

J2EE Design Patterns

Fowler’s EAI Patterns

Web Services Patterns

Etc.

Page 60: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Custom Patterns

Patterns tailored to your domain

Patterns for your framework(s)

Customized versions of stock patterns

Etc.

Page 61: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Templates

Together supports two levels of “patterns”

1. SciPattern classes – use Together ControlCenter’s OpenAPI, written in Java, highly configurable/extensible

2. Templates – simple token replacement approachpublic class %Name%{

public static void main (String[] argv) {

System.out.println(“%Message%");

}

}

Page 62: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Documenting Pattern UsageBetter Software Faster suggestion

Page 63: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Pattern Harvesting

Page 64: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 65: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Jeff De Luca on Inspections

http://www.featuredrivendevelopment.com/node/view/566

“Inspections are one of the most effective defect removal techniques. Testing is one of the least effective defect removal techniques. We know this from measurements; it isn't speculation. And yet, what do most organizations do? They test. What do most organizations not do? They don't inspect. Why is this? “

Page 66: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Automate Low-Level Inspections

“Software tools are very effective at finding certain types of defects… [They] are much faster and more accurate…” (Gilb, p.12)

Deep and precise parsing of source

Saves time and budget

Separation of concerns:- Computers excel at low-level inspection and counting

- People do not- People excel at business logic and design inspection

- Computers do not

Rich Gronback, Software Remodeling

Page 67: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Audits

Page 68: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Metrics

Page 69: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Contemporary Software Practices

Visual RefactoringTest-Driven Development

Extreme Programming (XP)- Continuous code reviews with pair programming- Produces 85% of the code that should be of

substantially higher qualityCarmichael, Haywood. Better Software Faster.

Feature-Driven Development (FDD)- Relies heavily on inspections to ensure high quality of

designs and code- Inspection steps built-in- Participants limited to those concerned

Page 70: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 71: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Benefits of Reverse Engineering

No more stale design documents

Faster ramp up time for new team members

Remove dependence on intermediate work products

No more lost learning during construction– Peter Coad’s Gutenberg Dilemma

Page 72: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Reverse Engineering: effects on documentation generation

Automated documentation generation is based on reverse-engineered models

Garbage in, garbage out…

Configurable projects are key• Set parsing levels

– Dependency checking– Associations

Page 73: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 74: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Generators

Generative Programming

Domain Engineering

Product-Line Practices

Usage scenarios

Generators available now

Page 75: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Generative Programming

Generative programming is at the heart of the concept

Generative programming’s goal is to move away from single solutions toward automated manufacturing of varieties of software.

Krzysztof Czarnecki andUlrich W. Eisenecker’s bookis required reading

Page 76: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Domain Engineering

What if you could preserve your past experiences building software systems?

Domain Engineering does exactly that AND includes a structure for reusing work products.

Page 77: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Conventional vs Domain Engineering

Software Engineering Domain Engineering

Requirements Analysis

Produces requirements for one system

Domain Analysis

Produces reusable, configurable requirements for a class of systems

System Design

Produces design of one system

Domain Design

Produces reusable design for a class of systems and a production plan

System Implementation

Produces system implementation

Domain Implementation

Produces reusable components, infrastructure and production process

Table 2-4, p57 Generative Programming

Page 78: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Product-Line Practices

Domain Engineering covers • Development of reusable assets• Production plan for producing systems reusing

those assets

Product-Line Practices provide• Management and organization• Enable Domain Engineering processes• Provide a feedback loop between them

Page 79: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Usage scenarios

DTD generatorXSD generator Entity Relationship Diagrams

– Logical– Physical

OR Mapping tools– Including Hibernate (model data specific);

Dialog Generators– Is it better to wrap a dialog behind an API or generate them?

• Both accelerate development – no more fighting with layout managers, hand-crafting dialogs to meet UI guidelines, etc.

• Generated don’t require maintaining the API, extending the API when changes occur, etc….

Page 80: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

2. Practices of MDD

Page 81: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

references

www.omg.org

www.uml.org

www.mda.org

www.modelbased.net

www.mdsd.info

http://www.prakinf.tu-ilmenau.de/~czarn/

Page 82: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

3. MDA Overview

Page 83: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

According to the Object Management Group (OMG):– MDA provides an open, vendor-neutral approach to

the challenge of business and technology change.– MDA aims to separate business or application logic

from underlying platform technology.– Platform-independent models can enable intellectual

property to move away from technology-specific code, helping to insulate business applications from technology evolution, and further enable interoperability.

What is MDA?

Page 84: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

The Benefits of MDA

Portability– Insulation from underlying technology change

Productivity– Code generation– Communicate visually, thereby reducing complexity

Cross-Platform Interoperability– Generated bridges

Easier Maintenance and Documentation– Design artifacts become development artifacts

Page 85: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDA is not a single specification, but a collection of related OMG specifications:

– Unified Modeling Language (UML™) 2.0• Infrastructure• Superstructure• Object Constraint Language (OCL)• Diagram Interchange• Profiles

– Meta-Object Facility (MOF)

– XML Meta-Data Interchange (XMI)

– Common Warehouse Meta-model (CWM)

– Query View Transformation (QVT)

What Comprises MDA?

Page 86: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDA Required Reading

Model Driven Architecture:

Applying MDA to Enterprise

Computing

by David S. Frankel

See also

MDA Journal at www.bptrends.com/

Page 87: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Note the industry verticals… MDA is not intended to be a general purpose model-to-code solution.

The MDA Logo

Page 88: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Platform

Platform is a relative concept

According to the MDA Guide: – “A platform in general is a set of subsystems/technologies

that provide a coherent set of functionality through interfaces and specified usage patterns that any subsystem that depends on the platform can use without concern for the details of how the functionality provided by the platform is implemented.”

Platform Independence– The quality that the model is independent of the features of a

platform of any particular type.

Platform-Independent Models– Better called platform computational-independent?

Page 89: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Transformations

This is the challenge for MDA!

Inspired by existing CWM transformation technology

– MOF2 Core will align basis of UML and CWM

Query, View, Transformation specification is needed

– At present, QVT is MIA

A record of transformation is required to maintain traceability and synchronization.

Page 90: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model Marking Transformation

Marks are specific to a transformation– Can be a stereotype in a profile, for example

Page 91: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Machine Code

Impossible?

The Abstraction GapMiddleware makes MDA a potential reality

Level of Abstraction

Generators

1

0..*

security

mortgages

1

0..*

borrower

mortgages

10..*

ownerhouses

House

-value:Money

Person

-ssn:Integer-salary:Money

+getMortgage(sum:Money,security:House):Mortgage

Mortgage

-principal:Money-monthlyPayment:Money-start:Date-end:Date

Machine Code with Operating System

Impractical?3GL with Operating System

Unlikely?3GL with Middleware

Practical(ly)Middleware with Framework

Today!

A b

s t r

a c

t i o

n G

a p

Page 92: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

What About SOA and BPM?Business Process Execution Language for Web Services

(BPEL4WS)– An XML standard for defining business processes with

Web Services– Provides high level of abstraction lends itself to

generation from models• Negligible abstraction gap

– UML Profile for Automated Business Processes• Allows UML Class and Activity diagrams to model BPEL• Generate WSDL, BPEL and XSD Schema

Business Process Definition Metamodel being developed– UML2-based metamodel with profile for BPD with

mapping to BPEL4WS

Page 93: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model and Code Synchronization

Forward Engineering Only– The ultimate goal (?)– Need Action Semantics– Done in real-time and embedded systems today!

Partial Round-Trip Engineering– Protected blocks for code– WYSIWYG GUI tools have done this

Full Round-Trip Engineering– Changes reflected up and down layers of abstraction– Necessary to wean programmers off 3GLs?

Page 94: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Building Better Model[er]s

As models move from design artifacts to development artifacts:– Casual modelers will need to be upgraded– Rigorous models required for generation– Model validation becomes more important– Model repositories will be needed

Page 95: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDA® Summary

MDA is a collection of many specifications– Many of which are incomplete at present

MDA has promise

MDA is no silver bullet

The jump from 3GLs to MDA is considerably longer than from Assembly to 3GLs

MDA can be done with agility– Waterfall not prescribed

MDA will require improved model(er)s

Page 96: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

3. MDA Overview

Page 97: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDD with Together® ControlCenter™

Use Design language to model requirements and domain model (CIM & PIM)

Refine computational portion in PIM package

Export to target language project (e.g. Java, C#, C++)

Apply design patterns and elaborate design (PSM)

PSM and Code model maintained in sync with LiveSource™

Page 98: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Support of the Latest Standards

Current work in progress:– UML™ 2 support in development– OCL 2 support in development– XMI 2 support in development– Diagram Interchange support in development– JMI-based metamodel support (JSR-040)– Java-based transformation engine for QVT– UML™ Profile support in development

• Custom profile definition to be supported

Page 99: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Improving the Modeling Experience

Look for future support in Together® for:– Expanded modeling capabilities

• Cater modeling environment to role• Graphical view of metamodels

– Modeling helpers and tutorials– Model-level audits and metrics

• Validate models for transformation

– OCL expression validation– Transformation definition samples for

extensibility

Page 100: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDD with Together® Tomorrow

Together®

Designer

PSMCode LiveSource™Code Audits & MetricsEmbedded IDE Integration

PIMPSM TransformationsModel Audits & MetricsOpenAPIMulti-Language, Next GenerationTogether ControlCenter

RequirementsCIMDocumentation GenerationStrong CaliberRM integrationLightweight, standalone modeling

Together®

Architect

Together®

Developer

<<include>>

<<include>>

Model-Driven DevelopmentDesign-Driven Development

Page 101: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Industry Support in modeling & MDA®

Look for future support in Together® for:– Industry models

• IAA• eTOM• etc…

– Industry frameworks• C4ISR• Zachman• etc…

Page 102: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model Accessibility

Several possibilities:– Proprietary metamodel API– Java™ Metadata Interface (JMI)

• Defined by JSR-040

– Eclipse Modeling Framework (EMF)• Corresponding UML2 project

Internally, Together® utilizes own metamodel– Known as “Entity” model

• Full UML2 metamodel implementation unrealistic

– Will be wrapped with standard JMI API for access• Done with on-the-fly model transformations

Page 103: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Query View Transformation (QVT)

No specification available yet– No standard way to define a

transformation

OMG issued RFP on April 10, 2002– 8 submissions, with 2 main groups:

• QVT-Merge Group• Compuware/Sun Microsystems

Page 104: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Open Source Transformers

Generative Model Transformer (GMT)– Eclipse project (vaporware, JUUT-je prototype, UMLX 0.0)– XMI-based (XMI+XMIXMI, XMIXMI, XMItext)– Transformations based on “textures”

• Patterns specified in unambiguous UML-based formatAndroMDA

– Builds on XDoclet, utilizes Velocity template engine– Takes UML XMI file input and generates output using “cartridges”– Current cartridges: Java, EJB, Hibernate, Struts– Generates no business logic

Jamda– Takes UML XMI file as input, using Jamda profile– Java-based code generators

• Generated class definitions added to UML model before codegen• Currently J2EE-centric

Others: UMT-QVT, QVT-Partners; Open Generator FrameWork, etc.

http://www.amdromda.org

http://jamda.sourceforge.net

http://www.eclipse.org/gmt

Page 105: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model Transformation Research

OCL-based transformations– Input and output patterns defined in OCL– Prolog-based engine

• Identifies input pattern in source model• Generates output pattern in target model

Rule-based transformations– Rules declared in XML– Model access and transform via JMI API– Batch processing of model, with potential incremental approach

Pattern-based transformations– Transformation declared with metaclass and OCL– Traverse modelexamine constraintsapply pattern to target

model– Technique used in current Together® pattern technology

Page 106: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Model Validation

Current audits & metrics apply only to source model– Source Code Interface (SCI) to code model

Model audits use JMI API– Access and evaluate OCL constraints in model– Audits themselves can be written in OCL

OCL validator accesses model constraints with JMI API

All validation results utilize common interface– Unified format for analysis

Page 107: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

What you can do now…

Refine your models:– Leverage UML profiles where appropriate– Specify all types– Specify all multiplicities– Name all associations and association ends– Clean up “dangling” model elements– Make models semantically complete

– Declare constraints in OCL

Page 108: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

What you can do now…

Treat models as if they were development artifacts– Not as throwaway design relics

Learn UML2 and OCL– OMG’s UML2 Certification Program

Avoid UML constructs not supported by MOF:– N-ary associations– Qualified associations– Association classes

Stop hand crafting XSDs, DTDs, and Java APIs for metadata– Generators exist today!

Page 109: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

3. MDA Overview

Page 110: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Overview of Future Support

Support of the Latest Standards– As they become available…

Improve the Modeling Experience– Align Products with MDA® Roles & Activities– Support Industry Models and Frameworks

Increase Generative Capabilities and Customizability– Model access, validation, transformation

Page 111: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

Improving the Modeling Experience

Look for future support in Together® for:– Expanded modeling capabilities

• Cater modeling environment to role• Including the ability to get a graphic view of

metamodels

– Modeling helpers and tutorials– Model-level audits and metrics

• Validate models for transformation

– Transformation definition samples for extensibility

Page 112: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDD with Together® Tomorrow (first of two)

Current ability of developers to work with PSMs will grow

New capabilities for Analysts with Together Designer– To create Problem Domain CIMs– To create models for a library maintained by Architect

PIMs developed with Together Designer– Can be based on pre-existing Models from Library– Use OCL2 for constraint definition– Apply UML Profiles to model– Rely on model level audits for quality

Code generated maintained in sync with PSM

Page 113: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

MDD with Together® Tomorrow (continued)

With Together Architect, shops will have model libraries– Models of Platforms, of Business Process, and Apps– Ability to combine and transform models– Access model information programmatically– Maintain relationships among models– Define and modify metamodels graphically

Create and maintain libraries of Model Transformations– A catalog of PIMPSM transformations available– Define and add your own, or purchase new ones

Validate a service oriented architecture against– The business process it should automate

Page 114: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

D. Frankel, Model Driven Architecture™. Applying MDA™ to Enterprise Computing. Indianapolis, IN: Wiley, 2003.

S. Mellor et al, MDA Distilled. Principles of Model-Driven Architecture. Boston, MA: Addison-Wesley, 2004.

A. Kleppe et al, MDA Explained. The Model Driven Architecture™: Practice and Promise. Boston, MA: Addison-Wesley, 2003.

J. Miller et al, MDA Guide Version 1.0. Needham, MA: OMG, 2003.

R. Hubert, Convergent Architecture: Building Model-Driven J2EE Systems with UML. New York, NY: 2002.

References

Page 115: Model Driven Development With Borland ® Together ® ControlCenter Tom Gullion Product Manager, Together Products Borland Software Corporation.

4. Questions and Answers