Defining Domain-Specific Modeling Languages

Similar documents
Defining Domain-Specific Modelling Languages

Domain-Specific Modeling, Model-Driven Architecture

Modeling approaches, modeling languages

developer.* The Independent Magazine for Software Professionals

Evaluating the Use of Domain-Specific Modeling in Practice

The Eclipse Modeling Framework and MDA Status and Opportunities

Tools to Develop New Linux Applications

Introduction to MDE and Model Transformation

Introduction to Dependable Systems: Meta-modeling and modeldriven

OMG Workshop MDA. Tool Chains for MDA? Let's consider leaving our tool chains behind us.

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

Language engineering and Domain Specific Languages

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language

Practical Model-Driven Development with the IBM Software Development Platform

BLU AGE 2009 Edition Agile Model Transformation

The Model Driven (R)evolution. Richard Mark Soley, Ph.D. Chairman and CEO Object Management Group, Inc.

Modellierung operationaler Aspekte von Systemarchitekturen. Master Thesis presentation. October 2005 March Mirko Bleyh - Medieninformatik

All you need are models Anneke Kleppe, Klasse Objecten

Small is Beautiful Building a flexible software factory using small DSLs and Small Models

Spemmet - A Tool for Modeling Software Processes with SPEM

Second OMG Workshop on Web Services Modeling. Easy Development of Scalable Web Services Based on Model-Driven Process Management

MDSE PRINCIPLES. Chapter #2

Raising the Level of Development: Models, Architectures, Programs

Model Abstraction versus Model to Text Transformation

Software Engineering with Objects and Components Open Issues and Course Summary

Model Driven Engineering (MDE)

3rd Lecture Languages for information modeling

MDA Driven xuml Plug-in for JAVA

Model Driven Architecture

IBM Rational Software Architect

CISC836: Models in Software Development: Methods, Techniques and Tools

METADATA INTERCHANGE IN SERVICE BASED ARCHITECTURE

(The obligatory second slide)

Automation of Semantic Web based Digital Library using Unified Modeling Language Minal Bhise 1 1

02291: System Integration

Model Driven Development Unified Modeling Language (UML)

Coral: A Metamodel Kernel for Transformation Engines

J2EE Application Development with WebSphere Studio

Model driven Engineering & Model driven Architecture

The Unified Modelling Language. Example Diagrams. Notation vs. Methodology. UML and Meta Modelling

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations

Model Driven Architecture - The Vision

Introduction to Model Driven Engineering using Eclipse. Frameworks

JBuilder 2008 also now has full support for Struts 1.x applications including graphical editing and Web flow development.

Model Driven Architecture

Version 4.5 The S60 Phone Example

innoq Deutschland GmbH innoq Schweiz GmbH D Ratingen CH-6330 Cham Tel Tel

DEV427 MODEL-DRIVEN DEVELOPMENT USING PowerDesigner. Xiao-Yun WANG PowerDesigner Chief Architect

It s all Done with Mirrors Patterns and OCL. KMF Kent Modelling Framework D.H.Akehurst and O.Patrascoiu

Model-Driven Architecture

S1 Informatic Engineering

Seminar report Software reuse

Product Derivation through Domain-Specific Modeling: Collected Experiences

Index. Add Diagram > Sequence Diagram command,

Rational Software White paper

MDA Journal. XML and MDA A BPT COLUMN. David S. Frankel. February 2005

Applying Model Driven Technologies in the Creation. of Domain Specific Modeling Languages

Developing in OMG s Model-Driven Architecture

Semantic Web Domain Knowledge Representation Using Software Engineering Modeling Technique

FREQUENTLY ASKED QUESTIONS

MDA. SOA = Model Driven SOA

Model Driven Engineering

Model Driven Development. Building Automated Code Generation Methods with Eclipse and DSL Tools. Vicente Pelechano

DSM model-to-text generation: from MetaDepth to Android with EGL

The Model-Driven Semantic Web Emerging Standards & Technologies

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

