Improving the adaptation of web applications to different versions of software with MDA
Abstract
The Model-Driven Architecture (MDA) has been proposed as a way of separating the details of an implementation platform from the problem domain. This paper shows that this approach is also good for the adaptation of software to the different versions of the same platform. As an example, Spring Web Flow (SWF), a framework that allows the definition and representation of user interface flows in web applications, has been chosen. After six months of evolution, the web flows de¯ned with SWF 1.0 RC1 were not compatible with SWF 1.0. The paper analyzes the changes introduced by the new release, and it proposes an MDA-based approach to soften the impact of these changes.
Full text
Imp o ing he adap a ion o web applica ions o
di e en e sions o so wa e wi h MDA
A. M. Reina Quin e o1, J. To es Valde ama1, and M. To o Bonilla1
Depa men o Languages and Compu e Sys ems
E.T.S. Ingenie ´ıa In o m´a ica.
A da. Reina Me cedes, s/n.
41007 Se ille, Spain
{ einaqu, j o es, m o o}@lsi.us.es
h p://www.lsi.us.es/~ einaqu
Abs ac . The Model-D i en A chi ec u e (MDA) has been p oposed
as a way o sepa a ing he de ails o an implemen a ion pla o m om he
p oblem domain. This pape shows ha his app oach is also good o
he adap a ion o so wa e o he di e en e sions o he same pla o m.
As an example, Sp ing Web Flow (SWF), a amewo k ha allows he
de ini ion and ep esen a ion o use in e ace lows in web applica ions,
has been chosen. A e six mon hs o e olu ion, he web lows de ined wi h
SWF 1.0 RC1 we e no compa ible wi h SWF 1.0. The pape analyzes he
changes in oduced by he new elease, and i p oposes an MDA-based
app oach o so en he impac o hese changes.
1 In oduc ion
The as e olu ion o echnology has caused he pe iod o ime ha companies
ake o p o iding new e sions o hei p oduc s be sho ened, i hey wan o
be up- o-da e. Many imes, new eleases o e new and imp o ed ea u es, bu
also cause backwa d incompa ibili y. This p oblem is s essed in open sou ce
p ojec s, because new e sions a e o en eleased ou due o hei con inuous
in e ac ion wi h end use s. The e o e, i is c ucial o adap so wa e p oduc s
ha a e being de eloped wi h hese amewo ks a a minimum cos .
On he o he hand, web applica ions a e becoming mo e and mo e complex,
and nowadays, hey a e mo e han jus simple in e connec ed web pages. Thus,
an impo an piece in i s de elopmen a e Web Objec s [4], ha is, pieces o com-
piled code, ha p o ide a se ice o he es o he so wa e sys em. These pieces
o code a e o en suppo ed by open sou ce amewo ks, and as a consequence,
he e olu ion o hese amewo ks has also become an impo an challenge in
web applica ion e olu ion.
The p ocess o eleasing ou new e sions o a amewo k o a so wa e
p oduc can be conside ed as a so wa e e olu ion p ocess. The e a e se e al
echniques o so wa e e olu ion ha ange om o mal me hods o ad-hoc
solu ions. Bu he mos p omising ones a e: eenginee ing, impac analysis ech-
niques, ca ego y- heo e ic echniques and au oma ed e olu ion suppo . MDA
also seems o be a p omising philosophy o dealing wi h so wa e e olu ion, no
only because i allows he sepa a ion o he domain conce ns om he echnolo-
gical conce ns, bu also because design in o ma ion and dependencies a e explici
in models and ans o ma ions, espec i ely.
This pape shows how he MDA philosophy can help us o adap easily o
a new elease o a amewo k he so wa e a i ac s p oduced wi h an ea lie
e sion. Fu he mo e, i analyzes he e olu ion p ocess in he MDA. To demon-
s a e he bene i s o his philosophy, he pape will be based on a case s udy.
The case s udy desc ibes how a web low de ined wi h Sp ing Web Flow 1.0-RC1
can be adap ed o Sp ing Web Flow 1.0, a mo e s able elease. Sp ing Web Flow
(SWF)1is a componen o he Sp ing F amewo k’s web s ack ocused on he
de ini ion and execu ion o use in e ace (UI) lows wi hin a web applica ion.
A use in e ace low can be conside ed as pa o he na iga ion p ocess ha a
use has o deal wi h while in e ac ing wi h a web applica ion. Fo he sake o
ha ing a clea idea o he pe iod o ime be ween he wo s eleases, i should be
highligh ed ha SWF 1.0 RC1 was ou in May 2006, while SWF 1.0 was pub-
licly accessible in Oc obe 2006. And, al hough bo h e sions sha e mos o he
concep s, he e a e some echnical de ails ha di e and ha cause backwa d
incompa ibili y.
The es o he pape is s uc u ed as ollows: In sec ion 2, he p oblem is
in oduced by example, ha is, he wo king example is explained and p ob-
lems a e b ie ly highligh ed. Secondly, he app oach is explained ollowing h ee
s ages: me amodel and an o ma ion de ini ions, e olu ion analysis and change
p opaga ion. A e ha , some ela ed wo ks a e enume a ed and, a las , he
pape is concluded and some u u e lines o wo k a e poin ed ou .
2 P oblem S a emen
Due o he cons an e olu ion o echnology, new e sions o so wa e p oduc s
a e eleased ou mo e and mo e equen ly. This cycle o new e sions is spe-
cially speeded up when dealing wi h open sou ce p oduc s. This is due o use
pa icipa ion: use s a e cons an ly sending epo s abou mis akes. In his con-
ex , a equen ope a ion is so wa e mig a ion, hus he s udy case is going
o be ocused on a mig a ion om Sp ing Web low 1.0 RC1 o Sp ing Web low
1.0, a new, mo e s able elease, which appea ed jus 6 mon hs a e he public
appea ance o he 1.0 RC1 elease.
A low de ines a use dialog ha esponds o use e en s o d i e he execu ion
o applica ion code o comple e a business goal. And, al hough he elemen s
o cons uc s needed o de ine a web low a e he same in bo h e sions, he
echnical de ails di e om one elease o he o he . As a consequence, he e is
no backwa d compa ibili y.
In o de o be clea enough, he low used as s udy case is simple, bu i
co e s he main issues needed. The ini ial example has been ob ain om [2],
1The Sp ing Web Flow Home Page: h p://opensou ce.a lassian.com/
con luence/sp ing/display/WEBFLOW/Home
and can be seen as pa o he na iga ion pa h om a simple e-shop web si e.
The low simula es pa o he dialog ha akes place when a use wan s o buy
ce ain p oduc . The na iga ion s eps ha a use has o pass h ough o buy
some hing a e: Fi s ly, selec he S a link. Secondly, en e his pe sonal da a.
Thi dly, selec he p ope ies o he p oduc . And, inally, a e pushing he Buy
bu on, he will ob ain a message epo ing abou he shopping.
<<Ac ionS a e>>
se upFo m
<<Ac ionS a e>>
bindAndValida ePe sonalDe ails
<<ViewS a e>>
pe sonalDe ailsView
success submi
<<DecisionS a e>>
es Quan i y
ue
<<ViewS a e>>
o de De ailsView
<<Ac ionS a e>>
bindAndValida eO de De ails
<<EndS a e>>
submissionSuccess
[${ lowScope.o de .cancelled}]
success
e o
alse
buy
oPe sonalDe ails
e o
success
<<ViewS a e>>
pe sonalDe ailsView
<<ViewS a e>>
o de De ailsView
success
<<DecisionS a e>>
es Quan i y
ue
<<EndS a e>>
submissionSuccess
[${ lowScope.o de .cancelled}]
alse
oPe sonalDe ails
success buy
<<ViewS a e>>
pe sonalDe ailsView
<<ViewS a e>>
o de De ailsView
success
<<DecisionS a e>>
es Quan i y
ue
<<EndS a e>>
submissionSuccess
[${ lowScope.o de .cancelled}]
alse
oPe sonalDe ails
success buy
(a) SWF 1.0 RC1 low
(b) SWF 1.0 low
Fig. 1. S a e cha co esponding o he web low speci ied in SWF 1.0 RC1
The implemen a ion o his dialog using SWF equi es he de ini ion o a web
low. This web low can be speci ied in wo di e en ways, by means o an XML-
ile o using a Ja a-code. I is a good echnique o d aw a s a e cha in o de
o unde s and he web low be e . The low consis s o six s a es (Fig. 1(a)):
h ee Ac ionS a e’s, wo ViewS a e’s and one DecisionS a e. Ini ially, he
low s a s i s execu ion by an Ac ionS a e which is in cha ge o se ing up he
o m. Then, he o m is displayed h ough he pe sonalDe ailsView s a e. A e
ha , he low en e s in o ano he Ac ionS a e, which will bind and alida e he
da a in oduced by he use . I he e a e any p oblems wi h da a, he low will go
back again o he pe sonalDe ailsView s a e; o he wise, i will en e in o he
o de De ailsView s a e, and he p ocess will be epea ed. Finally, i all da a a e
igh , he low will en e in o he es Quan i y s a e, a DecisionS a e, ha
can ou e he low depending on he alue o he a ibu e cancelled. Howe e ,
i he low e ol es in o de o be SWF 1.0 complian , we ha e he s a e cha
shown in Figu e 1(b). The numbe o s a es has been educed om six o h ee.
Tha is, all he Ac ionS a e’s ha e disappea ed.
3 The app oach
3.1 Me amodel and ans o ma ion de ini ion
The i s s ep in he app oach is o ob ain a me amodel which exp esses he
conce ns ha a e implici in he amewo k and hei ela ionships. In ou case
s udy, a me amodel o Sp ing Web Flow is needed. In his case, wo di e en
me amodels should be de ined, one o he SWF 1.0 RC1, and he o he one
o SWF 1.0. The g ea ad an age he e is ha , a his poin , bo h me amodels
should no di e oo much. The models con o ming o hese me amodels a e also
needed. I is likely ha we ha e models con o ming o SWF 1.0 RC1, bu i he
model-d i en p ocess has been no ollowed, some eenginee ing echniques could
be applied o ob ain hem. Finally, a se o ans o ma ions o ob aining he
code should be gi en, whe he model- o- ex o model- o-model ans o ma ions.
Fu he mo e, wi h all hese a i ac s, an analysis should be done in o de o
de e mine he kind o e olu ion ha has been en e ed in o he new elease o
he amewo k.
3.2 Analysing he e olu ion
In o de o ace up o he adap a ion p ocess, he a i ac s ha a e subjec o
change should be iden i ied, and also, which o hese changes should be classi-
ied as e olu ion. In MDA he e a e h ee ways o e olu ion: model e olu ion,
ans o ma ion e olu ion and me amodel e olu ion. In model e olu ion, changes
o sou ce models mus be mapped in o changes o a ge models h ough he
ans o ma ion ules. In ans o ma ion e olu ion, changes o he ans o ma ion
de ini ion mus be mapped in o changes o a ge models. Finally, in me amodel
e olu ion, changes o a me amodel mus be mapped o changes o desc ibed
models, plus o ans o ma ion de ini ions.
This sec ion will analyze he di e en changes in oduced in he Sp ing Web
Flow amewo k, and i will classi y hem acco ding o he ways o e olu ion in
MDA. In ou s udy case, he main changes in oduced o Sp ing Web Flow a e:
1. F om DTD’s o XMLSchemas. Al hough s uc u ally, his change is im-
po an , concep ually is e y simple. The only hing o do is o de ine a new
se o model- o- ex ans o ma ions. And, i he model- o- ex ans o me
is based on empla es, we only ha e o modi y he empla e. This is a kind
o model e olu ion.
2. Changing he oo and he ini ial s a e. This change is also simple.
While in SWF 1.0 RC 1, he oo o he XML web low was <web low> in
SWF 1.0, he oo is < low>. Mo eo e , he way o speci ying he s a s a e
has also been modi ied: in SWF 1.0 RC, he ini ial s a e was speci ied as an
a ibu e o he oo elemen <web low id="o de Flow" s a -s a e="¬
se upFo m">; howe e , in SWF 1.0, i is de ined as an XML elemen <s a -
s a e id e ="pe sonalDe ailsView"/>. These modi ica ions only imply
he empla e ede ini ion. This is a kind o model e olu ion.
3. New ende Ac ion p ope y in he ViewS a e This change is due o
he in oduc ion o a new p ope y ende Ac ion belonging o ViewS a e.
Bu his new p ope y implies a bi o concep ual change, because we should
change he design o he low in o de o ake ad an age o he ad anced
ea u es o he amewo k. Thus in SWF 1.0 RC1 an ini ial Ac ionS a e
was needed in o de o se up ini ially a o m. I we look a he Figu e 1, we
will see ha he s a s a e is an Ac ionS a e named se upFo m. Howe e ,
in SWF 1.0 his can be ep esen ed by a p ope y < ende -ac ions> linked
o he ViewS a e ha is in cha ge o ende ing he o m. As a esul o he
new design, in he Figu e 1(b), he Ac ionS a e has comple ely disappea ed.
This is a kind o me amodel e olu ion.
4. Ac ions in ansi ions This change is no eally due o he new e sion o
SWF, bu due o he inexpe ience o he au ho s wi h SWF when wo king
wi h SWF RC1. Thus, wo s a es (one ViewS a e and one Ac ionS a e)
we e de ined in o de o speci y, on he one hand, a web o m, and on he
o he hand, he binding and alida ion o da a in oduced by he use in
ha o m. The e, he ViewS a e named pe sonalDe ailsView is ollowed
by he Ac ionS a e named bindAndValida ePe sonalDe ails, which is
in cha ge o he binding and alida ion o use da a. In ha low he e is
also ano he pai o s a es ha ollow he same pa e n o de De ailsView
and bindAndValida eO de De ailsView. Howe e , hese wo s a es can be
eplaced o jus one ViewS a e, and he alida ion and biding can be ig-
ge ed by he ansi ion, which implies he disappea ance o he Ac ionS a e.
Thus, i we compa e he Figu es 1(a) and 1(a), we will see ha he numbe o
s a es has been educed, and now, he bindAndValida ePe sonalDe ails
and bindAndValida eO de De ails ha e been missed. This is a kind o
ans o ma ion e olu ion.
3.3 Change p opaga ion
In o de o mig a e ou applica ion o be complian o he new e sion o he
amewo k, di e en ac ions should be unde aken. And he conc e e ac ion will
depend on he kind o e olu ion. The easies e olu ion o ace up o is he model
e olu ion. In his case, he only hing o do is e o mula e he se o model o
ex ans o ma ions de ined o gene a ing he XML-Web low iles.
The me amodel e olu ion implies no only he modi ica ion o he Sp ing
Web low me amodel, bu also he de ini ion o new model o ex ans o ma-
ions. In o de o mig a e he old Sp ing Web low models in o he new ones, wo
di e en s a egies can be ollowed: one based on ho izon al ans o ma ions, and
he o he one based on e ical ans o ma ions. Ho izon al ans o ma ions [1]
change he modula s uc u e o an applica ion a he same le el o abs ac ion.
I we hink in model ans o ma ions, sou ce models and a ge models should
be exp essed a he same abs ac ion le el. On he o he hand, e ical ans o -
ma ions [1] in ol e he ans o ma ion o a high abs ac ion le el model in o a
lowe le el one.
In he s a egy based on ho izon al ans o ma ions, besides he o iginal
model- o- ex ans o ma ions, a se o ho izon al model- o-model ans o ma-
ions has o be de ined. These ans o ma ions along wi h he o iginal and
e ol ed me amodels, and he o iginal model will be he inpu o a model ans-
o ma ion engine, which will p oduced he e ol ed model as ou pu . Applying
he model o ex ans o ma ions, he e ol ed Sp ing Web low will be ob ained.
The second s a egy is mo e aligned o MDA and i consis s on he de ini ion
o a new me amodel which cap u es only he ele an conce ns, ha is, i should
igno e hose elemen s ha a e pla o m dependen . This second app oach is a bi
mo e expensi e han he i s one, in he sense ha new a i ac s a e needed, and
hey a e concep ually mo e complex. Bu i also has some ad an ages. Fi s ly,
as he di e en e sions deal wi h he same concep s, i is likely ha he PIM
me amodel will no change e y o en, and he impo an modi ica ions should
be a he PSM and ans o ma ion le els. Secondly, wi h he second app oach
we ha e o de ine a new me amodel o he new e sion o he p oduc , bu many
imes, his new me amodel is e y simila o he one de ined o he p e ious
e sion, so his ask does no suppose oo much wo k. And, inally, i we de ine
a PIM me amodel, we can deal wi h he same concep s bu in o he pla o ms.
Finally he model e olu ion can be sol ed de ining a se o ho izon al ans o -
ma ions o e o mula e he old models. In his case, he me amodel emains he
same, and also he model o ex ans o ma ions.
4 Rela ed Wo k
The model-d i en so wa e e olu ion is a new a ea o in e es , hus in he 11 h
Eu opean Con e ence on So wa e Main enance and Reenginee ing a wo kshop
on model-d i en so wa e e olu ion has been held. In [7] a su ey o he p oblems
aised by he e olu ion o model-based so wa e sys ems is made and i is s a ed
ha Model-D i en Enginee ing equi es mul iple dimensions o e olu ion. Ou
app oach deals wi h h ee o hese dimensions. On he o he hand, in [6] he
d awbacks o model d i en so wa e e olu ion a e analyzed, and as a conclusion
he au ho s s a e ha a dual app oach is needed, ha is, o use equi emen s
e olu ion o gene a e he model speci ica ion and he es speci ica ion o alida e
he sys em. Ou app oach ollows a op-down app oach, bu , a his poin we
a e no in e es ed in alida ion o e i ica ion.
In [3] incompa ibili ies be ween models and me amodels caused by me a-
model e isions a e aced up. The p oposed app oach is based on he sync oniza-
ion o models wi h e ol ing me amodels, bu his app oach only deals wi h one
dimension o e oulu ion, he me amodel e olu ion. [5] p oposes a amewo k
whe e so wa e a i ac s ha can be ep esen ed as MOF-complian models can
be synch onized using model ans o ma ions, bu hey a e ocused on acea-
bili y o changes o so wa e models . Finally, in [8], a sys ema ic, MDA-based
p ocess o enginee ing and main aining middlewa e solu ions is ou line. In ou
app oach, SWF can be conside ed as pa o a co po a e middlewa e.
5 Conclusions and Fu he Wo k
This pape has poin ed ou how we can ake bene i o he MDA philosophy in
o de o ha e a be e adap a ion o he di e en e sions o he same so wa e
p oduc . To do so, a case s udy based on he Sp ing Web Flow amewo k has
been in oduced. An analysis o he changes in oduced in he new e sion o
he amewo k has been made. Fu he mo e, wo di e en app oaches based on
model ans o ma ions ha e been conside ed o ace o me amodel e olu ion. In
his case, he ollowing a i ac s a e needed: one SWF 1.0 RC1 me amodel, one
SWF 1.0 me amodel, one web low me amodel ( his one, a he PIM le el), wo
se s o model o ex ans o ma ions (one o ob aining he XML ile con o ming
o SWF 1.0 RC1, and ano he one o ob aining he XML con o ming o SWF
1.0); and, inally, a se o model o model ans o ma ions, which will ans o m
he web low model (a he PIM le el) in o a model o SWF 1.0 RC1 and SWF
1.0, espec i ely.
One o he u u e wo ks is he implemen a ion, ia web, o a me amodel
eposi o y, in such a way ha we can coun wi h he me amodels o he di e en
e sions o he amewo ks. Thus, a se o me amodels will be publicly a ailable
in o de o imp o e he adap a ion o di e en eleases o a amewo k.
Re e ences
1. K. Czane cki and U.W. Eisenecke . Gene a i e P og amming. Me hods, Tools and
Applica ions. Addison Wesley, 2000.
2. S e en De ij e . Sp ing web low examined. Ja aLobby.
3. B. G uschko and D. S. Kolo os. Towa ds synch onizing models wi h e ol ing me a-
models. In P oc. In . Wo kshop on Model-D i en So wa e E olu ion held wi h he
ECSMR, 2007.
4. A. E. Hassan and R. C. Hol . A chi ec u e eco e y o web applica ions. In P o-
ceedings o he 24 d In . Con . on So wa e Enginee ing, 2002, pages 349–359, 2002.
5. I. I ko ic and K. Kon ogiannis. T acing e olu ion changes o so wa e a i ac s
h ough model synch oniza ion. In P oc. o he 20 h IEEE In e na ional Con e ence
on So wa e Main enance (ICSM’04), 2004.
6. H. M. Sneed. The d awbacks o model-d i en so wa e e olu ion. In P oc. In . Wo k-
shop on Model-D i en So wa e E olu ion held wi h he 11 h Eu opean Con e ence
on So wa e Main enance and Reenginee ing, 2007.
7. A. an Deu sen, E. Visse , and J. Wa me . Model-d i en so wa e e olu ion: A
esea ch agenda. In P oc. In . Ws on Model-D i en So wa e E olu ion held wi h
he ECSMR’07, 2007.
8. J. P. Wadsack and J. H. Jahnke. Towa ds model-d i en middlewa e main enance.
In P oc. In . Wo kshop on Gene a i e Techniques in he con ex o Model-D i en
A chi ec u e, 2002.