Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE564 Lecture 25

CSE564 Lecture 25

Software Design
Model-Driven Development
(202011)

B546a9b97d993392e4b22b74b99b91fe?s=128

Javier Gonzalez
PRO

September 25, 2020
Tweet

Transcript

  1. jgs CSE 564 Software Design Lecture 25: Model-Driven Development Dr.

    Javier Gonzalez-Sanchez javiergs@asu.edu javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. jgs Previously …

  3. jgs 564 00010100 Johnson (1997) § Component represent code reuse

    A framework is a reusable design represented by a set of components and the way they interact. A framework implement an architecture § Framework = Components + Design + Domain Specific Solution
  4. jgs 564 00010100 Framework vs Library § Inversion of Control:

    the framework determines the flow of control i.e., reuse of main § Model-View-Controller - a framework or an architectural pattern?
  5. jgs Next Model-Driven Development

  6. jgs 564 00010100 Definition Model-driven software development (MDD) § Write

    and implement software quickly, effectively and at minimum cost. § The approach focuses on the construction of a software model. § The model (text or graphic) specifies how the software system should work before the code is generated. § The software is created automatically (translate the model to code) § Tested and then deployed.
  7. jgs 564 00010100 MDD Development Process http://www.theenterprisearchitect.eu/blog/2009/08/05/a-metaphor-for-model-driven-engineering/

  8. jgs 564 00010100 MDD Development Process

  9. jgs 564 00010100 MDD Development Process

  10. jgs 564 00010100 MDD Development Process

  11. jgs 564 00010100 MDD Development Process

  12. jgs 0. The Tool: Eclipse Modeling Framework

  13. jgs 564 00010100 Eclipse § Eclipse is a universal platform

    for integrating development tools § Architecture based on plug-ins § SWT (Standard Widget Toolkit) is a generic graphics and GUI widget set § JFace is set of UI frameworks for common UI tasks § Workbench and Workspace are core – Editors, Views, and Perspectives
  14. jgs 564 00010100 Eclipse Modeling Framework 2. Model specification (it

    is stored as XMI but defined as text or diagram). A subset of UML class diagrams semantics 1. EMF provides tools and runtime environment. 3. Translate to Java Classes and Interfaces
  15. jgs 564 00010100 Download Eclipse Modeling Tools

  16. jgs 564 00010100 Eclipse Modeling Tools

  17. jgs 1. Define the Model

  18. jgs 564 00010100 Model UML Class Diagram Description

  19. jgs 564 00010100 Step 1 :: Project § Create an

    empty modeling project in your workspace File → New → Other… and choose Empty EMF Project § Click Next, enter a name for the project, e.g., org.eclipse.example.mymodel, and hit Finish
  20. jgs 564 00010100 Step 2 :: Model § Please right

    click the model folder in your new modeling project then New → Other… → Ecore Model, then click Next and give the ecore file the name myModel.ecore. § It will open in the default Ecore editor, which allows the definition of Ecore models in a tree-based view
  21. jgs 564 00010100 Step 2 :: Model :: Package §

    Give the package of your new model a name and an URI. This will be done in the properties view. The URI is used to identify the model later. Name the package myModel, Set the Ns Prefix to org.eclipse.example.myModel and the Ns URI to https://org/eclipse/example/myModel.
  22. jgs 564 00010100 Step 2 :: Model :: Classes and

    Attributes § Define model elements as children of the root package by right clicking on the myModel package and on the EClass respectively Add EClass as children, New Child → EClass Add EAttribute as children, New Child → EAttribute
  23. jgs 564 00010100 Step 2 :: Model :: Relationships §

    EReference between Course and Student, New Child → EReference EType of the reference to “Student” upper bound to “-1”, the equivalent of “many”. set the property Containment to “true”
  24. jgs 564 00010100 Step 2 :: Model :: Relationships §

    EReference between Student and Computer, New Child → EReference EType of the reference to “Computer” upper bound to “1” (default) set the property Containment to “false” § Save all
  25. jgs To be continued…

  26. jgs 564 00010100 Reference § Eclipse Modeling Framework by Frank

    Budinsky § EMF project on eclipse.org
  27. jgs CSE 564 Computer Systems Fundamentals Javier Gonzalez-Sanchez javiergs@asu.edu Fall

    2020 Disclaimer. These slides can only be used as study material for the class CSE564 at ASU. They cannot be distributed or used for another purpose.