MDSE Book Slides Chapter3

Embed Size (px)

Citation preview

  • 8/17/2019 MDSE Book Slides Chapter3

    1/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Teaching material for the booModel-Driven Software Engineering in Practiceby Marco Brambilla, Jordi Cabot, Manuel Wimmer.Morgan & Claypool, !"#, 2012.

    www.mdse-book.com

    M$"% !"% C#"%"

    Chapter #

  • 8/17/2019 MDSE Book Slides Chapter3

    2/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    www.mdse-book.com

    M$"% '%" (#) B%*'+$C'$% %+%)#T-'+

  • 8/17/2019 MDSE Book Slides Chapter3

    3/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    M$"% ha many application/ M$$ i u t the tip of the

    iceberg/ #nd M$# a pecific

    reali ation3 of M$$ 4hen

    u ing 'M tandard

  • 8/17/2019 MDSE Book Slides Chapter3

    4/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Three iller M$"% applicationCode

    Generation

    Software

    Modernization

    Systems

    interoperabilit

  • 8/17/2019 MDSE Book Slides Chapter3

    5/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    www.mdse-book.com

    !"% C#"%1 5 M'$%6$)-7%+ $%7%'8M%+T

  • 8/17/2019 MDSE Book Slides Chapter3

    6/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    M$$ contribution9 Communication/ Model capture and organi e the under tanding of the

    y tem 4ithin a group of people/ Model a lingua franca bet4een actor from bu ine

    and -T di:i ion

  • 8/17/2019 MDSE Book Slides Chapter3

    7/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    M$$ contribution9 8roducti:ity/ M$$ ; emi

  • 8/17/2019 MDSE Book Slides Chapter3

    8/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    %=ecutable model/ #n e=ecutable model i a model complete enough to be

    e=ecutable/ (rom a theoretical point of :ie4, a model i e=ecutable

    4hen its operational semantics are f ll$ specified/ -n practice, the e=ecutability of a model may depend on

    the adopted e=ecution engine/ model 4hich are not entirely pecified but that can be e=ecuted by

    ome ad:anced tool that are able to fill the gap

    / Completely formali ed model that cannot be e=ecuted becau e anappropriate e=ecution engine i mi ing.

  • 8/17/2019 MDSE Book Slides Chapter3

    9/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    "mart : dumb e=ecution engine/ C)!$ operation typically account for >0? of the o:erall

    oft4are functionality/ @uge pared effort through imple generation rule

  • 8/17/2019 MDSE Book Slides Chapter3

    10/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    %=ecutable model/ Mo t popular9 %=ecutable !M6 model/ %=ecutable !M6 de:elopment method ;=!M6< initially

    propo ed by "te:e Mellor/

    Ba ed on an action language ; ind of imperati:ep eudocode<

    / Current tandard/ (oundational "ub et for %=ecutable !M6 Model ;f!M6</ #ction language i the #ction 6anguage for f!M6 ;#lf<

    / ba ically a te=tual notation for !M6 beha:ior that can be attached to a!M6 model

  • 8/17/2019 MDSE Book Slides Chapter3

    11/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    %=ecutable model 9 2 main approache

    / Code generation 9 generating running code from a higherle:el model in order to create a 4or ing application/ by mean of a rule ba ed template engine/ common -$% tool can be u ed to render the ource code

    produced

    / Model interpretation 9 interpreting the model andma ing them run

    / +on empty inter ection bet4een the t4o option

  • 8/17/2019 MDSE Book Slides Chapter3

    12/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Code eneration/ oal9 generating running code from higher le:el model

    / 6i e compiler producing e=ecutable binary file from ource code/ #l o no4n a model compiler

    / 'nce the ource code i generated tate of the art -$%can be u ed to manipulate the code

  • 8/17/2019 MDSE Book Slides Chapter3

    13/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Code eneration9 "cope

  • 8/17/2019 MDSE Book Slides Chapter3

    14/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Code eneration9 Benefit/ -ntellectual property/ "eparation of modeling and e=ecution/ Multi platform generation

    / enerator impler than interpreter/ )eu e of e=i ting artefact/ #daptation to enterpri e policie/ Better performance

  • 8/17/2019 MDSE Book Slides Chapter3

    15/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Code eneration9 8artial eneration/ -nput model are not complete & code generator i not

    mart enough to deri:e or gue the mi ing information/ 8rogrammer 4ill need to complete the code manually/

    Ca tion% Brea ing the generation cycle i dangerou

    Sol tions&/ $efining protected area in the code, 4hich are the one

    to be manually edited by the de:eloper / ! ing round trip engineering tool ;not many a:ailable</ Better to do complete generation of part of the y tem

    in tead of partial generation of the full y tem

  • 8/17/2019 MDSE Book Slides Chapter3

    16/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Code eneration9 Turing te t/ # human udge e=amine the code generated by one

    programmer and one code generation tool for the ameformal pecification. -f the udge cannot reliably tell thetool from the human, the tool i aid to ha:e pa ed thete t

  • 8/17/2019 MDSE Book Slides Chapter3

    17/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Model interpretation/ # generic engine par e and e=ecute the model on the fly u ing an

    interpretation approach

    / Benefit

    / (a ter change & Tran parent ;re

  • 8/17/2019 MDSE Book Slides Chapter3

    18/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    eneration and interpretation/ Can be u ed together in the ame proce

    / -nterpretation at early protoyyping A debugging time/ eneration for production and deployment

    / @ybrid olution are po ible9/ Model interpretation ba ed on internal code generation

    implementation/ Code generation that relie on predefined, configurable

    component A frame4or at runtime. The generated code i e.g.,M6 de criptor A configuration of the component

  • 8/17/2019 MDSE Book Slides Chapter3

    19/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    www.mdse-book.com

    !"% C#"%2 5 "*"T%M"-+T%)'8%)#B-6-T*

  • 8/17/2019 MDSE Book Slides Chapter3

    20/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    -nteroperability/ #bility of t4o or more y tem to e=change information

    ;-%%%<

    / +eeded for collaborati:e 4or ;e.g. u ing different tool

  • 8/17/2019 MDSE Book Slides Chapter3

    21/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Model $ri:en -nteroperability/ M$"% techniDue to bridge the interoperability gap

    / The metamodel ;i.e. chema 3< of the t4o y tem aremade e=plicit and aligned

    / Tran formation follo4 the alignment to mo:e information/ -n ector ;te=t to model< repre ent y tem # data a a model

    ; yntactic tran formation</ M2M tran formation adapt the data to y tem B metamodel

    ; emantic tran formation</ %=tractor ;model to te=t< generate the final "y tem B output data

    ; yntactic tran formation

  • 8/17/2019 MDSE Book Slides Chapter3

    22/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    M$-9 lobal chema

  • 8/17/2019 MDSE Book Slides Chapter3

    23/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    www.mdse-book.com

    !"% C#"%E 5 M'$%6$)-7%+ )%7%)"%%+ -+%%)-+

  • 8/17/2019 MDSE Book Slides Chapter3

    24/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    +eed for re:er e engineering

  • 8/17/2019 MDSE Book Slides Chapter3

    25/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Model dri:en re:er e engineering/ 'h$( Model pro:ide an homogeneou and interrelated

    repre entation of all legacy component .+o information lo 9 initial model ha:e a 191corre pondance 4ith the code

    Discover

    Models

    )nderstand

    Viewpoints

    *egenerate

    NewSoftware Artifacts

    egacy artifacts : source code con guration lestests

    databases etc.

  • 8/17/2019 MDSE Book Slides Chapter3

    26/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.Model-Driven Software Engineering In Practice . Morgan & Claypool 2012.

    Model $ri:en -nteroperability9 %=ample

    C'B'6 model

    Modeldiscover$

    C'B'6s$stem

    C'B'6 metamodel

    T2M

    Modelnderstanding

    Modelgeneration

    !M6models

    !M6metamodel

    M2M

    M2M ;refactoring <

    Ja:amodel

    Ja:as$stem

    Ja:ametamodel

    M2M M2T

  • 8/17/2019 MDSE Book Slides Chapter3

    27/27

    Marco Brambilla, Jordi Cabot, Manuel Wimmer.

    Teaching material for the booModel-Driven Software Engineering in Practiceby Marco Brambilla, Jordi Cabot, Manuel Wimmer.Morgan & Claypool, !"#, 2012.

    www mdse book com

    M!DE+-D*I,E S! /'0*EE 1I EE*I 1 I P*0C/ICEMarco Brambilla,Jordi Cabot,Manuel Wimmer.

    Morgan & Claypool, !"#, 2012.444.md e boo .com444.morganclaypool.com or buy it at9 444.ama on.com

    http://www.mdse-book.com/http://www.morganclaypool.com/http://www.amazon.com/gp/product/1608458822/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1608458822&linkCode=as2&tag=marbramoddris-20http://www.amazon.com/gp/product/1608458822/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1608458822&linkCode=as2&tag=marbramoddris-20http://www.morganclaypool.com/http://www.mdse-book.com/