Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms][CDO] Make View model being CDO native
[EMF Forms][CDO] Make View model being CDO native [message #1268250] Mon, 10 March 2014 08:49 Go to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Hi All,

I'd like to ask if there is any chance to have View Model from EMF Forms as a CDO native model?

I'm using EMF Forms in my RCP-based application with CDO as a model repository. I need to store, next to domain model, view models, but as that view model is not CDO ready, I am loosing lazy loading.

Have you ever considered providing View model as a CDO native one? Or providing two versions of your model?

Cheers,
Paweł.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1268285 is a reply to message #1268250] Mon, 10 March 2014 09:47 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hey Guys,

I think this is a good idea. Please let me know if I can help ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Am 10.03.2014 09:49, schrieb Paweł Doleciński:
> Hi All,
>
> I'd like to ask if there is any chance to have View Model from EMF Forms as a CDO native model?
> I'm using EMF Forms in my RCP-based application with CDO as a model repository. I need to store, next to domain model,
> view models, but as that view model is not CDO ready, I am loosing lazy loading.
>
> Have you ever considered providing View model as a CDO native one? Or providing two versions of your model?
>
> Cheers,
> Paweł.


Re: [EMF Forms][CDO] Make View model being CDO native [message #1268618 is a reply to message #1268250] Mon, 10 March 2014 18:59 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

Sounds interesting. However, I am not sure, if we really need lazy
loading for the view model. If the view is instantiated, the view model
will be completely in memory anyways. What is the motivation for this?


Regards

Jonas

Am 10.03.2014 09:49, schrieb Paweł Doleciński:
> Hi All,
>
> I'd like to ask if there is any chance to have View Model from EMF Forms
> as a CDO native model?
> I'm using EMF Forms in my RCP-based application with CDO as a model
> repository. I need to store, next to domain model, view models, but as
> that view model is not CDO ready, I am loosing lazy loading.
>
> Have you ever considered providing View model as a CDO native one? Or
> providing two versions of your model?
>
> Cheers,
> Paweł.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1268949 is a reply to message #1268618] Tue, 11 March 2014 07:19 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Hi Jonas,

basically you are right, but imagine situation when I've got extended view model which provides Attachment with a reference to another view. I could have as many this kind of references as I want but what I do not want is to load all the models at once.

Another case: TreeMasterDetail. Let's say I have this control in my model but it is invisible. As I do not want to render it, I do not need to load referenced view model.

Using CDO and having view model as CDO native could save memory footprint in case of huge models.

Cheers,
Paweł.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1270049 is a reply to message #1268949] Wed, 12 March 2014 12:48 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi Pawel,

how big are your view models in total?

Best regards

Jonas

Am 11.03.2014 08:19, schrieb Paweł Doleciński:
> Hi Jonas,
>
> basically you are right, but imagine situation when I've got extended
> view model which provides Attachment with a reference to another view. I
> could have as many this kind of references as I want but what I do not
> want is to load all the models at once.
>
> Another case: TreeMasterDetail. Let's say I have this control in my
> model but it is invisible. As I do not want to render it, I do not need
> to load referenced view model.
>
> Using CDO and having view model as CDO native could save memory
> footprint in case of huge models.
>
> Cheers,
> Paweł.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1270697 is a reply to message #1270049] Thu, 13 March 2014 10:49 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Hi Jonas,

usually one view model has ~300-500 controls. It could be split to tabs (categories), so with CDO I could load only information about having a tab w/o really loading content of it. And I've got references between view models. In total I have about 100 view models of that size. Usually a chain of references from one view model to another has size of 3 to 4.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1271125 is a reply to message #1270697] Fri, 14 March 2014 10:20 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
OK, so your model is not small.
However, I think it would be much easier to just load the view models on
demand locally. It is pretty clear, when they are needed and memory and
when not.
I am not really sure, what you mean by "Usually
a chain of references from one view model to another has size of 3 to 4" ?

Best Regards

Jonas

Am 13.03.2014 11:49, schrieb Paweł Doleciński:
> Hi Jonas,
>
> usually one view model has ~300-500 controls. It could be split to tabs
> (categories), so with CDO I could load only information about having a
> tab w/o really loading content of it. And I've got references between
> view models. In total I have about 100 view models of that size. Usually
> a chain of references from one view model to another has size of 3 to 4.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1271132 is a reply to message #1271125] Fri, 14 March 2014 10:33 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Jonas, I agree it would be much easier.
But I have a requirement to store my models in CDO.
And even if you store them and load locally I have a problem with references.
By chain of references I mean that I have a view model which has a reference to another one which again has a reference to another one and so on.
So if I loaded the first view model, all of the referenced model would be loaded as well. And here is where CDO comes with lazy loading.

Cheers,
Paweł.

[Updated on: Fri, 14 March 2014 10:33]

Report message to a moderator

Re: [EMF Forms][CDO] Make View model being CDO native [message #1271162 is a reply to message #1271132] Fri, 14 March 2014 12:02 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
How and why do you reference view models from each other. That sounds
interesting. Is that a custom extension you did?

Am 14.03.2014 11:33, schrieb Paweł Doleciński:
> Jonas, I agree it would be much easier. But I have a requirement to
> store my models in CDO.
> And even if you store them and load locally I have a problem with
> references.
> By chain of references I mean that I have a view model which has a
> reference to another one which again has a reference to another one and
> so on.
> So if I loaded the first view model, all of the referenced model would
> be loaded as well. And here is where CDO comes with lazy loading.
>
Re: [EMF Forms][CDO] Make View model being CDO native [message #1271211 is a reply to message #1271162] Fri, 14 March 2014 14:19 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Yes, it is my custom extension. I do not use extension point to register view models as I can have few of them for one domain class and specific opening action is looking in CDO for view model with given id.
Then when I navigate between references, I can explicitly say which view model should be opened for a reference.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1272013 is a reply to message #1271211] Sun, 16 March 2014 22:05 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Are you using the legacy mode at the moment?

Am 14.03.2014 15:19, schrieb Paweł Doleciński:
> Yes, it is my custom extension. I do not use extension point to register
> view models as I can have few of them for one domain class and specific
> opening action is looking in CDO for view model with given id.
> Then when I navigate between references, I can explicitly say which view
> model should be opened for a reference.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1272146 is a reply to message #1272013] Mon, 17 March 2014 07:18 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Yes, I do and this is not the way to go for me. Another option would be to create my own view model with converter to yours, but this leads me to a huge maintenance and synchronization problem.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1272490 is a reply to message #1272146] Tue, 18 March 2014 02:59 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Why do you need a converter? If you make the model CDO native for you
case, isn't that transparent for EMF Forms?
Are you on ECNA? Maybe we can discuss this in person?

Am 17.03.2014 08:18, schrieb Paweł Doleciński:
> Yes, I do and this is not the way to go for me. Another option would be
> to create my own view model with converter to yours, but this leads me
> to a huge maintenance and synchronization problem.
Re: [EMF Forms][CDO] Make View model being CDO native [message #1272554 is a reply to message #1272490] Tue, 18 March 2014 07:29 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
EMF Forms expects VView instance as an input. If I did my own model CDO native, it would not be VView anymore. I could inherit from EMF Forms View model but this leads me to extending every single leaf class in the hierarchy.
My extension provides additional VAttachments which I can make CDO native but still from CDO I retrieve VView which is not native.

This way would be great to have VView as CDO native. Otherwise I need to either do my own parallel model with converter or change EMF Forms directly and do my own release of that.

I am from Central Europe but we can try to arrange a meeting anyway.

Cheers
Paweł
Re: [EMF Forms][CDO] Make View model being CDO native [message #1273673 is a reply to message #1272554] Thu, 20 March 2014 10:57 Go to previous messageGo to next message
Paweł Doleciński is currently offline Paweł DolecińskiFriend
Messages: 44
Registered: January 2014
Member
Would it be feasible to just follow GMF somehow?
Here is a discussion about making GMF CDO native https://bugs.eclipse.org/bugs/show_bug.cgi?id=425086
Re: [EMF Forms][CDO] Make View model being CDO native [message #1274074 is a reply to message #1272554] Fri, 21 March 2014 00:27 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

we had some discussions about that. I undertand your use case. Although
I think it is pretty special, at least I do not know about any other
with these requirements. Making the View Model CDO native would add a
dependency to CDO. We want to keep the view model as stand-alone as
possible. I think GMF came to same conclusion. However, I do not see any
reason, why you should create a CDO native version yourself. I even do
not think it will be more effort for you then for us. If you see any
impediments, please let me know...

Best regards

Jonas



Am 18.03.2014 08:29, schrieb Paweł Doleciński:
> EMF Forms expects VView instance as an input. If I did my own model CDO
> native, it would not be VView anymore. I could inherit from EMF Forms
> View model but this leads me to extending every single leaf class in the
> hierarchy. My extension provides additional VAttachments which I can
> make CDO native but still from CDO I retrieve VView which is not native.
> This way would be great to have VView as CDO native. Otherwise I need to
> either do my own parallel model with converter or change EMF Forms
> directly and do my own release of that.
>
> I am from Central Europe but we can try to arrange a meeting anyway.
>
> Cheers
> Paweł
Previous Topic:[EMF Forms] Performance problems while switching between opened views
Next Topic:[EMFStore] cross-project references
Goto Forum:
  


Current Time: Tue Apr 23 07:14:25 GMT 2024

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

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

Back to the top