Transcript MDD

Model Driven Development:
Hype or Reality
Timothy D. Korson
[email protected]
1
Restricted Use
This copyrighted material is provided to attendees of
Korson-Consulting courses under a restricted
licensing agreement exclusively for the personal
use of the attendees. Korson-Consulting retains
ownership rights to the material contained in these
course notes.
Please respect these rights.
Any presentation or reuse of any part of this
material in any form must be approved in writing
by [email protected]
Copyright © 2006 Korson-Consulting.
All rights reserved.
2 of 44
Copyright © 2005 Korson-Consulting
MDA Premise

Generate systems from models
3 of 44
Copyright © 2005 Korson-Consulting
Blueprints to Buildings

It is like having a team of Robots that
could automatically construct a
building from a detailed set of
blueprints
4 of 44
Copyright © 2005 Korson-Consulting
Natural Progression
00110111000011100
 Assembler
 FORTRAN
 Ada
 Middleware
 Components
…
 MDA

5 of 44
Copyright © 2005 Korson-Consulting
State of Software Development

Lots of advances, but programmers
still spend and inordinate amount of
time
Distribution mechanisms
 GUI layout
 Database structure and access
mechanisms

Details that logically could be automated
6 of 44
Copyright © 2005 Korson-Consulting
Corporate Architecture

multiple industry standards-CORBA,
EJB/J2EE, .NET, XML/SOAP,

These become “MDA compiler options”
instead of “Bet the Company” decisions
7 of 44
Copyright © 2005 Korson-Consulting
MDA Benefits
According to the OMG:
Better
“the benefits of MDA are significant - to business leaders and
developers alike:
Faster
Cheaper





Reduced cost throughout the application life-cycle
Reduced development time for new applications
Improved application quality
Increased return on technology investments
Rapid inclusion of emerging technology benefits into their
existing systems
MDA provides a solid framework that frees system
infrastructures to evolve in response to a never-ending
parade of platforms, while preserving and leveraging existing
technology investments. It enables system integration
strategies that are better, faster and cheaper.”
8 of 44
Copyright © 2005 Korson-Consulting
Scope Makes MDA Unique
9 of 44
Copyright © 2005 Korson-Consulting
MDA Goals
MDA addresses the challenges of today's highly networked,
constantly changing systems environment, providing an
architecture that assures:

Portability, increasing application re-use and reducing the cost and

Cross-platform Interoperability, using rigorous methods to

Platform Independence, greatly reducing the time, cost and

Domain Specificity, through Domain-specific models that enable

Productivity, by allowing developers, designers and system
complexity of application development and management, now and into the
future.
guarantee that standards based on multiple implementation technologies all
implement identical business functions.
complexity associated with re-targeting applications for different platformsincluding those yet to be introduced.
rapid implementation of new, industry-specific applications over diverse
platforms.
administrators to use languages and concepts they are comfortable with,
while allowing seamless communication and integration across the teams.
10 of 44
Copyright © 2005 Korson-Consulting
MDA
Basic Technical Concepts
11
Traditional Software
Development

Requirements


Analysis


Diagrams and text
Coding


Diagrams and text
Design


Mostly text
code
Deployment

executables
12 of 44
Copyright © 2005 Korson-Consulting
Problems

Portability/new technologies

Rapid pace of change
Interoperability
 Maintenance and documentation

Lack of documentation
 Any documentation one does have is

out of date

Too much overhead
13 of 44
Copyright © 2005 Korson-Consulting
MDA Process
Business Analysis
Transformation
Tool
Systems Definition
Transformation
Tool
Business Analysis


Use Cases
Computation
Independent Model
Systems Definition

Platform
Independent Model
Design Transformation

Platform
Specific Model
Code Transformation

code
Deployment

executables
14 of 44
Copyright © 2005 Korson-Consulting
Traditional Roles mapped to
MDA
15 of 44
Copyright © 2005 Korson-Consulting
MDA Benefits

Productivity


Portability


