Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF and Model - View - Presenter - General Question
EMF and Model - View - Presenter - General Question [message #910494] Sun, 09 September 2012 20:55 Go to next message
Mark Rowe is currently offline Mark RoweFriend
Messages: 23
Registered: January 2012
Junior Member
Sorry for posting something of a newbie question into this forum, but I am hoping for an opinion from an EMF expert. I am getting there with Java / RCP, but new to EMF and Hibernate.

I am writing a relatively straightforward standalone RCP application which needs to store a few thousand objects (of various types) that can be viewed/edited by a few tens of users.

After a lot of googling and reading I think that a Model - View - Presenter would be good because each view is a different composition of the model types (similar in a way to an invoice screen and report).

My plan is to create an EMF model of the data for each UI 'view' and use JFace / EMF linking. The data 'model' would be created using EMF and persisted using Teneo / Hibernate. I would then implement the business logic in the 'presentation' layer which would effectively pull objects from the 'data model' and write them to the 'view model'.

In the most part the presentation objects will be very simple but can add functionality such as filtering, copying, bulk insert and delete etc.

Many thanks for any comments!
Re: EMF and Model - View - Presenter - General Question [message #910610 is a reply to message #910494] Mon, 10 September 2012 04:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mark,

Comments below.

On 09/09/2012 10:55 PM, Mark Rowe wrote:
> Sorry for posting something of a newbie question into this forum, but
> I am hoping for an opinion from an EMF expert. I am getting there with
> Java / RCP, but new to EMF and Hibernate.
>
> I am writing a relatively straightforward standalone RCP application
> which needs to store a few thousand objects (of various types) that
> can be viewed/edited by a few tens of users.
>
> After a lot of googling and reading I think that a Model - View -
> Presenter would be good because each view is a different composition
> of the model types (similar in a way to an invoice screen and report).
>
> My plan is to create an EMF model of the data for each UI 'view' and
> use JFace / EMF linking. The data 'model' would be created using EMF
> and persisted using Teneo / Hibernate.
Or CDO might be interesting if there is the potential for the users to
be editing the same model instance at the same time.
> I would then implement the business logic in the 'presentation' layer
> which would effectively pull objects from the 'data model' and write
> them to the 'view model'.
Views can be induced with an additional model either using EMF's item
providers or using EMF data binding.
>
> In the most part the presentation objects will be very simple but can
> add functionality such as filtering, copying, bulk insert and delete etc.
Start with just your data model and generate an EMF RCP editor for
that. See how close that comes to what you need. It will definitely be
functionally complete in the sense that you can create/modify/save any
well formed instance...
>
> Many thanks for any comments!
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF and Model - View - Presenter - General Question [message #910793 is a reply to message #910610] Mon, 10 September 2012 12:00 Go to previous message
Mark Rowe is currently offline Mark RoweFriend
Messages: 23
Registered: January 2012
Junior Member
Hi Ed,

Many thanks for your excellent insight.

I think you are right, it is CDO that I need. Oh well, more searching, reading and experimenting! If anyone has any suggestions of good tutorials then please let me know.

Yes, I successfully created the data model and ran an EMF RCP editor (following the Vogella EMF tutorial). My next step was to persist this model using Teneo / Hibernate / H2 which also worked fine. What I missed was that this setup is not 'multi-user' Sad.




Previous Topic:[CDO] : have fix fragment URI on commit
Next Topic:shared EMF editor with CDO/hibernate
Goto Forum:
  


Current Time: Thu Mar 28 14:12:44 GMT 2024

Powered by FUDForum. Page generated in 0.03367 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top