First Experiences with GMF
Eclipse GMF, the Graphical Modelling Frameworks will be one of the most important innovations for Model-Driven Development in 2006. It supports the (relatively) simple creation of graphical editors for Ecore-based metamodels. My view has always been that simplyfying the creation of "good" editors for your DSL is a much more pressing issue that coming up with fancy model-to-model transformation languages. So, GMF will be a big step in the right direction.
Currently, Milestone 5 of GMF is available. I have played around with M5 as well as M4 (thanks to some of my customers for being interesting in GMF and giving me the chance to "play" with it for a purpose :-)). Of course, there are still features missing and it is also a bit buggy, the overall impression is really good.
On the plus side, you can really easily come up with simple editors. The process is straigh forwards, once you understood the basic principles. You can build compartments (even nested ones), you can connect top-level elements as well as contained elements (you can even connect contained elements to top level elements), you can add labels, adapt the figures, define pallets, etc. The routing algorithms supplied with GMF are really not too bad, either.
There are, however, still a couple of problems when playing around with it (and yes, I fully realize that it's not finished yet, so this is not a complaint, it's just a description!). For example, the wizards that should come up with a good "default" editor in a couple of minutes didn't work well so we had to do the editors manually. Also, if you have a flaw in your model, the GMF generators might just silently crash without a notice or throw some (seemingly unrelated) exception. So, always make small changes (so you know what to undo to get it to work again), and sometimes you have to debug into the generator to see what it does. Also, some of the decorations you can add to your editor visual elements are simply ignored. A more important problem is that the documentation lacks some of the important use cases, e.g. explaining the extension points that allow you to add conditional decorations to your shapes. And by the way, in case you wonder, why the tutorial
levels of compartments in an introductory example: the reason is that it doesn't work with only one level :-) This looks like a funny bug, unless you try for an hour to go with only one level ("why start with the two-level, more complex example, anyway").
So, all in all, GMF looks very
promising. What I would really see improved is the documentation. Yes, they have zillions of pages (taken from IBM's underlying framework), but what developers need is a kind of FAQ to answer typical questions such as: how do I add conditional decoration, how do I add an arrow to my line, how can I prepare a model before the editor is opened, etc. Maybe some of the GM folks read this.... if you need more FAQ-questions, let me know :-)