The PISA Project A Model Driven Development case study

Building a New Rational Web Site with Rational Suite

Model Driven Architecture and Rhapsody

Overview of lectures today and Wednesday

An Introduction to Model Driven Engineering (MDE) Bahman Zamani, Ph.D. bahmanzamani.com

In the most general sense, a server is a program that provides information

Selenium Workshop. Removing the Mystery from Open Source Test Automation. Presented By Chris Petrov, PMP Leverage Point Corporation

Introduction to UML p. 1 Introduction to the Object-Oriented Paradigm p. 1 What Is Visual Modeling? p. 6 Systems of Graphical Notation p.

An Introduction to MDE

Modeling with UML, with semantics

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

Expert Guidance on Migrating from Magento 1 to Magento 2

Developing Web-Based Applications Using Model Driven Architecture and Domain Specific Languages

Sequence Diagram Generation with Model Transformation Technology

MDA Journal. BPMI and OMG: The BPM Merger A BPT COLUMN. David S. Frankel Lead Standards Architect - Model Driven Systems SAP Labs.

Future Directions for SysML v2 INCOSE IW MBSE Workshop January 28, 2017

Modelling in Enterprise Architecture. MSc Business Information Systems

The purpose of this tutorial is to introduce you to the Construct 2 program. First, you will be told where the software is located on the computer

Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6

CODAGEN TECHNOLOGIES AND MODEL-DRIVEN ARCHITECTURE (MDA)

Whole Platform Foundation. The Long Way Toward Language Oriented Programming

Model Driven Ontology: A New Methodology for Ontology Development

A UML SIMULATOR BASED ON A GENERIC MODEL EXECUTION ENGINE

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Conceptual Modeling and Specification Generation for B2B Business Processes based on ebxml

Comparison of different Model Driven Development approaches. Master thesis. Gøran Klepp Olsen. A mobile Meal Ordering System for the healthcare sector

Models versus Ontologies - What's the Difference and where does it Matter?

Teiid Designer User Guide 7.5.0

Reengineering of Distributed Middleware Systems To a Model Driven Architecture (MDA)

INF5120 and INF9120 Modelbased System development

The Process of Software Architecting

Architecture Component Development - generating more code from your UML models

Current trends and frameworks for modeldriven approaches to software development

Transcription:

Defining Domain-Specific Modeling Languages 1 st Oct 2008 Juha-Pekka Tolvanen MetaCase 1

Relevant language classifications to start with General-Purpose / Domain-Specific Narrow area of interest Often inside one company only Problem Domain / Solution Domain Higher abstraction leads to improved productivity External / Embedded (internal) Guide developers Scalable to a larger potential developer base Graphical / Text / Matrix / Table / Map etc. Easy to read, understand and communicate with Humans are good at spotting visual patterns Static structures / Behavior 2008 JPT/MetaCase 2

How do we use models? Separate model & code CASE Code visualization Roundtrip MDA DSM Model Model 'Model' 'Model' Model 2n Model Code Code? Code Code Code Code Finished product Finished product? Finished product Finished product Finished product Finished product Model alone should be sufficient in most cases No need to look at code 2008 JPT/MetaCase 3

Demo: Domain-Specific Modeling 2008 JPT/MetaCase 4

Does it work? Some industry examples Automotive infotainment MMI E-commerce visitor navigation Financial contracts IMS Service Creation Insurance products Message translation and validation in C 3 system Pacemaker product line Phone switch configuration Phone UI applications Professional radio applications SIM applications Train interlocking control Voice control of home automation 2008 JPT/MetaCase 5

Experiences from practice 5-fold productivity increase when compared to standard development methods The quality of the generated code is clearly better, simply because the modeling language rules out errors Eliminated our need to outsource software development activities" A module that was expected to take 2 weeks now took 1 day from the start of the design to the finished product 2008 JPT/MetaCase 6

