EGF Tutorial. Benoît Langlois Thales/EPM. EGF Tutorial by Thales; made available under the EPL v1.0

Similar documents
Start Up Benoît Langlois / Thales Global Services Eclipse (EMFT) EGF 2011 by Thales; made available under the EPL v1.

Introduction to EGF. Benoît Langlois / Thales Global Services.

EGF Tutorial Reuse and Customization

Generation Chain. Benoît Langlois Thales/EPM. EGF Tutorial Generation Chain by Thales; made available under the EPL v1.

EGF Creation Review. Benoît Langlois - Thales/TCS/EPM. April 22, 2009

EMF course - PACT. Etienne Borde

CONCERNS The designer functionally assembles basic services. The designer executes tasks. The developer writes basic services in a language.

EMF GENERATION PORTFOLIO

BLU AGE 2009 Edition Agile Model Transformation

Eclipse Modeling Framework (EMF) Paweł Żalejko

INTRODUCTION TO EMF. Creating Model using EMF. Our Domain model used to showcase this use case is as shown below in fig.1

Kermeta. in compiled mode

Apache Wink Developer Guide. Draft Version. (This document is still under construction)

Model handling with EMF

A Formal Approach to Modeling and Model Transformations in Software Engineering

(Meta)Models between MetaEdit+

Modif Documentation. Refactoring User Guide

Extending Tuscany. Apache Tuscany. Slide 1

2 Apache Wink Building Blocks

Chapter 1 Introducing EJB 1. What is Java EE Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7

Dominique Blouin Etienne Borde

JBoss SOAP Web Services User Guide. Version: M5

Fast Track to EJB 3.0 and the JPA Using JBoss

Discover, Relate, Model, and Integrate Data Assets with Rational Data Architect

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

SCALE. A language for dynamic composition of heterogeneous services

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

The etrice Eclipse Project Proposal

Getting Started with Web Services

ATL: Atlas Transformation Language. ATL User Manual

Getting Started with Web Services

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader...

Enterprise Architecture Views and Viewpoints in ArchiMate - Reference

Introduction to Model Driven Engineering using Eclipse. Frameworks

WP 18: Socio-economic perspectives of sustainability and dynamic specification of behaviour in Digital Business Ecosystems

Introduction to OpenArchitectureWare

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

Dominique Blouin Etienne Borde

Eclipse 4 Eclipse Day Toulouse 24 mai 2012

Tarski: A Platform for Automated Analysis of Dynamically Configurable Traceability Semantics

JAVA. 1. Introduction to JAVA

Defining Domain-Specific Modeling Languages

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

Qlik Sense Desktop. Data, Discovery, Collaboration in minutes. Qlik Sense Desktop. Qlik Associative Model. Get Started for Free

JBPM Course Content. Module-1 JBPM overview, Drools overview

AADL Graphical Editor Design

WA1278 Introduction to Java Using Eclipse

Oliopäivät Modelling Now and in the Future, with Acronyms or without = RSA

Christian Doppler Laboratory

NordiaSoft SCA Architect 2016

Design Pattern Instantiation Directed by Concretization and Specialization

Enterprise JavaBeans, Version 3 (EJB3) Programming

JavaScript: Sort of a Big Deal,

Enterprise JavaBeans. Layer:07. Entity

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

Eclipse technology in IFMS Interface Management System

BEAWebLogic. Portal. Overview

Semantic SOA - Realization of the Adaptive Services Grid

Apache Wink User Guide

SCA Tools project Creation Review. July

EMFT 1.0 Release Review (OCL, Query, Transaction, and Validation)

AbstractCommand, AbstractEnumerator, AbstractOverrideableCommand, AddCommand, AbstractTreeIterator, Adapter, EAnnotation.

The Art of Model Transformation with Operational QVT

JVA-163. Enterprise JavaBeans

EINDHOVEN UNIVERSITY OF TECHNOLOGY

1Z Oracle IT Architecture SOA 2013 Essentials Exam Summary Syllabus Questions

C# Programming in the.net Framework

JVA-117A. Spring-MVC Web Applications

104. Intermediate Java Programming

Advanced Topics in Software Engineering (02265) Ekkart Kindler

Eclipse Command Language

On the link between Architectural Description Models and Modelica Analyses Models

Page 1

CSE115 / CSE503 Introduction to Computer Science I. Dr. Carl Alphonce 343 Davis Hall Office hours:

The Myx Architectural Style

The Discussion of Cross-platform Mobile Application Development Based on Phone Gap Method Limei Cui

Chapter 6 Object Persistence, Relationships and Queries

KerMeta Transformation Rules

"Charting the Course... Java Programming Language. Course Summary

PATTERN-ORIENTED SOFTWARE ARCHITECTURE

Model-based Software Engineering (02341, Spring 2017) Ekkart Kindler

DESIGN PATTERN - INTERVIEW QUESTIONS

A Reconnaissance on Design Patterns

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

