0% found this document useful (0 votes)
68 views27 pages

14 Summary

The document summarizes key aspects of model-driven software development (MDSD) and model-driven architecture (MDA), including: 1) MDSD uses domain-specific models and code generators to develop applications, aiming to reduce development time and improve maintainability. 2) MDA is a type of MDSD that uses platform-independent and platform-specific models related by transformations to develop portable applications. 3) AndroMDA is an example of using UML models and profiles along with Java code generation to implement a three-tier architecture for business applications.

Uploaded by

saleemhabib
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views27 pages

14 Summary

The document summarizes key aspects of model-driven software development (MDSD) and model-driven architecture (MDA), including: 1) MDSD uses domain-specific models and code generators to develop applications, aiming to reduce development time and improve maintainability. 2) MDA is a type of MDSD that uses platform-independent and platform-specific models related by transformations to develop portable applications. 3) AndroMDA is an example of using UML models and profiles along with Java code generation to implement a three-tier architecture for business applications.

Uploaded by

saleemhabib
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Session XIV:

Summary

Fulda, 17/01/08
Overview
● MDSD in general
– principle, delimitation and goals
– MDA with CIM, PIM, PSM and
transformations (M2M and M2C)
– software quality
– documentation
● MDSD of business applications with AndroMDA
– used UML diagram types and Java Beans
– MVC as a 3-tier architecture
– profiles and stereotypes
– meta-modelling and code generator
● critical questions on MDD/open problems
17/01/08 Dirk Müller: FMoSE, WS 2007/08 2/27
14-Summary
The Principle of MDD
domain-specific

generator

model program

application-specific

17/01/08 Dirk Müller: FMoSE, WS 2007/08 3/27


14-Summary
Delimitation of MDSD
models not completely new, but used in a new way
Forward engineering Reverse engineering

model
model CASE tool code
developer

code
Model Driven Software Development

model

Roundtrip engineering generator

x
model CASE tool code
code

17/01/08 Dirk Müller: FMoSE, WS 2007/08 4/27


14-Summary
Abstraction Level Rising by MDD
first use

domain-
specific
2000s DSLs or UML with profile

generator
protected vo.PersonVO[]
handleGibAllePersonen()
throws java.lang.Exception
higher programming languages
{
Collection coll =
1960s
getPersonDao().loadAll(PersonDao.TRANSFO
compiler compiler/

all-purpose
RM_PERSONVO);
PersonVO[] personen = new interpreter
PersonVO[coll.size()];

c
return (PersonVO[])coll.toArray(personen);

}
LDA 23 1950s byte code assembler
SHL 1
MOV $3
interpreter assembler
(VM)
11101011001011001010
01000010101110100010 1940s machine language

17/01/08 Dirk Müller: FMoSE, WS 2007/08 5/27


14-Summary
MDD = Infrastructure +
Application based on it
● MDD means developing two things:
– a MDD infrastructure
– an application by using that infrastructure
● steps for development of a MDD infrastructure
– dev. of a reference application
– analysis of application code
– separation into - generic
- schematically repeated and
- individual code
– dev. of a domain-specific modelling language
(real DSL or UML with profile => Meta-Modelling)
– dev. of model-to-code transformations
17/01/08 Dirk Müller: FMoSE, WS 2007/08 6/27
14-Summary
Goals of MDD
● reducing development times
● rapid prototypes => presentation to customers
● easier change to new technologies/platforms
● decoupling of domain and platform knowledge,
i.e. less technical knowledge for SW developers
● model-code coherency
● well-defined SW architecture
● up-to-date documentation
● support for automatic testing
17/01/08 Dirk Müller: FMoSE, WS 2007/08 7/27
14-Summary
Development Times with MDD
● biggest part in conventional development is
implementation
● with MDD: more effort necessary for modelling
– ideal case: 100% code generation
– more realistic: 70% .. 90% code generation, rest
hand-written (e.g. business logic)
=> problems keeping both parts consistent
(model-code-coherency)
● net reduction of development effort: up to 60%

17/01/08 Dirk Müller: FMoSE, WS 2007/08 8/27


14-Summary
Model Driven Architecture (MDA)
● special kind of MDD, by
OMG in 2000
● two main goals:

– interoperability
(establish standards)
– portability
(several dest. platforms)
● specification:

http://www.omg.org/mda
● uses UML with profiles

17/01/08 Dirk Müller: FMoSE, WS 2007/08 9/27