MDA: Model Driven Architecture Hard to pin down: all things to all men Strong lock-in to OMG Initially "you must use UML" But later, in MDA manifesto, Booch et al. say: "The full value of MDA is only achieved when the modeling concepts map directly to domain concepts rather than computer technology concepts" Now: "you can have any language you like, as long as it's like UML" only allowed to build languages with MOF Schism into two schools of thought: Elaborationist (OMG): Model a bit, transform, edit transformed models, generate, edit generated code Translationist (XUML): Generate directly from high level UML-like models 2008 JPT/MetaCase 7

MDA Pros & Cons + OMG: Some claim to vendor-independence (IBM?) Standard is missing major areas Based on UML, largest and most bug-ridden standard Large number of other coupled standards MOF, XMI, OCL, QVT all moving targets, unproven + Focused on one domain anyway + Business apps with db and web or GUI front-end + Largely an accident: just didn't know other domains + Vendors will make something work But you won't be able to make your own language Productivity gains minimal E.g. +30% in vendor-sponsored test 2008 JPT/MetaCase 8

SF: Software Factories Strongly Microsoft-oriented But main figures from outside Microsoft: Greenfield: Rational, Short: TI, Cook: IBM, Kent: Kent Grand Unified(?) Theory 666 pages Patterns, AOP, reuse, platforms, components, services DSLs, generators, frameworks Vision changed under commercial pressure MS modeling tools immature de-emphasize models Focus on MS partners building and selling DSLs ISV sells same DSM solution to many companies Offsets the "massive effort"* of using their tools *Quote from Prashant Sridharan, MS lead product manager 2008 JPT/MetaCase 9

SF Pros & Cons + Microsoft: Massive resources, will get it made: Windows announced 1.0 released 2.0 released 3.0 released 3.1 released 1983 1985 1987 1990 1992 Microsoft: too many cooks and agendas Building meta-tools requires strong leadership, focus Will the project be continued (moving back to UML?) MS team lacked real-world experience in DSM Will need a rewrite, but will it happen? + Basic ideas are sound + Book mostly better than later marketing 2008 JPT/MetaCase 10

Domain-Specific Modeling Focus on a narrow area of interest => Domain Language is Domain-Specific Works for one application domain, framework, product family etc. Language has concepts people are already familiar with Models used to solve the problem, not to visualize code Generator is Domain-Specific Generate just the code needed from models Efficient full code No manual coding afterwards No reason for round-tripping Generator links to existing primitives/components/platform services etc. 2008 JPT/MetaCase 11

DSM Pros & Cons + Fundamental productivity and quality improvements + 300% faster in academic study, 1000% reported by companies + 50% less errors in an academic study + Gives full control to the company + Experienced developers are sitting in the driver s seat Requires expertise and resources from the company + Minimal vendor lock + You can translate & transform models to other tools and formats Only few industry strength tools available Scalability to a larger number of developers Do not handle evolution and maintenance 2008 JPT/MetaCase 12

The steps of defining a DSM solution 1. Identify abstractions Concepts and how they work together 2. Specify the metamodel Language concepts and their rules 3. Create the notation Representation of models 4. Define the generators Various outputs and analysis of the models Apply and refine existing components and libraries The process is iterative: try solution with examples Define part of the metamodel, model with it, define generator, run generator to compare with reference code, extend the metamodel, model some more,... 2008 JPT/MetaCase 13

Implementing Domain-Specific Modeling languages The most important asset becomes the source (code) application engineers use it generator and framework largely invisible Often includes elements of familiar modeling paradigms state machine flow model data structure, etc. Language specified as a metamodel Profiles are reduced form of metamodeling Poor man s solution DSM environment DOMAIN- SPECIFIC MODELING LANGUAGE DOMAIN- SPECIFIC CODE GENERATOR DOMAIN FRAMEWORK 2008 JPT/MetaCase 14

Identifying language constructs Use domain concepts directly as modeling constructs already known and used established semantics exist natural to operate with easy to understand and remember Focus on expressing design space with the language use parameters of variation space try to minimize the need for modeling Apply suitable computational model(s) as a starting point Build iteratively: define part of language, model with it, modify and extend further, model again... 2008 JPT/MetaCase 15

