Skip to main content



      Home
Home » Eclipse Projects » GEF » how can i split A model into business and view models
how can i split A model into business and view models [message #166342] Mon, 31 January 2005 03:21 Go to next message
Eclipse UserFriend
Originally posted by: jianminjin.msn.com

if i split the model into business and view models, how can controller
manipulator them synchronously, it's the controller's response to assure it
or there maybe a module which integrate business & view , just call it
dataprovider, controller just manipulator the dataprovider?
need controller understand that drag a figure on the diagram maybe will
leading to change in business model? if so, the controller must be very
complicated ,right?
i'm working on a project that do part of the job that something that like
uml editor does(c++) , so i don't have GEF do use, but i want to use the
framework of GEF as a reference, but the whole framework is too big to
master , can anyone simply it or give me an easier way to understand it ,
thanks in advance.
Re: how can i split A model into business and view models [message #166351 is a reply to message #166342] Mon, 31 January 2005 07:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

jin wrote:
> if i split the model into business and view models, how can controller
> manipulator them synchronously, it's the controller's response to assure it
> or there maybe a module which integrate business & view , just call it
> dataprovider, controller just manipulator the dataprovider?
> need controller understand that drag a figure on the diagram maybe will
> leading to change in business model? if so, the controller must be very
> complicated ,right?
> i'm working on a project that do part of the job that something that
> like uml editor does(c++) , so i don't have GEF do use, but i want to
> use the framework of GEF as a reference, but the whole framework is too
> big to master , can anyone simply it or give me an easier way to
> understand it , thanks in advance.
>
>

Your editpart is probably what you are calling a 'view model'. What
about this view model is saved though? Is it really a model storing
critical data, or is it only a set of preferences?
Re: how can i split A model into business and view models [message #166403 is a reply to message #166351] Mon, 31 January 2005 20:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jianminjin.msn.com

CL [dnoyeb] Gilbert wrote:

> jin wrote:
>> if i split the model into business and view models, how can controller
>> manipulator them synchronously, it's the controller's response to assure it
>> or there maybe a module which integrate business & view , just call it
>> dataprovider, controller just manipulator the dataprovider?
>> need controller understand that drag a figure on the diagram maybe will
>> leading to change in business model? if so, the controller must be very
>> complicated ,right?
>> i'm working on a project that do part of the job that something that
>> like uml editor does(c++) , so i don't have GEF do use, but i want to
>> use the framework of GEF as a reference, but the whole framework is too
>> big to master , can anyone simply it or give me an easier way to
>> understand it , thanks in advance.
>>
>>

> Your editpart is probably what you are calling a 'view model'. What
> about this view model is saved though? Is it really a model storing
> critical data, or is it only a set of preferences?

thanks for ur reply。
i.e in class diagram , every element has semantic data(class, inheritance
assosiation....) & presentation data(x, y, height, width...), is it good
design to split them into different model. if so whose reponse is it to
assure synchronously change their datas
Re: how can i split A model into business and view models [message #166412 is a reply to message #166403] Mon, 31 January 2005 21:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

jin wrote:
> CL [dnoyeb] Gilbert wrote:
>
>> jin wrote:
>>
>>> if i split the model into business and view models, how can
>>> controller manipulator them synchronously, it's the controller's
>>> response to assure it
>>> or there maybe a module which integrate business & view , just call
>>> it dataprovider, controller just manipulator the dataprovider?
>>> need controller understand that drag a figure on the diagram maybe
>>> will leading to change in business model? if so, the controller must
>>> be very complicated ,right?
>>> i'm working on a project that do part of the job that something that
>>> like uml editor does(c++) , so i don't have GEF do use, but i want to
>>> use the framework of GEF as a reference, but the whole framework is
>>> too big to master , can anyone simply it or give me an easier way to
>>> understand it , thanks in advance.
>>>
>>>
>
>> Your editpart is probably what you are calling a 'view model'. What
>> about this view model is saved though? Is it really a model storing
>> critical data, or is it only a set of preferences?
>
>
> thanks for ur reply。
> i.e in class diagram , every element has semantic data(class,
> inheritance assosiation....) & presentation data(x, y, height,
> width...), is it good design to split them into different model. if so
> whose reponse is it to assure synchronously change their datas
>

in gef, the presentation is handled by the EditPart class. Each
EditPart has a reference to the model is is presenting for. The models
usually fire events to let the EditParts know they have changed.

There are GEF examples and explanations to be found on the
www.eclipse.com website under the articles I do believe.


hope this helps.
Re: how can i split A model into business and view models [message #166428 is a reply to message #166403] Mon, 31 January 2005 23:21 Go to previous messageGo to next message
Eclipse UserFriend
This is really beyond GEF. GEF is model-agnostic and levies no constraints
on the model. Nor does it propose any good designs for your model.

I'll give you my two cents, so long as you realize that this is just my
opinion/conjecture, and not related to GEF at all. It's not unusual for
business model to be separated from view model, but you have to decide if
you really need it. I am guessing one of the chief motivators for
separating the two models is if you have several different types of
presentations and don't want all that information to clutter the actual,
core data.

There are a few ways you can go about doing this. You can have your view
model wrap the business model, so that the rest of the application sees only
one model front. You could also mirror the business model in your view
model, but that's probably not a very good idea. This approach would
require you to keep your two models in sync with each other. Things,
however, are easier on the application side because the separation is not
visible there. On the other hand, you could also make the separation
visible throughout, make the two models distinct, and have your application
track both.

Anyway, perhaps a Google search, an SE forum, or some good book or other
source will better suit your purpose than discussing this on here.

"jin" <jianminjin@msn.com> wrote in message
news:ctmld1$lne$1@www.eclipse.org...
> CL [dnoyeb] Gilbert wrote:
>
> > jin wrote:
> >> if i split the model into business and view models, how can controller
> >> manipulator them synchronously, it's the controller's response to
assure it
> >> or there maybe a module which integrate business & view , just call it
> >> dataprovider, controller just manipulator the dataprovider?
> >> need controller understand that drag a figure on the diagram maybe will
> >> leading to change in business model? if so, the controller must be very
> >> complicated ,right?
> >> i'm working on a project that do part of the job that something that
> >> like uml editor does(c++) , so i don't have GEF do use, but i want to
> >> use the framework of GEF as a reference, but the whole framework is too
> >> big to master , can anyone simply it or give me an easier way to
> >> understand it , thanks in advance.
> >>
> >>
>
> > Your editpart is probably what you are calling a 'view model'. What
> > about this view model is saved though? Is it really a model storing
> > critical data, or is it only a set of preferences?
>
> thanks for ur reply&#12290;
> i.e in class diagram , every element has semantic data(class, inheritance
> assosiation....) & presentation data(x, y, height, width...), is it good
> design to split them into different model. if so whose reponse is it to
> assure synchronously change their datas
>
Re: how can i split A model into business and view models [message #166444 is a reply to message #166428] Tue, 01 February 2005 01:17 Go to previous message
Eclipse UserFriend
Originally posted by: jianminjin.msn.com

Pratik Shah wrote:

> This is really beyond GEF. GEF is model-agnostic and levies no constraints
> on the model. Nor does it propose any good designs for your model.

> I'll give you my two cents, so long as you realize that this is just my
> opinion/conjecture, and not related to GEF at all. It's not unusual for
> business model to be separated from view model, but you have to decide if
> you really need it. I am guessing one of the chief motivators for
> separating the two models is if you have several different types of
> presentations and don't want all that information to clutter the actual,
> core data.

> There are a few ways you can go about doing this. You can have your view
> model wrap the business model, so that the rest of the application sees only
> one model front. You could also mirror the business model in your view
> model, but that's probably not a very good idea. This approach would
> require you to keep your two models in sync with each other. Things,
> however, are easier on the application side because the separation is not
> visible there. On the other hand, you could also make the separation
> visible throughout, make the two models distinct, and have your application
> track both.

> Anyway, perhaps a Google search, an SE forum, or some good book or other
> source will better suit your purpose than discussing this on here.


really appreciate ur opinion, can u suggest some good article about gef?
i have searched on this website, but found there are many article about it
Previous Topic:WYSIWYG HTML Editor
Next Topic:Best approach for viewer creation ?
Goto Forum:
  


Current Time: Wed Jun 18 14:57:18 EDT 2025

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

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

Back to the top