you need to extend your models? emf facet vs. emf profiles

12
You need to extend your models? EMF Facet vs. EMF Profiles Hugo Bruneliere [email protected] Modeling Symposium Monday March 26th, 2012 Philip Langer [email protected]

Upload: philip-langer

Post on 11-May-2015

4.557 views

Category:

Technology


3 download

DESCRIPTION

Talk at the Modeling Symposium at the EclipseCon2012 by Hugo Bruneliere and Philip Langer.

TRANSCRIPT

Page 1: You need to extend your models? EMF Facet vs. EMF Profiles

You need to extend

your models?

EMF Facet vs. EMF Profiles

Hugo Bruneliere [email protected]

Modeling Symposium – Monday March 26th, 2012

Philip Langer [email protected]

Page 2: You need to extend your models? EMF Facet vs. EMF Profiles

Modeling Language

Meta model

Concrete Syntax Editor

… generates Ruby on Rails.

… generates JavaServer Faces.

… generates DB Schema.

I want to additionally specify “Finder SQL” statements!

I want to additionally specify the bean scope!

Leave it as it is! If you introduce every

imaginable feature that I don’t need, I could have used

UML in the first place.

Why extending existing models?

Page 3: You need to extend your models? EMF Facet vs. EMF Profiles

Modeling Language

Meta model

Concrete Syntax Editor

… generates Ruby on Rails.

… generates JavaServer Faces.

… generates DB Schema.

I want to additionally specify “Finder SQL” statements!

I want to additionally specify the bean scope!

Leave it as it is! If you introduce every

imaginable feature that I don’t need, I could have used

UML in the first place.

You need a lightweight extension mechanism!

Main Objectives - No modification of existing models - Adding of “concern-specific” information

I can’t address all your requirements!

Why extending existing models?

Page 4: You need to extend your models? EMF Facet vs. EMF Profiles

EMF Facet - http://www.eclipse.org/modeling/emft/facet/

My instances (XMI)

conforms to

My model (in Ecore)

Page 5: You need to extend your models? EMF Facet vs. EMF Profiles

EMF Facet - http://www.eclipse.org/modeling/emft/facet/

My instances (XMI)

conforms to

My model (in Ecore)

Facet extends

My facet model • Types

• Attributes

• References

uses

Queries

Different languages • Java

• OCL

• Etc.

relies on

Page 6: You need to extend your models? EMF Facet vs. EMF Profiles

EMF Facet - http://www.eclipse.org/modeling/emft/facet/

My instances (XMI)

conforms to

My model (in Ecore)

Facet extends

My facet model • Types

• Attributes

• References

uses

Queries

Different languages • Java

• OCL

• Etc.

relies on

Page 8: You need to extend your models? EMF Facet vs. EMF Profiles

EMF Profiles - http://code.google.com/a/eclipselabs.org/p/emf-profiles/

My model (in Ecore)

Ecore metamodel

conforms to

extends

My EMF Profile •Stereotypes

•Tagged Values

applied to

Page 9: You need to extend your models? EMF Facet vs. EMF Profiles

EMF Profiles - http://code.google.com/a/eclipselabs.org/p/emf-profiles/

My model (in Ecore)

Ecore metamodel

conforms to

extends

My EMF Profile •Stereotypes

•Tagged Values

applied to

My model & profile application

conforms to

Page 10: You need to extend your models? EMF Facet vs. EMF Profiles

Example for demo Review my model, Ms. “know-it-all”!

Page 11: You need to extend your models? EMF Facet vs. EMF Profiles

Example for demo Review my model, Ms. “know-it-all”!

• Without polluting the original instances!

• Without affecting the Ecore model!

• But still in a structured way!

• Easily processible by humans and tools!

Page 12: You need to extend your models? EMF Facet vs. EMF Profiles

Model Extension

EMF Facet EMF Profiles

Adding of new model elements

Annotating of existing model elements

Support for types, attributes, references

Support for types, attributes, references

Dynamically calculated (via model queries)

Statically defined (via model editors)

Customization of tree view

Customization of diagram view