29
© copyright Obeo 2016 C e d o c u m e n t e s t l a p r o p r i é t é d e O b e o e t n e s a u r a i t ê t r e c o m m u n i q u é à u n t e r s s a n s s o n a u t o r i s a t o n . Document Gener aon With M2Doc Romain Guider

SiriusCon2016 - Document Generation with M2Doc

  • Upload
    obeo

  • View
    144

  • Download
    2

Embed Size (px)

Citation preview

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Document Generation WithM2Doc

Romain Guider

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

WHY SHOULD I GENERATE DOCFROM MY MODELS?

At some point, you willneed to reach peoplewho are not using yourmodeling workbench

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Use Case 1: Data Exchange Standard

Data Exchange Standardworkbench

Message validator

Standard developper

Payroll employee/Payroll software developper

Standard documentaton

Payrollsoftware

Payrolldata

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Use Case 2 : Enterprise Informaton Systemmodeling

Enterprise InformatonSystem modeling workbench

Specificaton Doc Data Dictonary

DatabaseBusiness Analyst

Applicaton developper

Database Administrator

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

HOW DO I GENERATE DOCS FROMMY MODELS?

Let’s mix some open XML template and our models.

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Adopt a template based approach

M2Doc

template model

document

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

What’s in a template?

• Regular open XML• Fields to insert generaton directves :

Regu

lar c

onte

nt

Fiel

d

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

What’s in a template?

• Regular open XML• Fields to insert generaton directves :

M2D

oc p

refix

Regu

lar c

onte

nt

Fiel

d

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

What’s in a template?

• Regular open XML• Fields to insert generaton directves :

M2D

oc p

refix

AQL e

xpre

ssio

n

Regu

lar c

onte

nt

Fiel

d

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

How is it processed?

• Regular open XML : reproduced as is• Fields : replaced by the result of their

evaluaton

Resu

lt of

the

Fiel

d ev

alua

ton

Regu

lar c

onte

nt

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

How is it processed?

• Regular open XML : reproduced as is• Fields : replaced by the result of their

evaluaton

Resu

lt of

the

Fiel

d ev

alua

ton

Regu

lar c

onte

nt

Note

the

styl

e!

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Can you Repeate please?

Fiel

d’s c

ode

Clos

ing

tag

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Can you Repeate please?

Fiel

d’s c

ode

Itera

ton

var

Clos

ing

tag

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Can you Repeate please?

Fiel

d’s c

ode

Itera

ton

var

Itera

ton

expr

Clos

ing

tag

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

What else?

Fiel

d’s c

ode

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

What else?

Fiel

d’s c

ode

expr

essio

n

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

What else?

Fiel

d’s c

ode

expr

essio

n

Clos

ing

tag

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

And, Sirius representatons!Fi

eld’

s cod

e

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

And, Sirius representatons!Fi

eld’

s cod

e

Desc

ripto

n sp

ecifi

cato

n

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

And, Sirius representatons!Fi

eld’

s cod

e

Desc

ripto

n sp

ecifi

cato

n

Targ

et o

bjec

t

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

And, Sirius representatons!Fi

eld’

s cod

e

Desc

ripto

n sp

ecifi

cato

n

Targ

et o

bjec

t

Imag

e siz

esp

ecifi

cato

n

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

A word about services

{m:for talk |conf->tracks.talks->select(t|t.name.contains(‘Sirius’))}– {m:talk.name}

{m:endfor}

{m:for talk|conf->siriusTalks()} - {m:talk.name}{m:endfor}

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Bring your own services

• Develop AQL services in POJO• Contribute them through an extension point• Document them for your end user• Use the services in your templates

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Let’s see what we can do so far!

Demo!

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

M2Doc has an open architecture

M2Doc

EMFPOI

M2Doc.UI : m2doc.ui

m2doc.ui.editm2doc.ui.editor

diagramProviders servicestreeProviders

SiriusIntegraton

AQL

tableProviders

database

org.obeonetwork.database

org.obeonetwork.database.edit

org.obeonetwork.database.design

org.obeonetwork.database.m2doc

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

What’s coming next?

• Currently cooking :– Inserton of Sirius tables– Management of user content

in generated docs

• Next steps :– Template indentaton control– Unified tables– Better user experience

• Wizard for template creaton,• Dialog for template

configuraton,• etc

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

M2DocContributions

CASID/DGSIC (Ministère de la defense)

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.

Where’s the code?

https://github.com/ObeoNetwork/M2Doc/

© c

opyr

ight

Obe

o 20

16Ce docum

ent est l a propriété de Ob eo et ne saurait ê tre com

muniqué à un ters sans son autorisaton.