COURSE LISTING. Courses Listed. with ABAP Dialog Programming. 25 December 2017 (08:57 GMT) NW001 - SAP NetWeaver - Overview

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

WP3 Technologies and methods for Web applications

Model-Driven Optimizations of Component Systems

6/20/2018 CS5386 SOFTWARE DESIGN & ARCHITECTURE LECTURE 5: ARCHITECTURAL VIEWS C&C STYLES. Outline for Today. Architecture views C&C Views

Language engineering and Domain Specific Languages

EMFT Mint (Incubation) 0.7 Ganymede Simultaneous Release Review

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

Programming overview

H-Store Introduction. Andy Pavlo February 13, 2012

Today: Distributed Middleware. Middleware

/ / JAVA TRAINING

Object Fundamentals Part Three. Kenneth M. Anderson University of Colorado, Boulder CSCI 4448/6448 Lecture 4 09/06/2007

Technical Solutions for the Transformation-Driven Graphical Tool Building Platform METAclipse

GlassFish V3. Jerome Dochez. Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID YOUR LOGO HERE

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate

Transcription:

EGF Tutorial Benoît Langlois Thales/EPM

Agenda Introduction EGF Structure Pattern 2

What is EGF? EGF (Eclipse Generation Factories) is an Eclipse open source project under the EMFT project. Purpose: provide a model-based generation framework. Operational objectives: Supporting complex, large-scale and customizable generations Promoting the constitution of generation portfolios in order to capitalize on generation solutions Providing an extensible generation structure 3

Objective of this tutorial Understanding: The EGF Structure, with: Activity, Factory component, Task, Production plan EGF Patterns 4

Agenda Introduction EGF Structure Pattern 5

EGF Structure This following slides present snapshots of the EMF Wrapper provided by EGF, which can be activated by a right-click on a genmodel. There is one generation step for model, edit, editor, test, and documentation generation. 6

Example EMF Wrapper Library.fcore file Main Factory Component contains Task and Factory component invocation orchestration 7

Example EMF Wrapper Library.fcore file Java Task usage contains Task reference Contract value for a contract (= task parameter) implementation Task Java Class 8

Example EMF Wrapper Library.fcore file Factory Component usage contains Factory component reference Factory component contracts Pattern viewpoint Task invocation orchestration 9

EGF Structure 10

Activity Definition An activity is the abstract class of any EGF generation unit Factory component and Task are activities Activity storage Activities are stored in fcore files The same fcore file contains one to several activities Activity properties Contract declaration Ability to be invoked and to execute a generation action 11

Activity Hierarchy Activity Factory Component Java Task Task [Language] Task 12

Activity Properties Activity 0-1 Contract Container * Contract contracts - name - mode (In, Out, In/Out) - mandatory 0-1 Type Instance - value Type 13

EGF Structure 14

Central Role of Factory Component Development Test Execution Deployment Developer Target platform Domain Expert Architect Factory Component Portfolio variability Capitalization Build chain 15

Factory Component Unit of generation with a clear objective of generation Unit of generation with a clear contract Assembly of factory components Delegation Creation of heterogeneous and complex generation chains Explicit declaration of generation data organised by viewpoints Orchestration of the generation with a production plan Factory Component Lifecycle: edition and execution, including validation 16

Factory Component Factory Component Structure = Contract container = Viewpoint container Production Plan 17

Factory Component Factory Component Structure = Contract container = = Contract Viewpoint container Production Plan Definition: Contract: Factory Component parameter A contract has a type, a passing mode (In/Out/In_Out), a default value or not is mandatory or optional 18

Factory Component Factory Component Structure = Contract container = Viewpoint container Production Plan Definition: Viewpoint: area to declare generation perspective data Examples of viewpoint: - Available today: domain declaration, pattern - Candidates: licensing, feature model 19

EGF Structure 0 1 0 1 20

Task Definition A task is an atomic generation unit Task declaration: A task is declared in a fcore file Java task is a kind of Task. With the extensibility mechanism, other Task types could be introduced (e.g., Ruby task). Task implementation: An implementation is associated to a task A JavaTask is implemented by a Java class (which implements ITaskProduction) Java Task 1 implementation Java Class 21

EGF Structure 22

Factory Component Structure Factory Component Generation Viewpoint Orchestration 23 Production Plan FC invocation Java Task 0 1 0 1 Definition: A production plan is a simple kind of generation orchestration Production Plan: A generation orchestration is a sorted list of factory component or generation task invocations. It describes the successive generation steps, which either call factory components or generation tasks. The factory component/task contracts are valued by factory component/task invocation values. Same principle than the parameter values when a Java method is called.

Activity and Production Plan invocation * Activity 0-1 Contract Container Factory Component 0-1 Production Plan Activity Invocation * Task * * Contract contract Invocation Contract 24

In/Output relationships 25

In/Output relationships Quantity s Properties Amount s Properties 26

