Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Using UML Profiles with EMF
Re: Using UML Profiles with EMF [message #627365] Thu, 05 February 2009 14:00
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Joel,

(including the UML2 newsgroup for their perspective)

The MDT UML2 component has been quite successful with their
implementation of Profiles for UML. Also, it's possibly a little-known
fact, but the Profile mechanism is applicable to any UML-based
metamodel, not just the UML, itself. The UML2 run-time library supports
this in any generated metamodel.

So, because Ecore can be described using UML (see the
Ecore.metamodel.uml resource in UML2), one can, in theory, generate
Ecore with profile support. :-D Of course, it's probably best to leave
Ecore to describe itself.

In my own experience, the stereotype mechanism of Profiles offers a very
convenient extension facility which readily supports:

- optionality: the base model element has no reference to the
stereotypes, so stereotypes don't even have to be loaded if
the application doesn't need them
- traceability: UML2 offers the implicit CacheAdapter instance that
facilitates the retrieval of stereotypes applied to an object
- transparency: languages such as OCL have built-in support for
stereotypes because they behave in every respect like additional
metaclasses
- type safety: stereotypes are more explicitly structured than
EAnnotations, and with UML2's static profile definition, can even
have behaviour of their own

It's basically a clean implementation of the classic Adapter/Decorator
pattern, for models. Profiles in themselves are a good reason to use
UML2 and its code generation for your metamodels. Just define your
metamodel with support for stereotype extension, and any client
application can define domain-specific extensions to your metamodel
without the encumbrance of the tight coupling implied by metaclass
specialization.

HTH,

Christian


Joel Rosi-Schwartz wrote:
> Hi,
>
> As a part of our modelling efforts for ORMF the use or UML Profiles has been
> brought up as a possible strategy to enable adopters to extend our core
> model. Since the architectural decision to use EMF has already been made, I
> started researching how one goes about applying UML Profiles to an ecore
> model. So far am not encouraged from my initial Googling, checking the EMF &
> the DSL book and searches on the relevant EF newsgroups.
>
> So I would like to ask this forum for their collective wisdom. Is using UML
> Profiles with EMF a good or bad idea. If it is a good idea, I would
> appreciate pointers to any relevant resources to better understand how to
> marry the two.
>
> Many thanks,
> Joel
>
Previous Topic:[Announce] MDT UML2 3.0.0M5 is available
Next Topic:No automatic generation of OCL classes
Goto Forum:
  


Current Time: Fri Apr 10 19:53:59 GMT 2020

Powered by FUDForum. Page generated in 0.01389 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top