Thanks to bk for mentioning it in my blog comments. The preivously posted Eclipse Modelling Framework article had the wrong URL, its actully here EMF. It looks quite interesting, though eclipse specific.
I read this paper on the way into the office today on the EMF Editing Framework. Fascinating reading. It mirrors similar thoughts on Naked Objects...
An introduction to naked objects using the Naked Objects framework. ëNaked objects' are core business objects, such as Customer, Product, and Order, that show directly through to the user, rather than being hidden behind the menus, forms, process-scripts and dialogue boxes that make up most user interfaces. In a naked object system, all operations are performed either by invoking a business behaviour on a particular object, editing the attributes of an object, or specifying an association between objects. [Java-Channel]
and also many of the ideas in Rickard's recent discussions on AOP along with his recent presentation.
The basic idea is you create a domain model. So the model could consist of Customer, Account, Employee, Company, that kinda thing. These objects are like value objects as the EJB folks often call them, or like your OO version of an Entity Model that DBAs often create.
The domain models are typically just regular Java beans created either via auto-generation from a modelling tool like Rose and using XMI or by hand crafting it via regular Java code. If your hand crafting via Java code you might well want to add some extra metadata to your code using JavaDoc tags like XDoclet does.
Once you have your model and meta-model you can autogenerate an editing framework complete with different views (table/tree) and various commands with undo/redo support.
Rickard's been looking at how things can have auto-change detection (for persistence), fetched in one fell swoop etc. I'm sure we could automatically add in AltRMI type behaviour too.
Pretty groovy stuff. I'm gonna have to have a play with EMF.
With Joe's recent discussions on framework agnostic Actions, it'd be interesting to have a completely UI agnostic domain model editing and command/action framework and then have multiple UIs automagically generated (which can then be customized to taste) for JFace, Swing, HTML and XUL.
So given a bunch of domain model beans we could generate adapters to JSF, WebWork, Swing, JFace, xulux etc.
10:23:06 AM
|