Re: MVP : model and duplicate

2010-07-07 Thread SimonM
My bad, you're right. I was confused and forgot about Serialization.

Thank you for pointing it out !

Simon


On 7 juil, 16:19, Stefan Bachert  wrote:
> Hi Simon,
>
> One question is what do you mean with "duplicate"?
>
> In a client-server environment there is an absolute need to duplicate
> the value of an object.
> Because you need it on server and client side. The process is called
> serialization.
> However, you can use the same class on both sides.
>
>  When you client just need a smaller set of attributes than your
> domain object offers, you need different classes.
> The latter happens when multiple applications are working on the same
> domain objects.
>
> There are a lot of object/classes which are some how similar but used
> in different technical context( e.g with/without lazy loading from
> database)
> - objects representing database entities (ENTITES)
> - objects representing domain objects/model objects (DomainObject,
> Business Objects)
> - objects representing a snapshot of domain objects
> (DataTransferObjects, ValueObject)
>
> Stefan Bacherthttp://gwtworld.de
>
> On 7 Jul., 11:10, SimonM  wrote:
>
>
>
> > Hi,
>
> > I have some troubles with MVP : as I have understood, the model should
> > just be business objects which are present in a shared package, so
> > client and server can access them from a GWT point of view.
>
> > In a three layered application how do you not duplicate these business
> > objects, while you have beans used in the business layer ? From what I
> > understand they are the same objects but in two different layers, so
> > we need two different classes.
>
> > Where is my mistake ?
>
> > Simon

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP : model and duplicate

2010-07-07 Thread Stefan Bachert
Hi Simon,

One question is what do you mean with "duplicate"?

In a client-server environment there is an absolute need to duplicate
the value of an object.
Because you need it on server and client side. The process is called
serialization.
However, you can use the same class on both sides.

 When you client just need a smaller set of attributes than your
domain object offers, you need different classes.
The latter happens when multiple applications are working on the same
domain objects.

There are a lot of object/classes which are some how similar but used
in different technical context( e.g with/without lazy loading from
database)
- objects representing database entities (ENTITES)
- objects representing domain objects/model objects (DomainObject,
Business Objects)
- objects representing a snapshot of domain objects
(DataTransferObjects, ValueObject)


Stefan Bachert
http://gwtworld.de



On 7 Jul., 11:10, SimonM  wrote:
> Hi,
>
> I have some troubles with MVP : as I have understood, the model should
> just be business objects which are present in a shared package, so
> client and server can access them from a GWT point of view.
>
> In a three layered application how do you not duplicate these business
> objects, while you have beans used in the business layer ? From what I
> understand they are the same objects but in two different layers, so
> we need two different classes.
>
> Where is my mistake ?
>
> Simon

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP : model and duplicate

2010-07-07 Thread Gal Dolber
I think you should avoid duplicate the model objects. Find the way to share
them between all you application or cut off one layer :P

2010/7/7 SimonM 

> Hi,
>
> I have some troubles with MVP : as I have understood, the model should
> just be business objects which are present in a shared package, so
> client and server can access them from a GWT point of view.
>
> In a three layered application how do you not duplicate these business
> objects, while you have beans used in the business layer ? From what I
> understand they are the same objects but in two different layers, so
> we need two different classes.
>
> Where is my mistake ?
>
> Simon
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
http://gwtupdates.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



MVP : model and duplicate

2010-07-07 Thread SimonM
Hi,

I have some troubles with MVP : as I have understood, the model should
just be business objects which are present in a shared package, so
client and server can access them from a GWT point of view.

In a three layered application how do you not duplicate these business
objects, while you have beans used in the business layer ? From what I
understand they are the same objects but in two different layers, so
we need two different classes.

Where is my mistake ?

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.