33
Case Study : Setting up a Domain Specific Tooling Cédric Brun - Eclipse Modeling expert : [email protected] Stéphane Lacrampe - CEO : [email protected]

Case Study : Setting up a Domain Specific Tooling · 3 Obeo : Model Driven Company OSS Vendor since 2005 – Model Driven experts – 20 employees by end 2007 – Nantes, Paris by

  • Upload
    ngotu

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

1

Case Study : Setting up a Domain Specific Tooling

Cédric Brun - Eclipse Modeling expert : [email protected]éphane Lacrampe - CEO : [email protected]

2

AgendaAgenda

● Who is Obeo ?

● Some background on Unédic and Eclipse

● Building a Domain Specific Model

● Building a Domain Specific Modeler

● Code generation

● Packaging and deployment

● Conclusion

3

Obeo : Model Driven CompanyObeo : Model Driven Company

● OSS Vendor since 2005– Model Driven experts– 20 employees by end 2007– Nantes, Paris by end 2007– Self funded and profitable

● Our customers and partners2005 2006 2007

0

2,5

5

7,5

10

12,5

15

17,5

20

Obeo

Employees

4

Our products and servicesOur products and services

● Our MDSD offer :– “Designing Software Factories based on Eclipse technology”– Consulting on Eclipse, EMF, GMF, M2M, M2T ...– Support, training

● Our ADM offer :– “Model Driven Migration Factories, software cartography”– Available for JEE, VB, ASP, C, C++, Ada, Forte, SQL, Progress...

● Our products :– Acceleo : http://www.acceleo.org– Acceleo Pro Traceability, Acceleo Pro DSM– Agility– More information on http://www.obeo.fr

5

Obeo : R&D Open Source leaderObeo : R&D Open Source leader

● Obeo – Eclipse foundation member– 7 Eclipse commiters

– Eclipse Modeling Project● EMFT : EMF Compare (leader : Cedric Brun)● M2M : QVT Relation (leader : Quentin Glineur), ATL● Modisco

– Eclipse SOA Tool Platform

● SCA Composite Editor – IP review in process

● OW2 Consortium (ex-ObjectWeb)– Acceleo

– OW2 Board member

