Web technologies: Model Driven Engineering


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Web technologies: Model Driven Engineering

  1. 1. Web Technologies Introduction toModel Driven Engineering Piero Fraternali piero.fraternali@polimi.it Skype: pierofraternali
  2. 2. Models: a meeting place for developers & users
  3. 3. Motivations• “Supply of talented IT staffers isnt keeping up with #applications demand. And it wont change ers anytime soon.” ram m #p rog – Eric Chabrow, in The New IT Worker Shortage, CIOInsight 2005 2010 2015 2020 2009
  4. 4. From crafting to fabrication• Engineering addresses the optimization of production by means of abstraction and standardization• Products are modeled, verified, and produced using standard models and methods
  5. 5. Models• A model is an ABSTRACT REPRESENTATION of a product, service or system that allows us to investigate, verify, and document its properties BEFORE production
  6. 6. Software as an engineering product• SW is an engineering product• BUT: – It can be changed easily, even after delivery and during usage – It is produced in short time and at low cost – It must satisfy a broad spectrum of requisities, hard to quantify• SO engineering practices are not always applied
  7. 7. Software Models• Software Engineering has a long tradition on the use of abstraction and software models• MODEL DRIVEN ENGINEERING• SOFTWARE MODELS are – An abstract representation of a system, independent of technology – A tool for expressing and verifying requirements – A starting point for automatically generating the code
  8. 8. History• Software models are as old as software• Flow diagrams were the first tool for describing software• Programming language and models evolved together – Imperative programming – flow diagrams – Info systems – ER – OO systems – object models
  9. 9. Milestones D. Harel, "Statecharts: A Visual Formalism for Complex Systems", (1987)P.- ChenThe Entity-RelationshipModel-Towarda UnifiedView of DataTODS 1976
  10. 10. Outlook (by Gartner 2010)• Key Findings in MDE – The complexity of new, service-oriented architectures (SOAs) and business process management (BPM) demand more- abstracted, model-driven approaches. – Business and IT modeling standards and technologies are converging. – The differences between design time and runtime technologies are disappearing
  11. 11. Modeling convergence
  12. 12. Outlook (by Gartner 2010)• Recommendations – Ensure collaboration among the IT organization, business process architects and the analysts who are using these models; – Use multiple methodologies and approaches to Application Development — especially those that leverage modeling efforts, agile methods, and reusable design patterns and frameworks to improve productivity, while ensuring quality and performance. – Implement the role of application architect to promote reusable software and data services.
  13. 13. Economic Value (BPM)
  14. 14. MDA: The Modern Age of MDE• Object Management Group (OMG) unified several modeling languages into a coherent proposal (MDA= Model Driven Architecture) setting the stage for a convergence of architecture, languages, notations, and tools• UML is the most popular ingredient of MDA but not the only one
  16. 16. History• 1989: OMG formed to create a standard for distributed object systems• 1991: Corba 1.0 specification released• 1996: OMG includes modeling as a focus• 1997: UML adopted by OMG• 2001: OMG adopts MDA• 2005: UML 2.0 adopted by OMG• 2006: BPMN standard adopted by OMG• 2009: BPMN 2.0 beta 1
  17. 17. OMG MDA standards• OMG Standards – Modeling – UML – Metamodeling – MOF – Action semantics – Model interchange – XMI – Human-usable textual notation – HUTN – Model-based testing and debugging – Domain-specific UML profiles
  18. 18. MDA core concepts• System = the subject: a program, a single computer system, some combination of parts of different systems, a federation of systems, each under separate control, people, an enterprise, a federation of enterprises…• Problem space (Domain): the context where the system operates• Solution Space: the spectrum of possible solutions that satisfy the system requirements• Model: a (partial or total, abstract or concrete) representation of the system and its environment
  19. 19. MDA core concepts• Architecture = specification of the parts and connectors of the system and the rules for the interactions of the parts using the connectors• Viewpoint: description of a system that focuses on particular concerns• View: a model of a system under a specific viewpoint• Transformation: the conversion of a model into another model
  20. 20. MDA core concepts• Platform: set of subsystems and technologies that provide a coherent set of functionality through interfaces and specified usage patterns (e.g., JEE, .NET)• Platform Model: a set of technical concepts, representing the different parts that make up a platform and the services provided by that platform
  21. 21. Development• In MDA development is a chain of transformations from model to model, until enough “concreteness” is incorporated to make the model “executable”
  22. 22. How are models specified• M0: a concrete system, M3: meta-meta-model your application describes• M1: the model of your describes system• M2: the concepts used to represent your models M2: meta-model (e.g., UML or BPMN metamodels) describes• M3: the formalism that dicates the rules for M1: model defining modeling languages (e.g., UML describes metamodel expressed in Meta Objet Format-MOF) M0: system
  23. 23. Example metamodel customer order modelCustomer_table Order_table system
  24. 24. Why meta-models• Allow a syntactically precise definition of modeling languages• Can be read by tools, enable portability, model parsing (syntactic) checking• Like grammars for textual languages and ontologies for semantic languages The WebML metamodel (fragment)
  25. 25. Classes of models (viewpoints)• Computation Independent Models: CIM represent the business view of the system mapping• Platform Independent Models: represents the PIM system abstracting from technology mapping• Platform Specific Models: represents the PSM system considering technology
  26. 26. CIM: examples• Business Process Modeling Notation: – BPMN provides a Business Process Diagram (BPD), which is a Diagram designed for use by the people who design and manage business processes.
  27. 27. PIM: examples• Production Rule Representation (PRR) – a standard production rule representation that is compatible with rule engine vendors definitions of production rules• Product Lifecycle Management Services (PLM) – a PIM for Product Lifecycle Management Services derived from the ISO 10303-214 STEP model• Gene Expression (GENE) – representation of gene expression data and relevant annotations, as well as mechanisms for exchanging these data• General Ledger (LEDG) – interfaces and their semantics to enable interoperability between General Ledger systems and accounting applications
  28. 28. Model Transformations• The application of Source mapping rules and model knowledge to a Additional information source model to obtain a target model Transfor• Can use different mation Design styles, based on how Patterns the mapping rules are specified Target model
  29. 29. In this CourseCIM • Business process Modeling Notation mapping (BPMN 2.0)PIM • Web Modeling mapping Language (WebML) • Java enterprisePSM Edition (JEE)
  30. 30. Domain Specific Languages (DSL)• DSL: a language for describing systems in a specific domain (Web apps, embedded systems, etc)• General Purpose Language: a language for describing systems in multiple domains (e.g., UML)
  31. 31. MDA and DSL• MDA offers two standard ways to define DSLs• Stereotyping: UML 2.0 elements are overloaded with domain specific meaning• Metamodelling: new language constructs are defined
  32. 32. GPL vs DSL• GPL • DSL – (Often) Standard – Easier to learn for domain – Portable across tools experts – More complex – More precise semantics, – better checking Less intuitive to learn – More amenable to – Lack of precise semantics optimized code generation – Harder to use for code – Narrower scope generation – Non standard – Less portable across tools
  33. 33. GPL: UML• A concrete syntax for specifying any kind of system• Customizable with extension mechanism (family of languages: Real-Time UML, UML for EDOC..)• Supported by tools
  35. 35. DSL: forms
  36. 36. DSL: examplesDSL Application DomainBNF (1950! ) Syntax SpecificationHTML Hypertext Web PagesMATLAB Technical ComputingSQL Database QueriesLaTex Text processing Marjan Mernik, University of Maribor Jan Heering, CWI Anthony M. Sloane, Macquarie University ACM Computing Surveys, Vol 37, No. 4
  37. 37. Executability of DSL• Well-defined execution semantics – HTML• Input language of an application generator – WebML: Web/SOA modeling – Application generator compiles the DSL into a GPL (Java) – More declarative, well-defined execution semantics (StateCharts)• Not executable but useful for application generation – BNF: purely declarative, but can be an input language for a parser generator• DSL not meant to be executable – Domain-specific data structure representations – Benefit from editors, analyzers, consistency checkers
  38. 38. Language levels (Caper Jones) Language Level Relationship to ProductivityLANGUAGE LEVEL PRODUCTIVITY AVERAGE PER STAFF MONTH-------------------------- ------------------------------------------------------------------1-3 5 to 10 Function Points4-8 10 to 20 Function Points9 - 15 16 to 23 Function Points16 - 23 15 to 30 Function Points24 - 55 30 to 50 Function PointsAbove 55 40 to 100 Function Points EXCEL MATHCAD
  39. 39. Visual DSLs Solve problem in domain termsDomain Map to code, implement Finished Assembler Idea Product Map to code, implement Code Generate, Add bodies Map to UML UML Model No map! DSVL Generate calls Model Components to componentsFramework for Domain-Specific Visual Languages OOPSLA workshop Juha-Pekka Tolvanen, Steven Kelly, Jeff Gray, Kalle Lyytinen on DSVL
  40. 40. Visual DLS design and implementationDomain Finished Idea Product Expert (few) DSVL Code Component metamodel generation library Normal Easy! DSVL Generate calls Model Components (many) to components
  41. 41. Meta CASE for DSVL design Rules Generators 1 2 3 4 Concepts Symbols
  42. 42. MDA and ToolsMetamodel editors MetamodelsTextual model Editor Reverse engineeringVisual Model Editor Import & Export MODELS Model Checker Teamwork M2M M2text OTHER SOURCE MODELS CODE
  43. 43. References• Peter Pin-Shan Chen "The Entity-Relationship Model: Toward a Unified View of Data" ACM on Database Systems, Vol. 1, No. 1, March 1976• Chen, Peter P., Entity-Relationship Modelling: Historical Events, Future Trends, and Lessons Learned, Springer-Verlag New York, Inc, 2002, pp. 296-310• D. Harel, "Statecharts: A Visual Formalism for Complex Systems", Sci. Comput. Programming 8 (1987), 231-274.• J, Rambaugh, Object-Oriented Modeling and Design. With others. Prentice Hall, ISBN 0-13-629841-9, 1991• G. Booch, Object-Oriented Analysis and Design with Applications. Benjamin Cummings, 1991 (2° Edition 1994, Addison Wesley)• I. Jacobson, Object-Oriented Software Engineering: A Use Case Driven Approach (ACM Press) With Magnus Christerson, Patrik Jonsson & Gunnar Overgaard. Addison-Wesley, 1992, ISBN 0-201-54435-0, 1992• I. Jacobson, Grady Booch & James Rumbaugh, The Unified Software Development Process. Addison-Wesley Professional, 1999, ISBN 0-201- 57169-2, 1999
  44. 44. References• Frankel. “Model Driven Architecture: Applying MDA to Enterprise Computing.” Wiley, 2003• MDA Guide – www.omg.com/mda• Marjan Mernik, Jan Heering, Anthony M. Sloane: When and how to develop domain-specific languages. ACM Comput. Surv. 37(4): 316-344 (2005)• Jeff Gray, Kathleen Fisher, Charles Consel, Gabor Karsai, Marjan Mernik, Juha-Pekka Tolvanen: DSLs: the good, the bad, and the ugly. OOPSLA Companion 2008: 791-794• Juha-Pekka Tolvanen, Steven Kelly, Jeff Gray, Kalle Lyytinen, Framework for Domain-Specific Visual Languages, OOPSLA WS on DSVL 2001
  45. 45. References• Wynn, Moe T. and Verbeek, H.M.W. and van der Aalst, Wil M. and ter Hofstede, Arthur H.M. and Edmond, David (2007) Business Process Verification - Finally a Reality! Business Process Management Journal.• Johan den Haan, Model Driven Engineering, http://www.theenterprisearchitect.eu/archive/200 9/01/15/mde---model-driven-engineering---- reference-guide• Mike Blechar, David Norton , Trends in Model- Driven Development, 4Q09-3Q10, Gartner