Multiple PSMs for a given PIM
Interoperability


Automated transformation tools
PSM bridges
Maintenance and Documentation
Maintenance is done directly on the
models so the Models cannot get out of
sync with the code.
 The models are no longer overhead 16 of 44

Copyright © 2005 Korson-Consulting
MDA Advantages
1. The business logic for PIMs can be developed,
and validated, by business analysts with little or no
technical background. Some MDA tools even let
you “run” a PIM on a virtual machine to test it.
2. There is full traceability from PIM through PSM
and the ultimate deployed software. This provides
a great deal of quality assurance.
3. Subsequent changes in either the business
model or the technology platform can be
gracefully accommodated. Changes in the
technology don’t require changes to the PIM.
Changes to the PIM can be traced to determine
their likely impact on the PSM and ultimate
deployed implementation.
17 of 44
Copyright © 2005 Korson-Consulting
MDA Framework


MDA already has been applied to all kinds
of business problems and integrated with a
wide array of other common computing
technologies.
Because of its broad applicability, MDA
itself is not packaged as a single standard
like UML.

MDA is more like an umbrella over a growing
family of standards that now includes the UML
V2.0, the Meta Object Facility (MOF), the
Common Warehousing Model, and the Software
Process Engineering Metamodel (SPEM), among
others.
18 of 44
Copyright © 2005 Korson-Consulting
MDD

Model Driven Development is a more
generic term that includes
approaches that do not adhere to the
MDA standards
19 of 44
Copyright © 2005 Korson-Consulting
MDA
Implications
20
Thoughtful Cost Benefit
Analysis Required

What process is used for building
A
A
A
A
A

dog house
garage
house
business park
skyscraper
21 of 44
Copyright © 2005 Korson-Consulting
Just build it

It might cost more to create a detailed
blueprint for a dog house than carpenter
would charge for labor and materials for
the entire construction
22 of 44
Copyright © 2005 Korson-Consulting
On the Other Hand

For complex applications which have
to have detailed blueprints anyway
The value of MDA can be substantial
23 of 44
Copyright © 2005 Korson-Consulting
Not Your Father’s UML

Most UML modeling tools generate
code


One UML class – one Java class
MDA tools are model-driven, patternbased

One UML class – many code artifacts
MDA tools intelligently generate infrastructure from models
24 of 44
Copyright © 2005 Korson-Consulting
From a Customer Class in UML

A good MDA tool can generate:







The appropriate Data definition language to
create, delete, and init the RDBMS table.
A Data Access Object or Enterprise JavaBeans
data access layer
A SessionFacade to access the bean
A ServiceLocator to find the bean
A set of Data Transfer Objects to pass to the
web tier
A Struts-based framework to perform CRUD
operations on a "Customer"
All the security, logging, exception and other
hooks that one would expect to use
25 of 44
Copyright © 2005 Korson-Consulting
Focus

Changes from Coding to Modeling
Business analysts will not need IT skills
in order to stay involved in systems
development from beginning to end
 Geeks will focus on building the MDA
transformation tools
 Business applications will be build by
analysts and architects skilled in
modeling

26 of 44
Copyright © 2005 Korson-Consulting
Agile MDA
Incremental techniques work well
with MDA
 Most XP practices such as “pair
programming” extend naturally to
MDA
 The PIM replaces what “code” is to
agile development teams

27 of 44
Copyright © 2005 Korson-Consulting
Increased importance

Inspections
CIM
 PIM

28 of 44
Copyright © 2005 Korson-Consulting
Testing
Test cases can be generated from the
same models that generate the code
 A completely automated test suite is
a software system



So use MDA
UML testing profile
(U2TP)
This will have a
major impact on the skills
required of testers and the
test process itself.
29 of 44
Copyright © 2005 Korson-Consulting
Generated Code Should be Bug
Free
Focus can be on testing business logic
rather than the middleware and other
system code and interactions.
 We assume the C compiler doesn’t
introduce translation bugs into the
assembly code


