2-Desarrollo Del Sw

download 2-Desarrollo Del Sw

of 42

Transcript of 2-Desarrollo Del Sw

  • 7/29/2019 2-Desarrollo Del Sw

    1/42

    2. Desarrollo de Software

    Dirigido por Modelos

    Agenda

    1. Introduction

    2. Models, Metamodels and Transformations

    3. Domain Specific Modeling4. Model Driven Development and Model Driven Engineering5. MDA primer

    6. Conclusions

    2

    CALIDAD DE SOFTWARE

  • 7/29/2019 2-Desarrollo Del Sw

    2/42

    Un recorrido por nuestrahistoria

    Ensamblador Registros: AX, BX, Segmentos: DS, SS, NOP

    JMPCALLRETURN

    Direcciones de memoria

    Demasiado bajo nivel Poca expresividad Programas muy complejos

    3

    Luego surgi la prog. estructurada

    Ensamblador Estructuras de control:ifProg. Estructuradawhile

    Abstraccin deprocedimientos

    Lenguajes

    Fortan

    PascalC

    Demasiado bajo nivel Poca expresividad Programas muy complejos

    4

  • 7/29/2019 2-Desarrollo Del Sw

    3/42

    Aparecieron los objetos

    Ensamblador Encapsulacion de datos ycomportamientoProg. EstructuradaInteracciones mediante

    Prog. O. Objetos intercambio de mensajesMecanismos:Herencia

    Vinculacin dinmicaPolimorfismo,

    Lenguajes:

    Eiffel, Smalltalk, C++, Java,

    Analisis Orientado a ObjetosDiseo Orientado a Objetos

    Demasiado bajo nivel Poca expresividad Programas muy complejos

    5

    Aparecen los componentes

    Ensamblador DistribucinHeterogeneidadProg. EstructuradaPackaging

    Prog. O. ObjetosMecanismos:

    Prog. O. Componentes Reflexin y MetadataPolimorfismo paramtricoHome, Contenedores,

    Lenguajes (IDLs), IDEsModelos y plataformasJ2EE, CORBA/CCM, .NET

    CBSE!

    Demasiado bajo nivel Poca expresividad Programas muy complejos

    6

  • 7/29/2019 2-Desarrollo Del Sw

    4/42

    Otra variante de la POO: los aspectos

    Ensamblador Crosscutting concernsNuevos conceptos:Prog. EstructuradaAspecto

    Prog. O. Objetos Joint pointProg. O. Componentes Weaving

    Prog. O. AspectosLenguajes O. aspectos

    AspectJ,

    AOSD!

    Early aspects

    Aspectos y componentes

    Demasiado bajo nivel Poca expresividad Programas muy complejos

    7

    Y ahora los servicios

    Ensamblador Mayor interoperabilidadMenor acoplamientoProg. EstructuradaAlta disponibilidad

    Prog. O. ObjetosNuevos conceptps

    Prog. O. Componentes Web ServicesWSDL, SOAP, UDDI,Prog. O. AspectosSemantic Web Services

    Prog. O. ServiciosBPEL

    ServicioService Bus

    SOA!

    Demasiado bajo nivel Poca expresividad Programas muy complejos

    8

  • 7/29/2019 2-Desarrollo Del Sw

    5/42

    Y despus?

    Ensamblador Prog. Estructurada

    Prog. O. Objetos Prog. O. Componentes

    Prog. O. Aspectos

    Prog. O. Servicios

    Prog. O. Eventos

    Prog. O. X???

    Prog. O. Y???

    Prog. O. Z??? Demasiado bajo nivel Poca expresividad Programas muy complejos

    9

    El problema es la complejidad

    [Borrowed from Dov Doris Tutorial on SysML Modeling at TOOLS 2008]

    10

  • 7/29/2019 2-Desarrollo Del Sw

    6/42

    El problema es la complejidad

    MaininframePC/NT apps

    VendorSetup

    DepositoryBanks

    Unix appsVendorMaintenance

    ProcessServersNEWSoundscan UAR - UniversalAccount

    I17CustomerPerceived3rd Party InterfaceBudgetAnalysisTool Printer

    (Imaging)

    S20-SalesMesa Data

    NPD Group AIGWarrantyGuard Roadshow Sterling VAN Mailbox(Value)Reconciliation

    In-Stock

    Maintenance Polling I13- Auto

    I06- Customer ReplenishmentI15HandScanApps

    AIS ReportsInsertions

    Printer POS01- Sales Order

    AIS CalendarOrders Corrections

    DueDates Print CostingI06Warehouse

    Broadcast GeneralMaintenanceInvoiceApp

    E13Management

    Stores & MrktsFilter E3Interface FringePO

    Smart Plus

    Smart Plus M03- Millennium3.0Launcher

    S07- Cell

    S04- Sales Posting

    P16- Tally Sheet Phones I03Returnto

    M02- Millennium D01Post LoadBilling Vendor S06- CreditApp

    Stock OptionsEquifax

    P15EES Employee I12Entertainment S09- Digital

    L02-ResourceScheduling ChangeNoticeA04- Cust

    Software Satellite System

    L01-PromoRefund Chks E01-EDI Analysis

    Resumix

    P14On-lineNew HireEntry

    P01-AAS V02-Price

    EmployeeMarketing

    Washington,Masterfile

    Support

    RGIS,Ntl BusSystemsCobra

    P09- P17CyborgFrick S11- ISP

    CTS CoCTO2

    I04HomeI10CyclePhysical Inventory Tracking

    ACHV04-Sign

    Deliveries

    Prodigy System U18- CTOBanks - ACH andPosto Pay POS

    I02- Transfers X92-X96

    PlanAdministrators HosttoAS400 Communication

    (401K,PCS, Life,SpecSource SKU Tracking

    B01- Stock StatusUnicare,SolomonSmithBarney)

    S08- VertexI09CycleCounts

    I11Price TestingSupplier

    Intercept Sales NPD, S02 -Compliance

    E02-EmployeePurchaseTax SoundScan Layaways

    SpecI01PO

    Scorecard- HRSource

    ReceivingSKU Performance

    V03- MktReactions L60MDFP09 S03-Polling I05 Coop

    Bonus/HR V01-Price ManagementSystem Inventory Info

    SKU SelectionTool

    I35- CEI K02

    ASIS CustomerRepair I35Early Warning ArthurPlanning

    I18Tracking

    System

    RebateTransferSKU Rep

    I55SKU I07PurchaseStore

    ELTInformation Order AdExpense

    MonitorPowerSuite G02- General

    LedgerStore

    Texlon3.5 SignScorecard

    SystemNARM I14Count Corrections Store Budget

    ValleyMediaReporting

    U16-TexlonCopyWriter's

    B02MerchandiseAnalysis

    WorkspaceEDI

    BMP - BusperformanceMngt

    Coordinator

    MerchMngrApprovalBatch ForecastingAIMS

    A05- APJournalEntry ToolKit

    AdMeasurementAIMS Admin

    Cellular INVENTORYCONTROL APPS- PC INVENTORYCONTROL APPS- PC ACCTS REC APPS- PC

    AIMS Rollover OTHER APPS- PC Code Alarm DebitReceivings DPI/CPIIC Batching 990COR Bad Debt

    AdLauncherReporting S05- HouseCharges AP- Collections/CreditTM- CreditCard DB

    Devo Sales D isplayInventoryInventoryAdj/CountCorrectInventoryControl Reports Beneficial Fees

    Beneficial Reconcile

    In Home JunkoutsInventoryLevels InventoryRoll JEAXFJEBFA

    PSPOptika USBankRecon File

    Promo CreditsMerchandise Withdrawal

    Open Receivings

    Merchandise Withdrawal

    JEBKAJEDVA

    C02- Capital RTVAccrual ShrinkPICountResults PITime Results from Inv

    JESOA

    Projects Connect3 ICMS Credit APResearch - InvCntrl Price ProtectionJEVSAJEVSF

    In-HomeSiteSeer

    APResearch-Addl Rpts

    Book to Perpetual InventorySales Flash Reporting Shrink Reporting

    NSFTeleCreditFeesDataWarehouse Repair Connect3 Connect3 Computer Intelligence Data

    Close OutReporting

    SKU Gross Margin SKU Shrink Level Detail(Interfacestoand fromtheData Warehouseare notF06- Fixed PDF Transfer Reports

    CashReceipts/Credit

    MiscAccounting/FinanceApps- PC/NTCountCorrections Cross Reffor VCB Dnlds USMVCB Downloads

    displayedonthis diagram) Warranty Billing AssetsCOBA (Corpoffice BudgetAssistant)

    Damage Write OffD ebitReceivings

    SystemStar Repair CashOver/ PCBS(Profit Center BudgetSystem) DFIVendor Database

    DisplayInventoryReconcileDisp lay Inven to ry ReportingShortMerchandisingBudget

    Diseo de una Aplicacin Real (Retail)

    11

    Technology is another problem...

    Too many platforms and technologies

    Distributed Objects, Components, Web services, ...Not really interoperable!

    Which technology is the best (today)?

    Too fast evolution

    Technologies evolve... and get obsolete very soonWhich technology will be out tomorrow? And howlong will it last?

    How to protect my investment in business logic?

    I want my business logic (processes, rules) to be as independentas possible from the supporting technologies

    So they can separately evolve.... Without having to start from scratch each time. And protecting the investment in each one

    12

  • 7/29/2019 2-Desarrollo Del Sw

    7/42

    Qu hacemos con esto?

    Es preciso romper ese nudoGorgiano

    La programacin no debe ser el centro de atencin. Hay que

    elevar NOTABLEMENTE el nivel de abstraccin Cmo sehace en otras ingenieras ms maduras?

    Ingenieras civiles (caminos, canales, puertos, )Arquitectura y construccin

    Ingeniera aeronuticay del espacio

    13

    Las ingenieras tradicionales usanmodelos

    Tan antiguos como las Ingenieras (p.e. Vitruvius)

    Los ingenieros tradicionales siempre construyen modelosantes de construir sus obras y artefactos

    Los modelos sirven para:Especificar el sistema Estructura,

    comportamiento,

    Comunicarse con los distintos stakeholders

    Comprender el sistema (si ya existe)Razonar y validar el sistema Detectar erroresy omisiones en el diseo

    Prototipado (ejecutar el modelo)Inferir y demostrar propiedades

    Guiar la implementacin

    14

  • 7/29/2019 2-Desarrollo Del Sw

    8/42

    Caractersticas de los modelos [Selic, 2003]

    Abstractos

    Enfatizan ciertos aspectosmientras ocultan otros

    ComprensiblesExpresados en un lenguajecomprensible por por losusuarios y stakeholders

    PrecisosFieles representaciones delobjeto o sistema modelado

    PredictivosDeben de poder ser usados para

    inferir conclusiones correctasBaratos

    Mas fciles y baratos de construir yestudiar que el propio sistema

    15

    Limitaciones actuales de los modelos(de software)

    Slo se usan como documentacinQue adems no se actualiza!

    Gap entre el modelo y la implementacin del sistemaGrandes diferencias semnticas en los lenguajes respectivosNo hay herramientas de propagacin automtica de cambios

    Cambios en el modelo no se reflejan en el cdigoCambios en el cdigo no se reflejan en el modelo(el modelo no vuelve a usarse jams tras la primera implementacin)

    Los distintos modelos del sistema no se armonizanSuponen vistas de un mismo sistema, pero no hay forma de relacionarlasNo hay herramientas de integracin de modelosCada lenguaje de vista tiene una semntica distinta del resto (*)

    No hay ni lenguajes ni herramientas para manejar modelos Soloeditores, pero no hay compiladores, optimizadores, validadores,transformadores de modelos, etc.

    Estamos realmente hablando de Ingeniera (del software)??

    16

  • 7/29/2019 2-Desarrollo Del Sw

    9/42

    The Remarkable Thing about Software

    Software has the rare property that it allows us to directlyevolve models into full-fledged implementations without

    changing the engineering medium, tools, or methods[John Hogg, 2003]

    Esto facilita enormemente garantizar la fiabilidad entre losmodelos y los sistemas producidos, puesto que todos viven en elmismo mundo

    Corolario: El modelo es la implementacin.Salvedad: Slo si el modelo contiene toda la informacinnecesaria para producir el sistema

    17

    Agenda

    1. Introduction

    2. Models, Metamodels and Transformations

    3. Domain Specific Modeling4. Model Driven Development and Model Driven Engineering5. MDA primer

    6. Conclusions

    18

  • 7/29/2019 2-Desarrollo Del Sw

    10/42

    What is a Model?

    A description of (part of) a systemwritten in a well-defined language.(Equivalent to specification.)

    [Kleppe, 2003]A representation of a part of the function, structureand/or behavior of a system [MDA, 2001]

    A description or specification of the system and its environment forsome certain purpose. A model is often presented as acombination of drawings and text. [MDA Guide, 2003]

    A set of statements about the system. [Seidewitz, 2003](Statement: expression about the system that can be true or false.)

    M is a model of S if M can be used to answer questions about S[D.T. Ross and M. Minsky, 1960]

    19

    What is a Model (2)

    1: obsolete : a set ofplans for a building2: dialect British : copy, image

    3: structural design

    4: a usually miniature representation of something ; also : a pattern of something to be made5: an example for imitation or emulation

    6: a person or thing that serves as a pattern for an artist ; especially : one who poses for an artist7: archetype

    8: an organism whose appearance a mimic imitates 9: one who isemployed to display clothes or other merchandise 10 a: a type or design

    of clothing b: a type or design of product (as a car)

    11: a description or analogy used to help visualize something (as anatom) that cannot be directly observed

    12: a system of postulates, data, and inferences presented as amathematical description of an entity or state of affairs;also: a computer simulation based on such a system

    13: version

    14: animal model http://www.merriam-webster.com/dictionary/model

    20

  • 7/29/2019 2-Desarrollo Del Sw

    11/42

    What is a Metamodel?

    A model of a well-defined language [Kleppe, 2003]

    A model of models [MDA, 2001]

    A model that defines the language for expressing a model[MOF, 2000]

    A meta-metamodel is a model that defines the language forexpressing a metamodel. The relationship between a meta-metamodel and a metamodel is analogous to therelationship between a metamodel and a model.

    A model of a modelling language [Seidewitz, 2003]

    That is, a metamodel makes statements about what can beexpressed in the valid models of a certain modelling language

    21

    OMGs four-layers metamodel hierarchy

    Level M 3the MOF

    MMM

    the SPEM the UML the CWMLevel M 2MM MM MM

    Level M 1a UML another UML

    model m model m

    Level M 0a particular another

    use of m use of m

    22

  • 7/29/2019 2-Desarrollo Del Sw

    12/42

    The Tower of Models

    23

    MOF Metamodel (simplified)

    24

  • 7/29/2019 2-Desarrollo Del Sw

    13/42

    Model Transformations

    25

    Examples of transformations

    Another UML modelUML Model

    Auto

    Color : StringDoor : IntegerEngine : Integer

    XMI DTD, SchemaIDL, Java

    interface Auto

    {public String color; Door*,public int Door; Engine*)>public int Engine;}

    26

  • 7/29/2019 2-Desarrollo Del Sw

    14/42

    ATL transformations

    module SimpleClass2SimpleRDBMS;

    create OUT : SimpleRDBMS from IN : SimpleClass;rule PersistentClass2Table{

    fromc : SimpleClass!Class (

    c.is_persistent and c.parent.oclIsUndefined()

    )

    to

    t : SimpleRDBMS!Table (name

  • 7/29/2019 2-Desarrollo Del Sw

    15/42

    ATL transformations

    module Person2Author;

    create OUT : MMAuthor from IN : MMPerson;rule Author {

    fromp : MMPerson!Person ( p.age >=18 )

    to

    a : MMAuthor!Author (

    name

  • 7/29/2019 2-Desarrollo Del Sw

    16/42

    More interesting transformations

    31

    Using annotations

    interface MyClass {

    int getAttributeOne(); void

    setAttributeOne(int v); int

    oneOperation(); }

    32

  • 7/29/2019 2-Desarrollo Del Sw

    17/42

    Using a Security Profile (Example)

    33

    Marks

    Marks distinguish multiple possible targets LocalInvocation

    Invocation

    PIM

    Kinds of marks PSM

    Discriminators and enumerators Remote[ isRemote | isBoolean ] Invocation

    Quantities( if ( numInstances < Q and frequency < F) LinkedList | HashTable )

    Inputs( appenddb_to all operation names )

    [Mellor, 2003]

    34

  • 7/29/2019 2-Desarrollo Del Sw

    18/42

    Agenda

    1. Introduction

    2. Models, Metamodels and Transformations3. Domain Specific Modeling

    4. Model Driven Development and Model Driven Engineering5. MDA primer

    6. Conclusions

    35

    Domain Specific Languages (DSL)

    Languages for representing different views of a system interms of models

    Higher-level abstraction than general purpose languages

    Closer to the problem domain than to the implementationdomain

    Closer to the domain experts, allowing modelers to perceivethemselves as working directly with domain concepts

    Domain rules can be included into the language asconstraints, disallowing the specification of illegal or incorrectmodels.

    36

  • 7/29/2019 2-Desarrollo Del Sw

    19/42

    Each notation is more apt for a task

    MCMLXVII 1.967

    + DLXXIX + 579

    ???

    37

    Each notation is more apt for a task

    MCMLXVII 1.967

    + DLXXIX + 579??? 2.546

    38

  • 7/29/2019 2-Desarrollo Del Sw

    20/42

    Each notation is more apt for a task

    MCMLXVII 1.967

    + DLXXIX + 579

    MMDXLVI 2.5469

    39

    How do you solve this problem?

    A 40-years-old man has a daughter and a son. If thedifference of age between the kids is 4 years, and the sum oftheir ages is half of the age of the father, how old are they?

    x - y = 4 x = 12+ x + y = 20 y = 8

    2x = 24

    Solution: the older is 12 and the younger is 8

    40

  • 7/29/2019 2-Desarrollo Del Sw

    21/42

    Problems, Notations, Solutions

    An invariant through the history of mature disciplines is thesearch for notations that allow formulating problems in alanguage that allows their easy solution

    http://en.wikipedia.org/wiki/History_of_mathematical_notationhttp://en.wikipedia.org/wiki/Temporal_logic

    41

    Domain Specific Modeling

    Several notations for Domain Specific Modeling (DSM)already available

    Abstract and concrete syntaxes for the definition of models,metamodels and their representations

    Enable the rapid and inexpensive development of DSLs andassociated tools (e.g., editors)

    Repositories of metamodels and model transformationsalready in place

    Eclipse/GMT/AM3 projectMDWEnet initiative

    42

  • 7/29/2019 2-Desarrollo Del Sw

    22/42

    DSLs

    DSLs are defined in terms ofAbstract syntax (domain concepts and rules)Concrete syntax (language representation)

    Metamodels used to representthe abstract syntax

    Modelsconform tometamodels

    Metamodels are models, tooA metamodel conforms to its

    meta-metamodel

    This tower usually ends at level 4

    43

    An example of a domain-specific model

    44

  • 7/29/2019 2-Desarrollo Del Sw

    23/42

    An example of a (more useful) DSL

    http://www.youtube.com/watch?v=NZNTgglPbUA

    45

    What is in a metamodel?

    A metamodel describes

    the concepts of the language, therelationships between them, and

    the structuring rules that constrain the model elements andcombinations in order to respect the domain rules

    46

  • 7/29/2019 2-Desarrollo Del Sw

    24/42

    Some questions

    It is not clear from the SimpleStateMachines metamodelwhat happens if an event occurs and there is no transitionthat can be triggered.

    Is the event lost, or is it held until the state machine reaches astate with a transition that can be triggered by the event?

    What is the behavior of the system when it contains internaltransitions? How do they exactly behave?

    47

    Semantics

    These descriptions only capture thestaticspecification ofthe language

    [Robin Milner]: A (meta)model consists of some concepts,

    and a description of permissible activity in terms of theseconcepts.

    [Chen et al]: Metamodelsemantics

    Structural semantics: describe the meaning of models in termsof the structure of model instances: all of the possible sets ofcomponents and their relationships, which are consistent withthe well-formedness rules

    Behavioral semantics: describe the evolution of the state of themodeled artifacts along some time model

    48

  • 7/29/2019 2-Desarrollo Del Sw

    25/42

    Semantics of Models

    49

    The Meaning of Models

    There are only 10 types of people in theworld: Those who understand binary, andthose who don't

    50

  • 7/29/2019 2-Desarrollo Del Sw

    26/42

    Sure?

    There are only 10 types of people in theworld: Those who understand binary, andthose who don't

    51

    Same model for different concepts

    210

    There are only 10 types of people in theworld: Those who understand binary, andthose who don't

    Your meaninggoes here

    52

  • 7/29/2019 2-Desarrollo Del Sw

    27/42

    Different models for the same concept

    10 X 1010 0A

    10

    53

    What does this model mean?

    54

  • 7/29/2019 2-Desarrollo Del Sw

    28/42

    What does this model mean?

    How do the models that conform to it behave?

    55

    Why do I need to assign meanings tomodels?

    What do I need models for?Describe the system

    Structure, behaviour, ...Separate concepts at different

    conceptual levelsCommunicate with stakeholders

    Understand the system If existing(legacy applications) Validate themodel [Selic, 2003]

    Detect errors and omissions in design ASAPMistakes are cheaper at this stage

    Prototype the system (execution of the model)

    Formal analysis of system propertiesDrive implementation

    Code skeleton and templates, complete programs (?)

    56

  • 7/29/2019 2-Desarrollo Del Sw

    29/42

    How do we assign meaning?

    How do we express the meaning of

    Structure?

    Behavior?Time-dependent functionality?QoS properties?

    Which is the best notation for each of those aspects?It depends on the purpose of the model

    and must have a precise meaning

    57

    Semantic bridges

    As Model Transformations!!!Types

    DomesticHorizontalVertical

    AbstractingRefining

    PruningForgetful

    The relationship between domains D and D isdefined by a model transformation T:D->D.

    [[M]]D := [[T(M)]]D

    58

  • 7/29/2019 2-Desarrollo Del Sw

    30/42

    Agenda

    1. Introduction

    2. Models, Metamodels and Transformations3. Domain Specific Modeling

    4. Model Driven Development and Model Driven Engineering5. MDA primer

    6. Conclusions

    59

    The MDE Landscape

    MDE = Model Driven Engineering (aka MBE)

    MDD = Model Driven MDM = Model DrivenDevelopment (aka MDSD) Modernization

    MDA = Model Driven ADM = ArchitectureArchitecture Driven Modernization

    MDI = Model Driven Interoperability MBA = MB Acquisition

    MIC = Model Integrated Computing MD*

    60

  • 7/29/2019 2-Desarrollo Del Sw

    31/42

    Model Driven Development (MDD)

    An approach to software development in which the focusand primary artifacts are models (as opposed to programs)and model transformations

    (compare with current language-driven approaches, whose first-classentities areprogramsandcompilers)

    MDD implies the (semi) automated generation ofimplementation(s) from models

    Modeling languages are key to MDDModel transformation languages are also modeling languagesModels conform to meta-models

    MDA is the OMGs proposal for MDD, using OMG standards:MOF, UML, OCL, XMI, QVTMOF and UML allow the definition of new families of languages(by using, e.g., UML Profiles)

    61

    Reasons for using MDE

    You want to provide a way for your domain-experts to formallyspecify their knowledge, and technology people define how this isimplemented (using model transformations).

    You might want to provide different implementations (i.e. more

    concrete models) for the same model, perhaps because you wantto run it on different platforms (.NET, Java, CORBA).

    You may want to capture knowledge about the domain, thetechnology, and their mapping uncluttered with details from theother areas.

    In general, you dont want to bother with implementationdetails when specifying you functionality.

    MDD results in a fan-out, i.e. one set of models can be the sourcefor transformations to several targets.

    62

  • 7/29/2019 2-Desarrollo Del Sw

    32/42

    MDE: Principles, Standards and Tools

    63

    Agenda

    1. Introduction

    2. Models, Metamodels and Transformations

    3. Domain Specific Modeling4. Model Driven Development and Model Driven Engineering5. MDA primer

    6. Conclusions

    64

  • 7/29/2019 2-Desarrollo Del Sw

    33/42

    Model Driven Architecture

    MDA es una iniciativa de la OMGAnunciada en el 2000

    10 aos de plazo para madurar

    Debe durar al menos 20 aos

    Extiende OMA

    Las plataformas middleware pasan a unsegundo planoLa clave son los modelos

    MDA aboga por la separacin de la especificacin de la

    funcionalidad de un sistema, independiente de su implementacinen cualquier plataforma tecnolgica concreta

    http://www.omg.org/mda

    65

    Ventajas (esperadas) de MDA

    Protege la inversin ante los continuos cambios en las tecnolgiasConserva los PIM de una empresa (su modelo de negocio) cuandoaparece nuevo middleware

    Permite abordar mejor sistemas ms complejos Mediante la

    separacin de diferentes aspectos en diferentes modelos

    Permite la simulacin y la implementacin automtica de losmodelos

    Permite la integracin de sistemas existentes (COTS, legacysystems)

    ADM: Architecture Driven Modernization

    Permite la especificacin de los requisitos del sistema

    independientemente de las plataformas de implementacinMBA: Model-Based Adquisition

    66

  • 7/29/2019 2-Desarrollo Del Sw

    34/42

    MDA Concepts

    ViewpointA viewpoint on a system is a technique for abstraction using aselected set of architectural concepts and structuring rules, in order

    to focus on particular concerns within that systemViewA viewpoint model or view of a system is a representation of thatsystem from the perspective of a chosen viewpoint

    ImplementationAn implementation is a specification, which provides all theinformation needed to construct a system and to put it into operation

    Platform

    A set of subsystems/technologies that provide a coherent set

    of functionality through interfaces and specified usagepatterns that any subsystem that depends on the platform canuse without concern for the details of how the functionalityprovided by the platform is implemented.

    67

    MDA models (1/2)

    Computation Independent Model (CIM)A view from a system from the Computational IndependentViewpoint.

    A CIM Focuses on the system and its environment; the details of thestructure of the system are hidden or as yet undetermined. A CIM is

    sometimes called a domain model or a business model, and isspecified using a vocabulary that is familiar to the practitioners ofthe domain in question

    It may hide much or all information about the use of automated dataprocessing systems.

    Platform Independent Model (PIM)A platform independent model is a view of a system from the platformindependent viewpoint. A PIM exhibits platform independence and issuitable for use with a number of different platforms of similar type.

    68

  • 7/29/2019 2-Desarrollo Del Sw

    35/42

    MDA models (2/2)

    Platform Specific Model (PSM)

    A platform specific model is a view of a system from the platformspecific viewpoint.

    A PSM combines the specifications in the PIM with the details thatspecify how that system uses a particular type of platform.

    Platform Model (PM)

    A platform model provides a set of technical concepts, representingthe different kinds of parts that make up a platform and the servicesprovided by that platform.

    It also provides, for use in a platform specific model, conceptsrepresenting the different kinds of elements to be used in specifyingthe use of the platform by an application.

    69

    Examples of MDA models

    CIMUse case models capturing the system requirements

    PIMThe software architecture of the system, that describes how the

    functionality of the system is decomposed into (architectural)components and connectors

    PSMA model of the J2EE implementation of the system, expressed usingthe EJB Profile that describes how the (architectural) componentsneed to be implemented by EJBs

    CodeThe EJBs themselves, their configuration files, etc., ready to bedeployed.

    70

  • 7/29/2019 2-Desarrollo Del Sw

    36/42

    Model transformations: MDA Pattern

    Model transformation is the

    process of converting onemodel to another model of

    the same system

    The MDA pattern includes (atleast):

    a PIM,

    a Platform Model, aTransformation, and aPSM

    71

    Cmo se construye una aplicacin usandoMDA

    Un modelo detallado, que Se comienza con elespecificara la estructura

    Platform- Platform-Independentdel sistema, las pre- yIndependent Model (PIM) queModel post-condiciones en OCL, representa la lgica del

    y el comportamiento ennegocio y su

    Action Semanticsfuncionalidad,Language (por ejemplo)independiente de losdetalles de laimplementacin

    72

  • 7/29/2019 2-Desarrollo Del Sw

    37/42

    Se genera el PSM

    Se escoge una plataforma Las transformacionesconcreta, y el PIM se

    Platform- pueden ser definidas contransforma al modeloIndependent QVT, entre los

    Model PSM correspondiente a metamodelos origen yesa plataforma

    destino.

    Las transformacionesCORBA

    pueden ser parcial oModel

    completamenteautomatizadas

    73

    Generacin a mltiples tecnologas

    Pero las Las transformacionestransformaciones pueden

    Platform- pueden ser definidas conrealizarse a otrasIndependent QVT, entre losModel plataformas metamodelos origen y

    destino.

    Las transformacionesCORBA Java/EJB XML/SOAP Other

    pueden ser parcial oModel Model Model Model

    completamenteautomatizadas

    74

  • 7/29/2019 2-Desarrollo Del Sw

    38/42

    Generacin de implementaciones

    Write Once, Run Everywhere

    Model Once, Generate Everywhere!

    Los PSM se transforman Es fcil contar conen interfaces, cdigo,

    Platform- implementadoresGUIs, preguntas SQL, etc.Independent automticos a partir de

    Model modelos especficos,pues son de muy bajonivel

    CORBA Java/EJB XML/SOAP Other

    Model Model Model Model

    CORBA Java/EJB XML/SOAP Other

    75

    ADM e integracin de sistemas

    Usamos ingeniera Muy til para:inversa para construir

    Platform- modelos de aplicaciones (1) Integracin enIndependentModel existentes nuestra aplicacin de

    COTS, sistemas deterceras casas, ysistemas heredados

    Legacy COTS Other

    App App Model (2) Architecture DrivenModernization:modernizacin desistemas actuales

    Code NASA, DoD, EDF, Banca

    76

  • 7/29/2019 2-Desarrollo Del Sw

    39/42

    Generacin de bridges

    Los bridges (puentes)Platform-

    Independent pueden generarse deModel forma automtica en la

    mayora de los casos,tanto dentro de la propiaempresa, como para

    Los bridges se lograr interoperabilidadCORBA XML/SOAPconstruyen a partir

    Model Model entre sistemas dede los modelos diferentes compaas

    CORBA XML/SOAP

    System SystemInteropBridge

    77

    Applying the MDA Patternseveral times

    The MDA pattern can be [has tobe usually] applied severaltimes in succession

    What is a PSM resulting from

    one application of the pattern,will be a PIM in the nextapplication

    Each plataform can thenaddress one particular aspectof the system, and aresuccessively applied

    This process is modular and

    ordered

    78

  • 7/29/2019 2-Desarrollo Del Sw

    40/42

    Advantages

    Each model is independent from the rest

    Separately defined

    Each model defines its ownentities, and resides at a well-defined

    level of abstraction

    Software development becomes model transformationEach step transforms (one or more) PIM at one level into(one or more) PSM at the next level

    ...Until a final system implementation (PSM) is reached

    Transformations can be automated

    We gain modularity, flexibility, and facilitate evolutionApplication models capturing business logic and IP become

    corporate assets, independent from the final implementationtechnologies

    79

    The MDA way

    Define the system PIMs (structure, behavior, navigation,presentation, components, distribution, ...) Select thetarget platform(s)

    Web pages (navigation), Java (Travel Agency), WSDL and JWSDP(external services: banks, airlines, ...),...

    Define the transformations

    Either using transformation rules between the PIM metamodels (thePIM languages) and the target platforms metamodels Or bymarking the PIM elements using the marks defined by the mappings

    Apply the mappings to the PIM elements Using atransformation engine, or manually This willproduce a set of elements of different PSM

    Bridges (e.g., calls) between elements in heterogeneous targetPSMs should be defined!

    80

  • 7/29/2019 2-Desarrollo Del Sw

    41/42

    The two current MDA approaches

    Models do not contain all the Models are a complete, executable

    information (e.g. behavior) statement of a solutionMissing information is added as Model compilers translate theserefinement in the PSM or code models into a running system

    Round-trip engineering is sometimes ASL are used to model behaviorpossible No manual intervention required

    81

    MDAcomponents

    Transfor-Model Transform. Code Text CodeMations

    Editors Tools GeneratorsEditors Files

    MDE bus: Model Interchange (XMI, IDL o JMI)

    Transform. Model Models ModelIDE

    Repository Validators Repository Weavers

    82

  • 7/29/2019 2-Desarrollo Del Sw

    42/42

    Conclusions

    MDD and DSM seem to be the right way to goConceptually clean and well defined

    Protect investment and IP by separating the business model from the

    supporting technologiesModel centric!

    but MDD is not the panaceaMany skeptical positions and critiques

    No manual coding is not 100% achievable in general We needto identify the domains in which MDD can be effectively used,and develop tools for it (e.g., Web-based systems)

    In any case, it is working *NOW* for many domainshttp://www.omg.org/mda/products_success.htm

    83

    MDA Tools (see also http://www.omg.org/mda)

    ATL ATLAS Transformation Language is language for general transformation within the MDA frameworkMIA Model-in-Action is a tool that implements the concepts of MDA.

    OptimalJ is a MDA tool for J2EE.

    ArcStyler is a MDA tool for J2EE and .NET.

    UMT UML Model Transformation is a tool for model transformation and code generation of UML/XMI modelsMTL Model transformation at Inria ModelWare

    ModFact is an Open Source project for the MDA at LIP6AndroMDA is an open source code generation framework that follows the MDA paradigm Middlegen is a freegeneral-purpose database-driven code generation engine based on JDBC , Velocity , Ant and XDoclet

    OpenModel is a java-based framework for generating executable applications from UML models and itcomplements ArgoUML

    MCC is a MDA tool supporting J2EE and .NET(in the works).Codagen Architect is MDA tool for J2EE and .NET. UMLX isan experimental graphical transformation language. MDATransfis a MDA transformation engine

    GMT (Generative Model Transformer) is a project to build MDA tools such as UMLX JAMDA (JavaModel Driven Architecture) is an open-source framework for building applications generators whichcreate Java code from a model of the business domain