Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 367 Vote(s) - 3.69 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to adapt domain objects to GUI in Java

#1
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
Reply

#2
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.
Reply

#3
What about [Metawidget][1] ?

> 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.

[1]:

[To see links please register here]

Reply

#4
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][1], though it is currently stalled. Feel freed to contact me via my [blog][2] if any of this sounds of interest.

-- Dan

[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through