● Collaborative project and R&D– Topcased member (http://www.topcased.org)

– Papyrus

– Clusters System@Tic

– Research (Lina, Inria, Imag, ...)

6

AgendaAgenda

● Who is Obeo ?

● Some background on Unédic and Eclipse

● Building a Domain Specific Model

● Building a Domain Specific Modeler

● Code generation

● Packaging and deployment

● Conclusion

7

UnédicUnédic

● Creation : 31st, december 1958

● French Administration, 15 000 employees

● Missions– Job seekers - social care– Assedic (unemployed people administration) coordination

● IT department– 1 500 employees– outsourcing

8

Unedic Information System ArchitectureUnedic Information System Architecture

Business applications are built on a 4 layers architecture - JEE

D Database

N État1

État2

État3

État4Context and state

machine

Client

Server XMLportal

Web portalFolder portal

Web browserWeb browser +Java Applet Other customerP

Web ServicesWeb renderingXML rendering

Data persistence

LBusiness Service A Business Service B

ComponentComponent Component Component

9

Eclipse toolingEclipse tooling

● Eclipse : an early choice– Eclipse as a Java IDE– Modeler : Rational XDE– 2004 : design of 2 Eclipse based tools

● Analysis and Design● GEF + Ecore + Jet OUDINI V2 Tools

ECLIPSE Platform

Wizards de création

- Screens- Folder tree

- Functions- User states- Data structure- Presentation objects

Screen mock-up XML Editor

- Functions- User states

Java code editor

Unedic Plug-In

- Entity Creation- Code generation Wizards

- XML prensetation entities- XML Navigation entities- Java code

Referential

Clear Case

10

Tooling state early 2006Tooling state early 2006

Renseigner les données d'un Individu

<<A>>

(fro m Re nse ig ne r l e s do nné e s d'un In divi d u)...)

Modifier individu

do/ Individu:modifier

valider

Protoype MéthodeCU "Modofier un Individu"Diagramme d'activité

SystèmeUtilisateurUtilisateur Système

Renseigner les données d'un Individu

<<A>>

(fro m Re nse ig ne r l e s do nné e s d'un In divi d u)...)

Modifier individu

do/ Individu:modifier

valider

Protoype MéthodeCU "Modofier un Individu"Diagramme d'activité

SystèmeUtilisateurUtilisateur Système

Prototype UtilisateurPrototype UtilisateurIHM LogiqueIHM Logique

Ecran Critere Recherche

Ecran Selection dans Liste

Entite Persistante

Sous-Entite Persistante

Controleur Rechercher une Entité

Classes d’analyseClasses d’analyse

OUDINIOUDINIGIMIC + AssemblerGIMIC + Assembler

Ana

lysi

sD

esig

nD

evel

opm

ent

FDP, OPEReferential

Functionnaljava code

MNU, FAV, OPF, LIBReferential

ZU, ZUE, ZUF, VLPReferential FCT, ETU

Referential

Generated Java Code

FunctionalJava Code

Context Navigation Services Data

Services, DDLReferential

No Model Transformation

No code Generation

X

X

The software factory is started but models are still not productive

11

2006 – 2007 : towards EMF, GMF and Acceleo2006 – 2007 : towards EMF, GMF and Acceleo

● Architecture evolution– JSF/Ajax– Tooling improvement

● From UML to a DSM approach– Language closer to the Unédic logical/functional concepts– Based on Eclipse standards : EMF, GEF, GMF

● Generative approach with Acceleo Pro– Automate projection between functional models and Unedic JEE

Framework– MDSD and Traceability

● Unédic collaborates with Obeo on their Software Factory

12

The whole pictureThe whole picture

● Two phases project– Prototype– Industrial version

● Main steps– DSM Design– EMF-GMF implementation– Extended features– Code generation– Packaging and deployment

13

AgendaAgenda

● Who is Obeo ?

● Some background on Unédic and Eclipse

● Building a Domain Specific Model

● Building a Domain Specific Modeler

● Code generation

● Packaging and deployment

● Conclusion

14

Domain Model DesignDomain Model Design

«DSM»CORE

«DSM»LOGIQUE

«DSM»NAVIGATION

«MODELE NAVIGATION»Fonctionnalite

«MODELE LOGIQUE»Domaine Implementation

«PACKAGE CORE»Categorie

«ELEMENT CORE»Type complexe

«ELEMENT CORE»Type collection

«MODELE CORE»Referentiel souffleurs

«PACKAGE CORE»Dictionnaire

● How to design a Domain Model ?– Find out Business concepts– Cut them into logical meta-models

● Who– Modeling tool expert– Business and methodology expert

15

Core meta-modelCore meta-model

«DSM»CORE

«ELEMENT CORE»Structure

«ELEMENT CORE»TypeAbstrait

+ «O» Alias : String

«ELEMENT CORE»Type complexe

+ «O» Nom : String+ «O» Commentaire : String

«ELEMENT CORE»Attribut

+ «O» Nom : String+ «O» Commentaire : String+ «O» TypeCardinalite : CardinaliteType

«ELEMENT CORE»DA

+ «F» AnneePivot : Entier = 58

«ELEMENT CORE»AN

+ «O» Lng : Entier

«ELEMENT CORE»NU

+ «F» Nb_Dec : Entier = 0+ «O» Min : Entier | Décimal+ «O» Max : Entier | Décimal

«ELEMENT CORE»NS

+ «F» Nb_Dec : Entier = 0+ «O» Min : Entier | Décimal+ «O» Max : Entier | Décimal

«ELEMENT CORE»BO

«ELEMENT CORE»HE

«ELEMENT CORE»TypeSimple

- attributs*

- attributs

*

- type

1

«enumeration»CardinaliteType

1*

«enumeration»VisibiliteType

PublicProtegeePrivee

«PACKAGE CORE»Categorie

+ «O» Nom : String+ «O» Commentaire : String

- classes*

«ELEMENT CORE»Rubrique

+ «O» Nom : String+ «O» Commentaire : String

- type

1

- rubriques*

«enumeration»FormatType

ANNUDAHENSBO

«PACKAGE CORE»Dictionnaire

+ «O» Nom : String+ «O» Commentaire : String

«ELEMENT CORE»Type collection

+ «O» Nom : String+ «O» Commentaire : String

- item

1- entete

0..1- critere

0..1

- collections*

«MODELE CORE»Referentiel souffleurs

+ «O» Nom : String+ «O» Commentaire : String

«ELEMENT CORE»Souffleur

+ «O» Nom : String+ «O» Commentaire : String+ «O» MediaRestitution : MediaType+ «F» Version : String

«ELEMENT CORE»Litteral

+ «O» Nom : String+ «O» Commentaire : String+ «O» LibelleCours : String+ «F» LibelleLong : String

«enumeration»MediaType

DOSSIERINTERNETINTRANETWEBSERVICEWAP

- litteral par defaut

0..1- souffleurs

*- litterals

*

- souffleur 0..1 - souffleur0..1 - souffleur0..1

16

Navigation meta-modelNavigation meta-model

«ELEMENT NAVIGATION»Fonction abstraite

+ «O» /Id : String+ «O» Nom : String+ «O» Commentaire : String+ «O» Visbilite : VisibiliteType+ «F» GestionTerritorialite : Boolean

«ELEMENT NAVIGATION»Etat Utilisateur

«ELEMENT NAVIGATION»Phase

+ «O» Id : PhaseType

«ELEMENT NAVIGATION»Transition

+ «F» Commentaire : String+ «F» Condition : String+ «F» NomLien : String

- destination

0..1 enchaîne

- entrées

- fct filles0..1

empile

- fct mères

«ELEMENT NAVIGATION»Etat final

«ELEMENT NAVIGATION»Evenement

+ «O» Nom : String+ «O» Commentaire : String

génère

*- evts_générés

- émetteurs *

- evt_traités *

traite

- souscripteurs *

«ELEMENT NAVIGATION»Dossier

«ELEMENT NAVIGATION»Application

«ELEMENT NAVIGATION»Fonction

«ELEMENT NAVIGATION»Etat

+ «O» /Id : String+ «O» Nom : String+ «O» Commentaire : String

{ou}

- etats1..*

«MODELE NAVIGATION»Fonctionnalite

+ «O» CodeFontionnalite : String[4]+ «O» Nom : String+ «O» Commentaire : String

- fonctions

*

«ELEMENT NAVIGATION»Action

+ «O» TypeAction : ActionType

«enumeration»ActionType

MAJVISUENCHT

«PROJET NAVIGATION»Projet Application

+ «O» Nom : String+ «O» CodeApplication : String+ «O» BigrammeProjet : String[2]

- evenements*

«enumeration»PhaseType

initialiseractualisertermineractualiserSurEmpilement

«ELEMENT LOGIQ...Service Applicatif

«ELEMENT NAVIGATION»Declencheur

+ «F» Commentaire : String

- service

1

- transitions

*- origine

«ELEMENT NAVIGATION»TraitementEvenement

1

déclenche

- declencheur

«ELEMENT NAVIGATION»Etat initial

«ELEMENT NAVIGATION»Question

- triggers*

- premier etat

1

«ELEMENT NAVIGATION»Enchainement

- connexions

0..* - origine

«ELEMENT NAVIGATION»Retour

«ELEMENT NAVIGATION»RefServiceApplicatif

- services

*

«ELEMENT NAVIGATION»Connexion

+ «F» NomLien : String+ «F» Condition : String

- destination

1

«PACKAGE NAVIGATION»Sous fonctionnalite

+ «O» Nom : String+ «O» Commentaire : String

- services 0..*

«ELEMENT NAVIGATION»DeclencheurNomme

+ «O» Nom : String

- fonctionnalites

*

- sous-fonctionnalites*

17

Context meta-modelContext meta-model

«DSM»LOGIQUE

«DSM»CORE

«NAVIGATION ELEMENT»Objet de Contexte

+ «F» ClasseHeritage : String

«ELEMENT NAVIGATION»Fonction abstraite

+ «O» /Id : String+ «O» Nom : String+ «O» Commentaire : String+ «O» Visbilite : VisibiliteType+ «F» GestionTerritorialite : B...

«ELEMENT NAVIGATION»Etat Utilisateur - zuePrive

1

- vlp

1

- zuf

1

«ELEMENT NAVIGATION»Evenement

+ «O» Nom : String+ «O» Commentaire : String

«ELEMENT NAVIGATION»RefServiceApplicatif

- services*

«ELEMENT LOGIQUE»Service Applicatif

- service1

«ELEMENT LOGIQUE»Objet de Transfert

«ELEMEN...Zuf

«ELEMENT NAVIGATION»ZuePrive

«ELEMENT NAVIGATION»Vlp

«ELEMENT NAVIGATION»Zud

+ «O» Nom : String+ «O» Commentaire : String

- zud

0..1

«ELEMENT CORE»Type complexe

+ «O» Nom : String+ «O» Commentaire : String

«ELEMENT CORE»Structure

Selon la stratégie de mapping sur le N, une Structure peut faire référence à des Objets de contexte ou des Objets de Transferts

Un Objet de Contexte peut faire référence à d'autres Objets de contexte ou objets de transferts provenant du modèle L

«PACKAGE NAVIGATION»Sous fonctionnalite

+ «O» Nom : String+ «O» Commentaire : String

- fonctions*

- evenements

*

- zud

*

«PACKAGE CORE»Categorie

+ «O» Nom : String+ «O» Commentaire : String

- classes*

«MODELE NAVIGATION»Fonctionnalite

+ «O» CodeFontionnalite : String[4]+ «O» Nom : String+ «O» Commentaire : String

- sous-fonctionnalites*

«ELEMENT NAVIGATION»Signature

«ELEMENT NAVIGATION»Contexte

- zuContexte

1

- zuCritere

1

«ELEMENT NAVIGATION»Prive

- _ZuPrive

1

«ELEMENT CORE»Type collection

+ «O» Nom : String+ «O» Commentaire : String

- collections*

- categories*

«ELEMENT LOGIQUE»Objet de transfert collection

«NAVIGATION ELEMENT»Objet de contexte

collection

18

Domain Model ImplementationDomain Model Implementation

● Ecore implementation– Topcased Ecore editor– EMF standard generation– Icons

● Difficulties– A good meta-model ?– Model hierarchy– GMF and tooling impacts– Not all Business rules modeled

● A key task !

● Around 100 meta-elements

19

AgendaAgenda

● Who is Obeo ?

● Some background on Unédic and Eclipse

● Building a Domain Specific Model

● Building a Domain Specific Modeler

● Code generation

● Packaging and deployment

● Conclusion

20

Designing a DSMDesigning a DSM

● Choices to make :– How to graphically represent those concepts for the end-user ? – How many diagram types ?– Diagram root and breakdown

● Choices based on :– Domain – Know-how on GMF tooling (GMF V1)

● 3 diagrams :– Navigation : screen dynamic behaviour– Context : data used and shared by screens– Types : complex data structure description

21

Implementing a DSM with GMFImplementing a DSM with GMF

● Steps to build a Domain Specific Modeler with GMF– Set-up the GMF models (graphical, tooling, mapping)– Generate Java code from gmfgen

● Extending GMF– Using GMF extension points when possible– Modifying generated code

● Extensions– Properties edition on double click– Creation wizards– Diagram navigation and shortcuts– Diagram synchronization– Model refactoring, Model validation, Clearcase integration

22

Implementing a DSM with GMFImplementing a DSM with GMF

Demo

23

AgendaAgenda

● Who is Obeo ?

● Some background on Unédic and Eclipse

● Building a Domain Specific Model

● Building a Domain Specific Modeler

● Code generation

● Packaging and deployment

● Conclusion

24

AcceleoAcceleo

● Acceleo : http://www.acceleo.org– Open source (EPL) code generator based on Eclipse and EMF– Easy learning curve, end user features– Incremental generation, performance– Template editors, debugging– Plug-in packaging of generators – Generation module repository (JEE, C#, Php, Python...)

● Acceleo Pro Traceability :– Model-code-Model navigation and round-trip– Generation preview, de-synchronization detection– Partial regeneration, generated code modification

25

Designing code generators with AcceleoDesigning code generators with Acceleo

● How to design a code generator from a Domain Model– Have a prototype of your generation target– Identify patterns and things that can be automated– Make sure that you've got the required information in models

● Two generators– Application code : Java, JSP and XML code generator– Documentation : HTML

● Around 70 templates

26

Example of a Unedic applicationExample of a Unedic application

27

Example of a Unedic applicationExample of a Unedic application

28

Example of a Unedic applicationExample of a Unedic application

29

AgendaAgenda

● Who is Obeo ?

● Some background on Unédic and Eclipse

● Building a Domain Specific Model

● Building a Domain Specific Modeler

● Code generation

● Packaging and deployment

● Conclusion

30

Packaging and deploymentPackaging and deployment

● Packaging– 20 plug-ins (Eclipse 3.2)– Build issues (GMF/JDK 1.4/Windows)

● Deployment– Tools delivered to a third party company– Eclipse bundle delivery (Eclipse, Modeling, WTP...)– Regular updates through Eclipse update sites– User training

31

AgendaAgenda

● Who is Obeo ?

● Some background on Unédic and Eclipse

● Building a Domain Specific Model

● Building a Domain Specific Modeler

● Code generation

● Packaging and deployment

● Conclusion

32

Feedback on the projectFeedback on the project

● Time and duration– Prototyping : 35 m.d– Industrial version : 95 m.d– Duration : 5 months

● Unédic– Specification, tests and validation, user documentation– Code generation

● Obeo– Meta-modeling and Eclipse tooling– EMF-GMF implementation– Acceleo training and coaching– Collaboration using Trac system + Mylyn

33

ConclusionConclusion

● Customer results– Deployment of the tooling on an industrial project with Unilog

(LogicaCmg) - 5000 m.d– 15 persons in parallel using the software factory since June 2006– Huge productivity gains, easiest maintenance– Migration of existing projects– Standard and integrated tooling made on a tight schedule and budget

● Difficulties– Meta-models evolution impacts– Testing the GUI– Clearcase integration– Numerous models management with shortcuts (coherency, validation)– GMF2 migration ?