Community at large
finds these errors
30 of 44
Copyright © 2005 Korson-Consulting
MDA for Prototyping
Repeat
Model
Generate prototype using MDA
Evaluate prototype
Until stakeholders are happy with prototype
Build system using traditional techniques
31 of 44
Copyright © 2005 Korson-Consulting
MDA
Hype versus Reality
32
MDA Compliant
Vendors make MDA claims whenever
their tool implements one of the
many standards in the MDA family of
standards
 This is misleading
 An MDA environment should be able
to turn a PIM into a running system

33 of 44
Copyright © 2005 Korson-Consulting
Current Tools
34 of 44
Copyright © 2005 Korson-Consulting
Current Tools Don’t Generate
All the Code
35 of 44
Copyright © 2005 Korson-Consulting
Just the Messy Error Prone Code
Generated
Middleware
 Business objects
 Data Base stuff
 Objects and method stubs
 Default GUI

Typically Not Generated
Customization to the GUI
 Method Bodies for the
Business algorithms

Copyright © 2005 Korson-Consulting
Transformation
Tool
Transformation
Tool
36 of 44
Two step Process
Most of the development
Transformation
Tool
Certain architectural configuration
and GUI customization
Transformation
Tool
Custom business logic
37 of 44
Copyright © 2005 Korson-Consulting
Controlled Study
38 of 44
Copyright © 2005 Korson-Consulting
Case Study Conclusions
35% gain in development productivity
 Up to 70% gains in maintenance
productivity

39 of 44
Copyright © 2005 Korson-Consulting
MDA
Final thought
40
Impact on Outsourcing?
41 of 44
Copyright © 2005 Korson-Consulting
9 - 10th March,
New Connaught Rooms, London
MDA - An Alternative to Offshore Outsourcing?
Roger Lane, Managing Director,
Interactive Objects Software
The off-shore outsourcing trend is gathering momentum.
Business and IT management see off-shore as a way of
making their hard pressed IT budgets go further.
Organizations who have successfully used outsourcing say it
is not only about cost, but about better quality. In truth, a
high proportion of off-shore projects fail to meet
expectations on cost or quality and an alarming number fail.
MDA has the potential to offer significant productivity and
quality gains. Could it be that MDA is a viable alternative to
sending development off-shore ? This presentation examines
how MDA stacks up against the off-shore model and the
potential additional advantages it can bring to organizations
and their staff.
42 of 44
Copyright © 2005 Korson-Consulting
Crystal Ball

MDA is not the only game in town.




Neither the problems that plague the software industry, nor the
principles of good software engineering are secrets known only
to the MDA elite.
All the tool vendors out there are searching to find solutions
that will win in the marketplace.
At the same time that MDA environments are starting to
mature, IDEs are becoming more and more powerful and multiuse components more widespread.
My personal opinion is that both the IDE style programming
approach and the MDA style modeling approach will exist
side by side during the next decade.


MDA will not take over the application development space, but
it will play an important role there.
Two of the biggest risks to the future of MDA are:


Will the development community be patient with MDA while the
MDA tools mature, and
Will the OMG find the “right” way to specify business logic at the
PIM level in a timely manner.
43 of 44
Copyright © 2005 Korson-Consulting
Conclusions





MDA is a natural step in raising the level of
abstraction at which we develop systems.
MDA embodies the basic engineering concept of
separation of concerns.
It is clear both intuitively and anecdotally that
MDA can lead to important gains in productivity,
portability, and the ability to focus on business
functionality as opposed to technology details.
Most importantly, MDA is not a proprietary vendor
initiative, but is a technology enabled by a family
of standards developed by the OMG consortia of
computing users and vendors.
The implications to testers of a move to MDA style
development are especially significant.
44 of 44
Copyright © 2005 Korson-Consulting
Thank you for attending

Please feel free to contact me with
any follow up questions or comments
Timothy Korson
[email protected]
45 of 44
Copyright © 2005 Korson-Consulting
46 of 44
Copyright © 2005 Korson-Consulting