14-Summary
MDA Models
computer-independent
● CIM: analysis model
model (CIM)
● PIM: design model M2M
● PSM: implementation
platform-independent
model (enriched by
model (PIM)
platform-specific M2M
information)
platform-specific
● platforms (AndroMDA)
– J2EE/Java
model (PSM)
M2C
– .NET
platform
17/01/08 Dirk Müller: FMoSE, WS 2007/08 10/27
14-Summary
Software Quality (1/2)
● well-defined SW architecture
– model forces to apply a certain architecture
(e.g. Model-View-Controller)
– generated code complies with that architecture
● conserved expert knowledge
– use of several frameworks
– generator contains knowledge to use them in a
correct and efficient way
● stringent programming guidelines
– hand-written code as add-on to nice interfaces
17/01/08 Dirk Müller: FMoSE, WS 2007/08 11/27
14-Summary
Software Quality (2/2)
● quality of generated code
– one could argue that it is hardly readable, not
documented and not efficient enough
– but: depends on M2C transformation,
commentaries could be included there
– could be as good as hand-written code:
● maintenance of reference application
● careful development of transformations (M2C)
● in most cases, generated code is more
systematic and more consistent
17/01/08 Dirk Müller: FMoSE, WS 2007/08 12/27
14-Summary
Documentation
● model is always up-to-date and provides a good
survey of the software (visual and compact)
● online help and further doc's can be generated
out of the model
● DSL or profile of UML and generator have to be
documented as well, but only once, since they
are domain-specific, but not application-specific

17/01/08 Dirk Müller: FMoSE, WS 2007/08 13/27


14-Summary
Reusability
● high degree of reusability; reason:
– separation into domain- and application-specific
code (SoC) => good for SW product families
st

in particular, the 1 part, i.e. the infrastructure
can be reused
– modelling language (DSL or UML profile)
– generator belonging to a certain platform

17/01/08 Dirk Müller: FMoSE, WS 2007/08 14/27


14-Summary
Portability and Adaptability
● with MDA good portability
– PIM guarantees easy porting to other platforms
supported by the infrastructure
– quick porting to new or updated platforms by
adaptation of transformations
● structured adaptation to new domain
requirements
– modelling language
– M2C transformation
– remaining infrastructure
17/01/08 Dirk Müller: FMoSE, WS 2007/08 15/27
14-Summary
UML Diagram Types in AndroMDA
in general with UML & AndroMDA
● requirements analysis: ● use case diagrams
use case description
● analysis model ●

– domain model (static) – class diagrams


– process modelling – activity diagrams
(dynamic)
● implementation model: ● just some settings in
system architecture, the user models; rest
technical realisation done by MDA (ideally)
17/01/08 Dirk Müller: FMoSE, WS 2007/08 16/27
14-Summary
Java Beans
● classes in Java conforming special conventions
(JavaBeans API Specification) => reusability
– public default constructor, e.g. LectureBean()
– properties accessible with accessors and mutators
(getter and setter methods) => information hiding
– serialisable => reliable in a network
– should not contain event-handling methods
– introspector uses reflection mechanism (analysis of
properties, events, operations)
– documentation: BeanInfo class (standardised)
● as POJOs (Plain Old Java Objects) with naming
conventions instead of using an interface
17/01/08 Dirk Müller: FMoSE, WS 2007/08 17/27
14-Summary
Architecture of Modern Business
Applications with AndroMDA
● presentation layer:
VIEW
– Struts (Apache)
– Java Server Faces (Sun)
● service-oriented CONTROLLER
business logics (J2EE):
– Spring, Enterprise Java
Beans (JBoss), maybe MODEL
jBPM
● data access: Hibernate
(OO-to-DB mapper)
● data store with DB
– e.g. MySQL source: www.andromda.org (Application Architecture)
17/01/08 Dirk Müller: FMoSE, WS 2007/08 18/27
14-Summary
Profiles and Stereotypes
● extension of the UML with Profiles
● Profile = set of Stereotypes + set of Constraints
● Stereotypes with attributes, called Tagged
Values, as specialisations of modelling
elements
● Constraints: further restrictions, bad tool
support
● mighty concept, very useful for code generation
● Stereotypes and their Tagged Values enable
detailed specification, so code can be
generated out of the model
17/01/08 Dirk Müller: FMoSE, WS 2007/08 19/27
14-Summary
Meta-Modelling: four-layered
architecture of MOF with UML 2.x
layer description example
sets rules instance of
M3 “vocabulary”, Meta-Object Facility (MOF)
sets rules
meta-meta model
instance of

