Over the last couple of months we’ve been developing (should I say “modeling”?) a GMF-based graphical editor to support the new assembly and multi-channel, multi-tenant mediation features of Cape Clear 7.5. Actually, I’ve had pretty much no hands on involvement with it myself, a colleague of mine championed its use and has become quite expert with it, but I thought I’d pass on some of our experience. We are using GMF 1.0.3 as we are shipping with Eclipse 3.2.2 (we plan to move to 3.3 later in the year). The promise of GMF is rapidly rolled graphical editors with lots of eye candy and neat features for free, achieved with near zero code, or at least approaching zero when compared with GEF-coded editors. Our BPEL editor is GEF-coded, so we have something very substantial to compare our Assembly Editor with. Generally, I am very impressed by GMF, but much patience is required to get the best out of it. See pretty picture (a high-res version is viewable here).

GMF coded editor

Our core model is described in XML Schema and we generate our EMF model from that. A few points then:

  • This is an excellent getting started presentation.
  • It can seem like there is a huge gap between an initially generated editor (based on your model/schema) and where you know it needs to be. There may well be, but it is not necessarily a code-gap. The temptation is to jump in and start extending and modifying generated code, patience is required to do the right thing. Doing the right thing means trawling through examples and forums, posting questions to newsgroups and waiting on answers.
  • Go back to your source schema, modify and constrain it appropriately to help get the end feature the way you want in the generated editor.
  • If you have a schema that contains a lot of similar things, start with a subset of the schema which contains just one example of all the distinct elements, and get a working editor for that. Then add back in the other stuff – which is hopefully just repetition. In other words, reduce the problem space to something manageable to start with.
  • Make one model change then re-generate. The error reporting in the generation process is not very clear and diagnosing one cause and effect at once is by far the easiest way to work. Read all the error information reported and watch for compilation errors in the generated code too.
  • Make small changes to the model, regenerate and test them. When you are happy, commit those distinct changes to source control. Move on to the next task.
  • Keep step-by-step instructions for regenerating your EMF and GMF models when your schema changes, there will probably be a few manual fix-ups required (e.g. GMF 1.x doesn’t merge plugin.xml changes – 2.0 does apparently)

GMF has made it possible for us to have a great graphical editor for our Assemblies in a timeframe we would not have been able to GEF-code one in – or at least, nothing this polished and (almost) ready to ship! Hats off to the folks behind it.


Social Network DaaS

August 15, 2007

Duane talking about social networks doing DaaS and some of the advantages it would have. But beyond social networks, the security and integrity of my data is key, like the stuff I have in my Google hosted spreadsheets or my Google hosted mail (uh, is it safe??). I want to be able to use my data with different services, I don’t want to have to enter my data into different services.

More facets please

August 10, 2007

I’m pleased to see that the plan for WTP 3.0 includes the intention to make the Faceted Project Framework more generally available to Eclipse projects and adopters. I may not be so pleased when I figure out the work we’re going to have to do here at Cape Clear to migrate to this, but hopefully it won’t be too painful! Our Web service projects are built on WTP and facets, and while not perfect, broadly speaking adopting the framework has been very positive and successful for us. For example, in Cape Clear 7.5 we’ve added a new Assembly Facet which allows our existing BPEL-based and Java-based web services to take on new behaviour, namely multi-channel, multi-tennant mediations. The facet framework made this really easy. I think I did the basic facet definitions, constraints, data model and install delegate in a few days, and voila! I was then able to add this facet to web service projects created with Cape Clear (Studio) 7. If the work to common-ise the Faceted Project Framework is completed successfully, hopefully we’ll see more adoption amongst Eclipse top level projects, there is one in particular I have in mind that could really benefit, but I won’t mention any names 🙂