Exposing only the interfaces of the Data Entities to GWT

20 views
Skip to first unread message

Nitiraj

unread,
Feb 11, 2011, 12:25:17 AM2/11/11
to Google Web Toolkit, nitiraj...@tbitsglobal.com
Hi,

I have a architecture where one jar contains the interfaces of
Entities used in the project. Say, IUser, IGroup etc.
Other jar contains the implementation (concrete classes) of these
Entities, say User.java, Group.java etc ..

I only want to expose the interface jar to the GWT front end UI
project and hide all the implementation object.
But I want to pass these objects directly into the client code.
I have seen Objectify ( http://code.google.com/p/objectify-appengine/
) but this will also need me to expose the User.java and Group.java
implementations.

How should I go about it.
Any help is deeply appreciated. !

Sebastian Rothbucher

unread,
Feb 14, 2011, 5:53:41 PM2/14/11
to Google Web Toolkit
Hi Nitiraj,

I guess in that case you have to chance but create another (entirely
dumb) implementation of IUser, etc. that does nothing but store the
properties - and to copy over into these objects before performing the
actual service / before returning. As you'd still be on the server you
can probably make use of reflection (or reflection-based stuff such as
beanutils) to realize that...

Hope this helps - best regards
Sebastian Rothbucher

On 11 Feb., 06:25, Nitiraj <crazy.na...@gmail.com> wrote:
> Hi,
>
> I have a architecture where one jar contains the interfaces of
> Entities used in the project. Say, IUser, IGroup etc.
> Other jar contains the implementation (concrete classes) of these
> Entities, say User.java, Group.java etc ..
>
> I only want to expose the interface jar to the GWT front end UI
> project and hide all the implementation object.
> But I want to pass these objects directly into the client code.
> I have seen Objectify (http://code.google.com/p/objectify-appengine/
Reply all
Reply to author
Forward
0 new messages