M2 “grammar”, UML meta-model


sets rules
meta-model
instance of

M1 “language”, user models written in UML


sets rules
(user) model
instance of
M0 “reality”, data layer, instances of user models
instance at runtime at runtime, e.g. objects
Attention! “meta” is relative, not absolute; here: refers to M1 layer
17/01/08 Dirk Müller: FMoSE, WS 2007/08 20/27
14-Summary
AndroMDA Code Generator
● AndroMDA uses UML Meta-Model for gene-
rating code: UML model + templates = code
● Facade Pattern used to hide complexity
● code generation:
– in cartridges structured:
new platform => new cartridge
– template-based transformation language VTL
– Meta cartridge for generating new generator code,
templates have to be written

17/01/08 Dirk Müller: FMoSE, WS 2007/08 21/27


14-Summary
Critical Questions on MDD (1/4)
● What's new about MDD?
– code generation is not new
– but: MDD is a new development paradigm for SW,
SW development on a higher abstraction level
● If the approach is so brilliant, why isn't it used
much more?
– still a lack of matured, flexible development tools
and of profound knowledge on MDD
– tools only for beta testers available
– but: already some success stories (see below)
17/01/08 Dirk Müller: FMoSE, WS 2007/08 22/27
14-Summary
Critical Questions on MDD (2/4)
● Doesn't it lead only to bad efficiency of the
application and bad readability of the code?
– No, the crucial point is the quality (efficiency and
readability) of the reference application.
● Aren't today's UML CASE tools more mature
than MDD tools?
– Well, it could be true. But it is comparing apples and
oranges. They are another category of tools.
– CASE tools don't offer a higher abstraction level.

17/01/08 Dirk Müller: FMoSE, WS 2007/08 23/27


14-Summary
Critical Questions on MDD (3/4)
● Doesn't MDD lead to a high dependency of an
application upon a certain development tool?
– dependency on MDD infrastructure exists (danger
of lock-in effect)
– often Open Source SW => changes can be done on
your own in principle
– generated code can be further developed using the
conventional approach (but “quick'n'dirty”)
● Isn't it – at least sometimes – easier to modify
the code instead of the model?
– often rich semantics of the model => consistent
changes at many places would be necessary
17/01/08 Dirk Müller: FMoSE, WS 2007/08 24/27
14-Summary
Critical Questions on MDD (4/4)
● What about features not provided by the
infrastructure?
– minor changes directly possible (req. Open Source)
– major ones only by traditional further development
● Is there any tool support for distributed modelling as it
is needed for a major project in a team?
– ∃ UML CASE tools supporting distributed modelling
– split-up into part models might be useful
● Isn't hand-written code more reliable than generated code?
– compiler bugs were often mentioned as a reason for still
programming in assembler instead of a HPL
– A reference application can even be further improved
by building templates and generator out of it.
17/01/08 Dirk Müller: FMoSE, WS 2007/08 25/27
14-Summary
Open Problems in MDD
● modelling languages for different SW product
families (real DSLs or UML Profiles)
● IDEs for MDD: generator, debugger, layout-alg.
● standard transformation languages (M2M, M2C)
● model-driven testing
● versioning of models, in particular for distributed
development
● model and code refactoring for MDD
● MDD and Legacy Code
17/01/08 Dirk Müller: FMoSE, WS 2007/08 26/27
14-Summary
MDD in Practice/Pros and Cons
● success stories of MDA, collected by OMG
http://www.omg.org/mda/products_success.htm
● MDD activities at Siemens
http://www.sse.cs.tu-bs.de/publications/KRS_MBEES_InfoBericht_05.pdf
● Komponentenbasierte Entwicklung auf Basis der
"Model Driven Architecture" (BMW)
http://www.sigs.de/publications/os/2004/05/bien_beschorner_OS_05_04.pdf

successful use of AndroMDA at Lufthansa Systems
http://f3.tobject.de/wp-content/downloads/articles/bohlen_friese_OS_03_06.pdf
● F. Steimann, T. Kühne: “Are Models the DNA of
Software Construction? A Controversal Discussion”
http://www.kbs.uni-hannover.de/~steimann/published/WiSME2004.pdf

17/01/08 Dirk Müller: FMoSE, WS 2007/08 27/27


14-Summary

You might also like