Metamodel of wristwatch apps Example (partial): 2008 JPT/MetaCase 16

Demo on language definition Demo available as flash video at: http://www.metacase.com/papers/dsm_definition.html 2008 JPT/MetaCase 17

Generator Generator translates the computational model into a required output 1. crawls through the models navigation according to metamodel 2. extracts required information access data in models 3. translates it into the code translation semantics and rules 4. using some output format possibility to define output format DSM environment DOMAIN- SPECIFIC MODELING LANGUAGE DOMAIN- SPECIFIC CODE GENERATOR DOMAIN FRAMEWORK 2008 JPT/MetaCase 18

Types of generator facilities Programming language accessing model through API Direct access, but low level, high coupling with tool Need something better, designed just for generation Model visitor Map each model structure to a code structure Limited to simple one-to-one mappings Output template Single file, code + escaped <%generator commands%> Crawler: Model navigation and output streams Multi-file, code quoted, native generator commands Generator generators Tempting, alluring, mostly unnecessary 2008 JPT/MetaCase 19

How to design a generator Make generator for your situation only Trying to make general purpose generator often fails Have (or create) reference implementation Put domain rules up-front to the language Generator definition easier when the input is correct Models should be impossible to create wrongly for generation Keep generator modular to reflect changes e.g. structure generator based on modeling languages, generated files, modeling concepts Make generated code readable ( good looking ) To be used later while debugging the code, executing it in a simulator, and while implementing the generator Follow good coding standards, include comments, have data to link back to models (e.g. in comment or via e.g. simulator) 2008 JPT/MetaCase 20

Domain framework Provides an interface for the target platform and programming language Raise the level of abstraction on the platform side Achieved by atomic implementations of commonalities and variabilities especially for behavior implementation as templates and components Include interface for the code to be generated often the only needed part for static variation (e.g. for XML schema) DSM environment DOMAIN- SPECIFIC MODELING LANGUAGE DOMAIN- SPECIFIC CODE GENERATOR DOMAIN FRAMEWORK 2008 JPT/MetaCase 21

DSM Solution Development Time 63 language concepts XML generator 60 language concepts C, HTML, build script generators 36 language concepts Assembler generator 77 language concepts Python generator Java generator for simulation 143 language concepts J2EE generator Man days 2008 JPT/MetaCase 22

Choosing a good domain for DSM If you have more than one candidate, pick best first Maturity of target business area in your company? Low coupling with external organizations? Related to other candidate domains? Extent of customization per customer? Good existing source code examples? In-house framework? Software development process maturity? Should be mature, but not too locked down Availability of architect / expert developers? Never, ever try building DSM with summer interns! 2008 JPT/MetaCase 23

Organizing for DSM Building a DSM solution requires few resources Quality not quantity For lower-level DSM tools, may need basic coders too May be best to start with high-level, go low later if needed Team needs both domain and code expertise Best candidates are normally expert developers Each member must balance elegance with pragmatism Look for people who build macros and templates: For the whole team, not just themselves Prepared to maintain and document them 2008 JPT/MetaCase 24

Success factors A narrow focus the narrower the better, later easier to extend Own the framework (or part of it) e.g. in-house application framework Apply on domains where repetition (ROI) multiple products or features, developers, targets Have experience in the domain have made several similar kind applications already Have expertise one of the top three who built the first products an experienced developer (author): makes the generator Tools that support both language definition and use evolution and iterative development 2008 JPT/MetaCase 25

Thank you! Question and comments? Contact: jpt@metacase.com MetaCase Ylistönmäentie 31 FI-40500 Jyväskylä, Finland Phone +358 14 4451 400 Fax +358 14 4451 405 2008 JPT/MetaCase 26

For more information... Tutorial tomorrow (13:00-17:00) Domain-Specific Modeling, Wiley-IEEE, 2008 2008 JPT/MetaCase 27