views:

90

answers:

3

Hi,

I'm new to the architecture of UIs and in the past I've programmed very simple UIs. Now I'm confronted with a very large domain model. Because I've used different OR-Mappers to store domain objects in a flat data structure I thought about mapping the domain objects to the view-side in a similar way.

Are there any patterns or frameworks that address this problem?

More precisely I want to adapt the domain objects to eclipse RCP views in an easy way.

Thanks in advance

+1  A: 

Regarding Eclipse RCP, I'm not aware of any 'frameworks' for this, but at least the JFace ContentProvider mechanism makes it easy to write a layer of re-usable adapters that handles the presentation of your domain classes in JFace viewers.

If you're after some generic (or starting-point) CRUD screens for domain classes, perhaps you can use code-generation, reflection, and/or dynamic proxies for the ContentProvider classes, taking each domain class (or classes) as input. However, this is rarely as simple as it sounds.

Cornel Masson
A: 

What about Metawidget ?

Metawidget is a 'smart User Interface widget' that populates itself, at runtime, with UI components to match the properties of your business objects.

Metawidget does this without introducing new technologies. It inspects your existing back-end architecture (such as JavaBeans, existing annotations, existing XML configuration files) and creates widgets native to your existing front-end framework (such as Swing, Java Server Faces, Struts, Android).

I never tried it myself, but it looks like promising for this kind of mapping.

Guillaume
A: 

A more complete framework is Naked Objects, of which I'm a committer and also the lead on a number of sister projects. One of those sister projects is an Eclipse RCP viewer, though it is currently stalled. Feel freed to contact me via my blog if any of this sounds of interest.

-- Dan

Dan Haywood