Tuesday, May 22, 2007

Modelling by diagramming

Whenever i think of modelling, by which today i mean creating a logical model for our business, i always have a diagrams ahead my eyes. Those on sheet of paper or in cool UML editor. After discovering EMF some time ago i was a bit confused that all the tutorials, help and docs gave examples with nice yellow diagrams from Rose, but trying out anything required actually to dig into XML or stack of tree views in the ecore editor. This tools are not bad, specially because of fact that now have choice to use diagram editors. Yes, not editor, but editors - two!

After adding GMF to your Eclipse, new wizard appears in "File -> New..." as well as in .ecore file context menu. It initializes ecore diagram out of normal .ecore and lets you drag classes around, make connections, and all you were always dreaming about. Thanks to that, diagram editor and ecore editor can be used simultaniously, as they work on the same file and changes are immediately visible in both of them.

So that is EMF model diagram editor. Despite the fact, we've got EMF inside, it's still very nice class diagram editor, maybe more conformant with XSD than UML, but enough for most cases.

Another diagramming equipment comes bundled in UML2Tools. This feature grows on UML2 model implemented in EMF, a part of Eclipse Modelling top-project. Besides classes, it supports creating activity, component, profile and state machine diagrams. We're still waiting for first release, but there is already a loot to look at:

What i was most surprised about, is that this diagrams, or rather designed UML model, can be also used to build ecore (see the image below). Unfortunately right now, conversion is one-way only, which finally makes you end up with ecore model, uml model and uml diagram. Good news is that, first UML2Tools release is planned for June.

1 comment:

Evan said...

If this rational rose, I used rational rose for sometimes in my university. But it was too expensive for me to use that personally. For my UML diagrams I use Creately an online diagramming solution. Its not free but ok to try