Agenda Introduction EGF Structure Pattern 27

Pattern Definition Definition: A pattern is a solution to a recurrent generation problem Purpose Applying a systematic behavior onto a resource Clearly dissociating the specification (external view) from the implementation (internal view) of the behavior Reusing and customizing a pattern in different contexts Supporting multilingual patterns in order to apply the best programming language to a situation, and then supporting multiparadigm (M2T, M2M, T2M, T2T) 28

EGF Structure 29

Pattern External View Super- Pattern Type Language query 0..n parameter 1 nature Pattern delegation Definition: query/parameter: query for object selection onto a resource nature: language used for the pattern implementation Pattern 30

Pattern External View Example EClassif iergen ECore Resource EClass Jet Query element nature EClass Gen delegation The EClassGen pattern is applied on a Ecore resource Objects selected on the ecore resource: EClass instances It specializes the EClassifierGen pattern It applies a model-to-text generation in Jet Its also applies a generation on its features by delegation to the EStructuralFeatureGen pattern EStructural Feature Gen 31

Pattern External View Super- Pattern Constraint 0..1 precondition Type Type Language 0..n variable Query 0..n parameter 1 nature Pattern delegation Pattern Definition: precondition/constraint: constraint to be verified before application variable/type: local variable declaration for the pattern implementation 32

Pattern Implementation View Methods which implement the pattern Order to execute the methods header: typically used for the Jet header init: method for pattern initialization (e.g., variable initialization) A method editor allows to edit pattern methods 33

Pattern 34

Pattern execution Big Picture Pattern Execution Process Pattern Pattern Pattern Patterns selection Pattern Strategy Way to apply patterns 35 Resource, e.g. Model Pattern Execution onto a resource Result Final Result Pattern execution engines, e.g. for Jet, Java Optional - Pattern reporter for final form

Pattern Strategy Definition: Way to apply patterns against a resource Examples of strategies: Model-driven pattern strategy: in-depth navigation over a model, and for each model element, applying a set of patterns Pattern-driven strategy: for each pattern, applying the pattern for each model element element [Data type]-driven strategy: generalization of the approach; instead of model, it could be any type of resource (e.g., file directory) Strategy parameters: Resource visitor: the for each navigation is a specific case; the visitor function specifies how to navigate over a resource. Examples: in-large navigation, considering only Eclassifiers 36

Pattern 37

Pattern Relationships Pattern inheritance Pattern extension extends (not available yet) Pattern delegation Pattern callback Pattern injection Multilingual call The Pattern orchestration specifies the pattern relationships Possibility to combine different pattern relationships in the same orchestration 38

Pattern Inheritance Pattern inheritance Case 1. Reuse of super-pattern methods Same mechanism than Class inheritance Selection of methods from the super-pattern hierarchy Example Hello World - body Hello - sayhello - finish Orchestration of HelloWorld 39

Pattern Inheritance Pattern inheritance Case 2. Reuse of super-pattern orchestration Reuse of the orchestration defined in the super-pattern This abstracts the super-pattern orchestration This avoids rewriting pattern orchestration Just adding the methods of the current pattern Example 40

Pattern Delegation Pattern delegation Case. Problem decomposition / Reuse of pattern - The same pattern is reused in different pattern contexts - The orchestration of the called pattern is applied - The Pattern caller provides parameter values to the called pattern - The parameter values are statically declared at the pattern definition Example 1 Example 2 Display EClass Hello World Display EAttribute Hello Friends Display Annotations 41

Pattern Injection Pattern injection Case. Reuse of pattern with a dynamic resolution of the injected context - A Pattern injection corresponds to a Pattern Delegation, but - The parameter values are dynamically set at pattern execution Example In this example, the setupvariable method sets the injection context 42

Multilingual Call Multilingual Call Case. Pattern delegation where implementation languages are different This corresponds to a Pattern Delegation where Pattern natures are different. For instance, a Pattern with a Jet nature calls a Pattern with a Java nature in order to differently process the same resource. It is impossible to have different natures in the same Pattern inheritance hierarchy. Example EClass Report Measure EClass Quality 43

Pattern Callback Pattern Callback Case 1. Applying a Java call The callback indicates where the callback on a Java Class is applied Example Pattern orchestration Specification of the Java Class in the production plan 44

Pattern Callback Pattern Callback Case 2. Combination with the Pattern Strategy A strategy determines how to apply patterns and how to navigate over a resource. In an orchestration, a callback is the moment before and after a cycle of pattern application, and allows to discriminate the methods to apply before and after it. Example Scenario: The following generation result can be realized with a callback. - The model-driven strategy navigates over the model - There is a pattern for each kind of model element with the following pattern orchestration A generation action is realized before (open) and after (close) the callback. <EPackage name= P > <EClass name= C1 > <EAttribute = A1 > </EAttribute = A1 > </EClass name= C1 > </EPackage name= P > Generation result 45