EMF Facet (a UML profile-like mechanism for EMF?)

EMF Facet is a new Eclipse Modeling Project lead by MIA-Software and with the collaboration of AtlanMod .

There is not yet much documentation available for the project (we are working on that) but as the project proposal stated , EMF Facet project aims to contribute a dynamic extension mechanism for EMF tools by introducing new viewpoints (or “facets”) on their underlying data (i.e. existing models). Examples of such extension mechanisms to “decorate” or “annotate” a EMF model could be:

  • Extending an existing metamodel (Ecore model) in a non-intrusive way by adding new types, attributes, operations and relations.
  • Computing an extension by executing queries against an existing model
  • Virtualize the extension so that any EMF tool could use an extended model as a regular one.

Roughly speaking, you can think of EMF Facet as a kind of UML profile mechanism (though technically different) for EMF models, something that was missing until now. And yes, I know many people hate UML profiles but when properly used they are very very useful. UML profiles are not a replacement for DSLs (that would be the improper use) but they are useful nonetheless. And, in the same way we may want to (and can) annotate a UML model, we should be able to do the same with EMF models and EMF Facet is the project for that.

EMF Facet is just beginning so any feedback will be more than welcome.

If you enjoyed this post you can subscribe to this Software Modeling blog , to the portal’s mailing list , follow me ON twitter AND/OR CHECK the most popular posts . AND if you really liked it help me pass it ON TO others by bookmarking AND sharing the post USING the links below:

7 Responses to EMF Facet (a UML profile-like mechanism for EMF?)

  1. rafael says:

    UML profiles are not a replacement for DSLs (that would be the improper use)

    What do you mean? Building (“internal”) DSLs is one of the main purposes I see for profiles and stereotypes (likewise for annotations in Java/C#). Otherwise, how can I build an entity modeling language or a web modeling on top of UML? Inheritance/interfaces can be cumbersome for that.

  2. jordi says:

    What I meant to say was that profiles are useful when you are just slightly extending the information of the model (e.g. indicating that a given attribute is a primary key), that is, when UML is a good base to express the concepts of your domain and you just want to complement it.

    If the semantics of the constructs you need in your domain are too far from those offered by UML then profiles will not help you and it´s better to create your own DSL.

  3. rafael says:

    Right. My opinion is that between “slightly” and “too far” there is a significant area with various tones of grey, and in many cases UML will be a good host language for a DSL.

  4. [...] (typeof(addthis_share) == "undefined"){ addthis_share = [];}EMF Facet and EMF Profiles are two lightweight extension mechanisms for EMF models. With both tools you are [...]

  5. I am working on a project in which we provide a base metamodel that can be extended at run-time by third-party plugin developers (this is something close to what AMW provides with their base weaving metamodel). In this context, I am wondering whether EMF Facet is the right tool for managing this specific scenario and how then plugin developers may access the instances conforming to the extended metamodel (e.g., can they use them as input of Acceleo templates?).

    I am looking for some basic tutorials about how to use EMF Facet in practice so that I can start answering the above mentioned doubts.
    Do you have any useful pointer?

  6. Hugo Bruneliere says:

    EMF Facet is a project originated from the Eclipse MoDisco one, so part of its documentation is still available from the MoDisco project documentation.
    Looking to its official documentation in Eclipse Juno (http://help.eclipse.org/juno/index.jsp), you will find detailed explanations about how to create and use facets in the “MoDisco User Guide / Infrastructure / Facet Manager” section.
    Directly related to this, I also encourage you to take a look to the generic querying system (cf. “MoDisco User Guide / Infrastructure / Query Manager” section).
    I hope this helps.

  7. Perfect! Thank you very much Hugo.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress
More in modeling, project
Which modeling language do you use for MDE (survey results)
Cite our modeling papers not only our modeling tools (thanks)
Design Patterns Quick Reference