2.1 RequestFactory design frustrations

2010-11-10 Thread dparish
I'm switching some of my work from RPC to RequestFactory. I'm doing
this because I use open jpa on the backend and keep having to hack
through serialization problems (such as proxy objects that won't
serialize).

RequestFactory seems like the perfect option.  I'm caught off guard by
some GWT design decisions that make it difficult and make me need to
re-tool quite a few Entities.

I have to have my data access methods in my entity class (findEmployee
for instance). I've always felt the entity was just that.. a stand
alone entity, not the actions for that entity.  I keep finders and
other things in a DataHandler.  Yes I can still create a findEmployee
method and put the work in EmployeeHandler, but it just seems un-
necessary.
Most of my work is primitive types. For instance,  I need to change
public int getId() to public Integer getId().
It's interface spaghetti.  I though annotations were designed to help
us get rid of not just xml files, but interfaces of interfaces that
point to other interfaces
The interfaces don't enforce compile time correctness.  EntityProxies
should show errors in Eclipse if the methods don't match the Entity
methods.The request service stub should let me know in my IDE that
I've got a method that's not implemented in the Entity.

I'm sure I'll get this to all work and that in the end it will solve
my serialization problems and perform very well.  Perhaps the GWT team
can write some Eclipse wizards (such as the UIHandler wizard) that
will at least streamline the interface mess. Point it at the entity
and let all the interfaces get generated. Change the entity and the
intefaces show errors and you can correct them (as you can now with
RPC if your service interface doesn't match your async and server side
impl classes).

-Dave


-- 
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: 2.1 RequestFactory design frustrations

2010-11-10 Thread David Chandler
Hi Dave,

We're on it. See
http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1
and particularly
http://code.google.com/p/google-web-toolkit/issues/detail?id=5111,
which will make it possible for you to implement a service as a
traditional DAO instead of static methods on an entity. Regarding
point it at the entity and let all the interfaces get generated,
this is exactly what Spring Roo does. See
http://googlewebtoolkit.blogspot.com/2010/10/announcing-final-release-of-gwt-21.html
for an example.

I've forwarded your ideas to the Google Plugin for Eclipse team, also.

Thanks for the feedback!

/dmc

On Wed, Nov 10, 2010 at 8:49 PM, dparish dpar...@gmail.com wrote:
 I'm switching some of my work from RPC to RequestFactory. I'm doing
 this because I use open jpa on the backend and keep having to hack
 through serialization problems (such as proxy objects that won't
 serialize).

 RequestFactory seems like the perfect option.  I'm caught off guard by
 some GWT design decisions that make it difficult and make me need to
 re-tool quite a few Entities.

 I have to have my data access methods in my entity class (findEmployee
 for instance). I've always felt the entity was just that.. a stand
 alone entity, not the actions for that entity.  I keep finders and
 other things in a DataHandler.  Yes I can still create a findEmployee
 method and put the work in EmployeeHandler, but it just seems un-
 necessary.
 Most of my work is primitive types. For instance,  I need to change
 public int getId() to public Integer getId().
 It's interface spaghetti.  I though annotations were designed to help
 us get rid of not just xml files, but interfaces of interfaces that
 point to other interfaces
 The interfaces don't enforce compile time correctness.  EntityProxies
 should show errors in Eclipse if the methods don't match the Entity
 methods.The request service stub should let me know in my IDE that
 I've got a method that's not implemented in the Entity.

 I'm sure I'll get this to all work and that in the end it will solve
 my serialization problems and perform very well.  Perhaps the GWT team
 can write some Eclipse wizards (such as the UIHandler wizard) that
 will at least streamline the interface mess. Point it at the entity
 and let all the interfaces get generated. Change the entity and the
 intefaces show errors and you can correct them (as you can now with
 RPC if your service interface doesn't match your async and server side
 impl classes).

 -Dave


 --
 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.





-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.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.