scieee Science in your language
[en] (orig)

Different approaches to MDWE: bridging the gap

Read accessible full text

Different approaches to MDWE: bridging the gap

Author: Adamkó, Attila; Kollár, Lajos
Year: 2013
Source: https://dea.lib.unideb.hu/bitstreams/98653d8d-1b65-49b2-85e7-b147f35977e2/download
STUDIA UNIV. BABES¸–BOLYAI, INFORMATICA, Volume LVIII, Numbe 2, 2013
DIFFERENT APPROACHES TO MDWE: BRIDGING THE
GAP
ATTILA ADAMK ´
O AND LAJOS KOLL´
AR
Abs ac . This pape will gi e a sho o e iew and compa ison o Model-
d i en Web Enginee ing (MDWE) p ac ices applied in bo h academy and
indus y wi h he aim o b idging he gap be ween hose app oaches. While
Domain Speci ic Languages (DSLs) a e used o exp ess a high le el ou line
o he imagined sys ems, he indus ial app oaches a e ocusing on a lowe
le el and he dis ance o he wo ields a e mos ly oo wide o apply bo h
in one de elopmen p ocess. The goal o his pape is o p opose a way o
me ge he wo sides. DSLs can help o build p o o ypes in a e y apid
manne . Based on hose p o o ypes, common models can be de i ed ha
can se e as a basis o model-d i en gene a ion o Web applica ions using
well-known p oduc ion amewo ks.
1. In oduc ion
Model-d i en enginee ing has become mo e han a p omising way o c e-
a ing applica ions ha a e based on abs ac ions: MDE b ings so wa e de el-
opmen much close o domain expe s. I is he way how he MDA and MDD
ield could ind i s way o eal li e scena ios. Howe e , hese p ominen ideas
wi hou ully ealized key echnology ea u es canno lead he way. Wi hou
execu able modelling, me a-modelling, language enginee ing and p ope ool
suppo hey a e no mo e han in e es ing and idealis ic esea ch di ec ions.
In he beginning o he 21s cen u y he e we e se e al p omising p ojec s
o suppo MDD and MDE. Nowadays, a e a decade o he bo n o MDA
and suppo ing echnologies he lis o possible ools wi h he men ioned key
ea u es a e much mo e limi ed, only a ew o hem emain ali e. We can
Recei ed by he edi o s: June 1, 2013.
2010 Ma hema ics Subjec Classi ica ion. 68U35, 68M11, 68N99.
1998 CR Ca ego ies and Desc ip o s. D.2.2 [So wa e]: So wa e Enginee ing – Design
Tools and Techniques; D.2.10 [So wa e]: So wa e Enginee ing – Design.
Key wo ds and ph ases. MDWE, Web Applica ions, Model-d i en de elopmen , Sp ing,
Domain-Speci ic Languages.
This pape has been p esen ed a he In e na ional Con e ence KEPT2013: Knowledge
Enginee ing P inciples and Techniques, o ganized by Babe¸s-Bolyai Uni e si y, Cluj-Napoca,
July 5-7 2013.
9
10 A. ADAMK ´
O AND L. KOLL ´
AR
obse e a landscape shi om gene al pu pose languages o domain-speci ic
ones. I opens he way o b idging he gap be ween s akeholde s, domain
expe s and so wa e de elope s.
2. Domain-speci ic languages and modeling
In so wa e enginee ing, a domain-speci ic language (DSL) is a “a com-
pu e p og amming language o limi ed exp essi eness ocused on a pa icula
domain” [6]. A DSL can be ei he a isual language, like he languages used
by he Eclipse Modeling F amewo k, o ex ual languages.
A sound language desc ip ion con ains an abs ac syn ax, one o mo e
conc e e syn ax desc ip ions, mappings be ween abs ac and conc e e syn-
axes, and a desc ip ion o he seman ics. The abs ac syn ax o a language
is o en de ined using a me amodel. The seman ics can also be de ined using
a me amodel, bu in mos cases in p ac ice he seman ics a e no explici ly
de ined bu hey ha e o be de i ed om he un ime beha io .
In model-d i en enginee ing, many examples o domain-speci ic languages
may be ound, like OCL, a language o deco a ing models wi h asse ions and
cons ain s, o QVT, a domain-speci ic model ans o ma ion language. How-
e e , languages like UML a e ypically gene al pu pose modeling languages.
Domain-speci ic languages ha e impo an design goals ha con as wi h
hose o gene al-pu pose languages:
•domain-speci ic languages a e less comp ehensi e;
•domain-speci ic languages a e much mo e exp essi e in hei domain;
•domain-speci ic languages should exhibi minimum edundancy.
3. Academical p ac ices o MDWE
Modeling and sys ema ic design me hods a e impo an and eme ging
ields in he Academic sec o . Se e al new me hodologies had bo n om his
di ec ion and esul ed be e so wa e de elopmen p ac ices. Howe e , appli-
ca ion o hose me hodologies a e e y ime-consuming he e o e i is mos ly
unaccep able o he indus y. Se e al yea s a e equi ed be o e an app oach
becomes a well- unc ioning me hod ha is eady o indus ial use. The ol-
lowing sec ions desc ibe some o he mos in e es ing model-d i en languages
and me hodologies (wi hou a emp ing o be comp ehensi e). (The i s one
is an odd one ou because i has bo h academic and indus ial aspec s.)
3.1. WebML, WebRa io. WebML [4] is a isual no a ion o speci ying he
con en , composi ion, and na iga ion ea u es o hype ex applica ions, build-
ing on ER and UML. I s no only o isualizing he models a he han a
DIFFERENT APPROACHES TO MDWE: BRIDGING THE GAP 11
me hodology o designing complex da a-in ensi e Web applica ions. I p o-
ides g aphical, ye o mal, speci ica ions, embodied in a comple e design p o-
cess. Why i is an odd one ou in his lis ha i has a comme ial ool which
can assis by isual design.
WebML enables designe s o exp ess he co e ea u es o a si e a a high
le el, wi hou commi ing o de ailed a chi ec u al de ails. WebML concep s
a e associa ed wi h an in ui i e g aphic ep esen a ion, which can be easily
suppo ed by CASE ools and e ec i ely communica ed o he non- echnical
membe s o he si e de elopmen eam. The speci ica ion o a si e in WebML
consis s o ou o hogonal pe spec i es:
•S uc u al Model
•Hype ex Model
–Composi ion Model
–Na iga ion Model
•P esen a ion Model
•Pe sonaliza ion Model
A i s sigh he business p ocess modell is missing om he WebML me hod-
ology bu i s lying inside he composi ion model and na iga ion model, join ly
named as hype ex model. Na i e BPMN is no suppo ed by he ool, how-
e e he e is a ans o ma o which can ans o m a BPMN diag am in o he
WebML domain en iching he Applica ion model.
Fu he mo e, WebML has been ex ended o co e a wide spec um o
on -end in e aces, hus esul ing in he In e ac ion Flow Modeling Language
(IFML), adop ed as a s anda d by he Objec Managemen G oup (OMG) in
2013.
The WebML language s a ed as a esea ch p ojec a Poli ecnico di Milano
and la e ool suppo has also been added. This so wa e is called WebRa io
ha has become an indus ial p oduc so i can be conside ed as a success
s o y o b idging he gap be ween academics and indus y. In an ideal wo ld,
mo e ideas o igina ing om he academic sec o should each ha s age.
3.2. UML-based Web Enginee ing. UWE [8] applies he MDA pa e n o
he Web applica ion domain om he om analysis o he gene a ed imple-
men a ion. Model ans o ma ions play an impo an ole a e e y s age o he
de elopmen p ocess. The main easons o using he ex ension mechanisms
o he UML ins ead o a p op ie a y modelling echnique a e he accep ance
o he UML in he ield o so wa e de elopmen and i s ex ensibili y wi h
p o iles. The UWE design app oach o Web business p ocesses consis s o
in oducing speci ic p ocess classes ha a e pa o a sepa a e p ocess model
wi h a de ined in e ace o he na iga ion model.
12 A. ADAMK ´
O AND L. KOLL ´
AR
T ans o ma ions a he pla o m independen le el suppo he sys em-
a ic de elopmen o models, like de i ing a de aul p esen a ion model om
he na iga ion model. Then ans o ma ion ules ha depend on a speci ic
pla o m a e used o ansla e he pla o m independen models desc ibing he
s uc u al aspec s o he Web applica ion in o models o he speci ic pla o m.
Finally, hese pla o m speci ic models a e ans o med o code by model-
o- ex ans o ma ions. Compu e aided design using he UWE me hod is
possible using MagicUWE, a plugin o MagicD aw.
3.3. WebDSL. WebDSL [11] is a domain-speci ic language o de eloping
dynamic Web applica ions wi h a ich da a model. The goal o WebDSL
is o ge id o he boile pla e code you would ha e o w i e when building a
Ja a applica ion and aise he le el o abs ac ion wi h simple, domain-speci ic
sub-languages ha allow a p og amme o speci y a ce ain aspec o he
applica ion and he WebDSL compile would gene a e all he implemen a ion
code o ha aspec . The main ea u es o WebDSL a e: Domain modeling,
P esen a ion, Page- low, Access con ol, Da a alida ion, Wo k low, S yling,
Email.
Ini ially he e we e h ee sub-languages: a da a modeling language, a use
in e ace language and a simple ac ion language o speci y logic. WebDSL
applica ions a e ansla ed o Ja a Web applica ions, and he code gene a o
is implemen ed using S a ego/XT and SDF.
Al hough WebDSL is mainly a esea ch p ojec , a case s udy o domain-
speci ic languages in he Web ield [7], i can be usuable by anybody wi h some
p og amming expe ience.
4. Indus ial p ac ices
OMG p o ides a key ounda ion o Model-D i en A chi ec u e, which uni-
ies e e y s ep o de elopmen and in eg a ion om business modeling, h ough
a chi ec u al and applica ion modeling, o de elopmen , deploymen , main e-
nance, and e olu ion. These concep s and di ec i es ha e se ed as a basis
o se e al solu ions buil by a ious companies. The only p oblem wi h hese
a i ac s is he complexi y. Complexi y equi es ime and deep knowledge bu
in eal li e p ojec s his ac o is he mos limi ed one. Companies a e ocus-
ing on as de elopmen ime and choose amewo ks suppo ing p oduc i i y
a he han clea bu ime-consuming analysis phases. Howe e , he ollowing
p oduc s could be used in an indus ial en i onmen because hey ha e been
p o en o be wo king solu ions while u ilizing he OMG ounda ions.
4.1. And oMDA. In sho , And oMDA is an open sou ce MDA amewo k
which wo ks on UML models and u ilizing plugins and componen s o gene a e
DIFFERENT APPROACHES TO MDWE: BRIDGING THE GAP 13
sou ce code o a gi en p og amming language. Models a e s o ed in XMI
o ma p oduced om di e en CASE- ools. And oMDA eads models in o
memo y, making hese objec models a ailable o i s plugins. These plugins
de ine exac ly wha And oMDA will and will no gene a e. Each plugin is
comple ely cus omizable o a p ojec ’s speci ic needs.
I is mos ly used by de elope s wo king wi h J2EE echnologies and gen-
e a e code o Hibe na e, EJB, Sp ing and Web Se ices. And oMDA allows
cus omiza ion o he empla es used o code gene a ion, he e o e you can
gene a e any addi ional code you wan . We ha e seen And oMDA in ac ion
and ound i e y p omising in 2010 [1].
Cu en ly, he only p oblem is i s los upda e cycle. The home page was
las upda ed in 2011 and also he sou ce o ge eposi o y’s main b anch seems
o be s opped. Howe e , he e is a small sign o li e because imes amps on
se e al iles in he SNAPSHOT b anch show esh (summe 2013) modi ica ion
da e. Because i was success ully applied on one o ou indus ial p ojec s, i
has he po en ial and possibili y o became an al e na i e way o b idging
he wo wo ld.
4.2. openA chi ec u eWa e (mo ed o Eclipse Modeling). OpenA -
chi ec u eWa e (oAW) was he second way o MDA a ound 2009. I was a
modula MDA/MDD gene a o amewo k suppo ing a bi a y models and
p o iding a language amily o check and ans o m models as well as gene a e
code based on hem. OAW had s ong suppo o EMF (Eclipse Modelling
F amewo k) based models bu could wo k wi h o he models (e.g., UML2,
XML o simple Ja aBeans) oo. The main powe o oAW was he wo k low
engine which allowed o de ine gene a o / ans o ma ion wo k lows.
OAW was inhe i ed by he Eclipse Modeling F amewo k and became a
basis o i o ming one big in eg a ed amily—Xpand (and X end), MWE
(an -like de ini ion o ans o ma ions chains) and X ex ( ex ual DSL). I
p o ides model- o-model and model- o- ex ans o ma ion languages bu hey
a e no based on s anda ds.
4.3. Acceleo. Acceleo is a p agma ic implemen a ion o he Objec Manage-
men G oup (OMG) MOF Model o Tex Language (MTL) s anda d. The
c ea o was a F ench company, named Obeo. Nowadays, Acceleo is an Eclipse
p ojec mos ly de eloped in Ja a and a ailable unde he Eclipse Public Li-
cence (EPL) p o ided by he Eclipse Founda ion. Du ing he ansi ion, he
language used by Acceleo o de ine a code gene a o has been changed o use
he new s anda d om he OMG o model- o- ex ans o ma ion, MOFM2T.
Acceleo is buil on op o se e al key Eclipse echnologies like EMF and, since
he elease o Acceleo 3, he Eclipse implemen a ion o OCL (OMG’s s anda d

14 A. ADAMK ´
O AND L. KOLL ´
AR
language o na iga e in models and o de ine cons ain s on he elemen s o a
model). I has a e y good ool suppo o p oduc i e coding.
4.4. Sp ing. One o he mos powe ul indus ial solu ions o Ja a EE appli-
ca ion de elopmen is he Sp ing F amewo k. I is an open sou ce applica ion
amewo k and In e sion o Con ol (IoC) con aine o he Ja a pla o m.
The co e ea u es o he Sp ing F amewo k can be used by any Ja a appli-
ca ions, bu he e a e ex ensions o building web applica ions on op o he
Ja a EE pla o m. Al hough he Sp ing F amewo k does no impose any spe-
ci ic p og amming model, i has become popula in he Ja a communi y as an
al e na i e o, eplacemen o , o e en addi ion o he En e p ise Ja aBeans
(EJB) model. The Sp ing F amewo k comp ises se e al modules ha p o ide
a ange o se ices including In e sion o Con ol con aine , Aspec -o ien ed
p og amming, Da a access, T ansac ion managemen , Model–View–Con olle
pa e n, Remo e access amewo k, Au hen ica ion and au ho iza ion, Messag-
ing and Tes ing. These capabili ies make i a s ong candida e o indus ial
p ojec s.
5. Closing he gap
A numbe o issues why he high majo i y o he indus y is no commi ed
o model-d i en de elopmen has been iden i ied in [5]. The au ho s’ indings
include ha echnical inno a ion does no go hand in hand wi h making p o i ;
model-d i en app oaches a e s ill belie ed o no el which means ha hey
canno be us ed enough o adop ion; and MDD is conside ed o be hea y-
weigh , complex and no ma u e enough o be used in a eal-wo ld de elopmen
p ojec . They also emphasize ha “simplici y is a key ea u e ha helps o sell
a echnology”, howe e , model-d i en app oaches can ha dly be called simple.
Thei addi ional obse a ions a e qui e simila o hose o [3] and [2]: suc-
cess ul applica ion o model-d i en echniques equi e a di e en app oach o
wo k (and a basic unde s anding and commi men ) om p ojec pa icipan s,
e olu iona y echnologies equi e new o ms o o ganiza ion, ool suppo s ill
does no each he equi ed le el, e c. A e y impo an obse a ion s a es
ha “ he ools, aining, and expec a ions o p o essionals unde MDE a e
no as well de eloped and es ablished as hose unde mo e adi ional so wa e
de elopmen dynamics” [2].
Despi e o ha ing some model-d i en solu ions ha has become an indus-
ial p oduc (e.g., WebRa io), hei ange o applica ion canno be compa ed
wi h hose o he well-known and widely used amewo ks like Sp ing.
The e o e, he exis ing gap be ween academical and indus ial app oaches
can be illed, on he one hand, by de eloping be e and be e ools and
eaching mo e and mo e people o hink in models, o , on he o he hand,
DIFFERENT APPROACHES TO MDWE: BRIDGING THE GAP 15
Figu e 1. Web s o e implemen a ion in WebDSL.
i migh be illed by es ablishing model-based solu ions which use he wide-
sp ead p oduc ion amewo ks as a a ge pla o m. Ou wo k is ocused
on ha la e ield: we p opose a new model-d i en gene a o ha is able
o gene a e sou ce code and he necessa y con igu a ion iles o he Sp ing
amewo k ha ing Hibe na e as a pe sis ence amewo k.
Since domain-speci ic languages (especially WebDSL) has been p o ed o
be e y e ec i e in apid p o o yping, ou s a ing poin in de elopmen was
o use i o easily and quickly de ine he concep s o he domain. This ini ial
implemen a ion migh se e as a basis o building UML models ha can la e
be ans o med (using a gene a o de eloped o ha pu pose) o Sp ing. The
eason o ha ing UML models as in e media e a i ac s is wo old: his way
he de elopmen can be s a ed by c ea ing he app op ia e UML models
while i allows o he DSL- o-UML mappings o be added la e , ex ending he
capabili ies o he sys em his way.
5.1. Demo applica ion—Web s o e. In o de o demons a e ou ideas, a
basic implemen a ion o a Web s o e applica ion has been c ea ed [10]. The
p ojec has been de eloped p ima ily o demons a ional pu poses so i lacks
much unc ionali ies ha a eal web shop should implemen .
This demo emphasizes he apid p o o yping capabili ies o WebDSL: i
is qui e s aigh o wa d o c ea e a base (bu s ill useable) applica ion in no
mo e han 1,000 lines o code.
Figu e 1 shows he de eloped applica ion ha has been ans o med o
Ja a code by he buil -in gene a o included in he WebDSL Eclipse plugin.
5.1.1. WebDSL implemen a ion and p oblems. The WebDSL implemen a ion
con ains cca. 1,000 lines o code. I includes he de ini ion o business en i-
ies (P oduc , Use , O de , O de I em, Ca , e c.), pages and na iga ion plus
16 A. ADAMK ´
O AND L. KOLL ´
AR
Figu e 2. Exce p o module En i ies (middle) and he gen-
e a ed iles (le ).
some in o ma ion on layou and access con ol. The WebDSL gene a o has
gene a ed 948 Ja a sou ce iles which is qui e ha d o unde s and and main-
ain. Figu e 2 shows an exce p o he module desc ibing he business en i ies
and O cou se, a model-d i en solu ion is no in ended o modi y he gene -
a ed code (since you a e equi ed o modi y he model and hen e-gene a e),
howe e , in p ac ice, i is some imes needed.
5.2. WebDSL o UML ans o ma ion. DSLs a e backed wi h me amod-
els ha cap u e he abs ac syn ax (i.e., he knowledge o he domain he
DSL is aimed a ). Based on ha me amodel i is s aigh o wa d enough o
ans o m he ep esen a ion on o a model con o ming he UML me amodel
so due o lack o space we omi he de ails o he ans o ma ion.
5.3. Gene a ion o Sp ing implemen a ion om UML model. A gen-
e a o ha is able o gene a e Sp ing and Hibe na e based implemen a ion
o a Web applica ion om a s e eo yped UML class diag am, has been de el-
oped [9]. The gene a o i sel is buil on op o Acceleo and is able o p o ide
implemen a ion o h ee laye s: da a laye , da a access laye and business
logic laye . Fo he da a laye , i gene a es Hibe na e en i y classes, he da a
access laye will con ain da a access objec s (DAOs), while he business logic
laye con ains POJIs (Plain Old Ja a In e aces) o desc ibing he se ices.
DIFFERENT APPROACHES TO MDWE: BRIDGING THE GAP 17
Figu e 3. S e eo ypes he gene a o unde s ands.
Figu e 4. The domain model o he simpli ied Web s o e.
XML-based con igu a ion iles o bo h Sp ing and Hibe na e a e also gene -
a ed.
The ini ial implemen a ion o he gene a o deals only wi h class diag ams.
S e eo ypes a e used o de e mine which laye he class belongs o. Figu e 3
shows he s e eo ypes ha a e p ocessed by he gene a o .
The domain model ha has been c ea ed is shown in Figu e 4. I s classes
a e s e eo yped wi h <<en i y>>.
Figu e 5 demons a es he Shopping Ca page o he gene a ed Sp ing
applica ion.