Greetings,

I've been investigating GWT as a replacement for our current web
framework. Our project is made up of multiple sub projects (maven
modules), one of which results in a jar containing services. The GWT
sub project then depends on the service sub project.

I'm trying to use GWT-RPC to invoke the services. I'm OK for the
moment with creating GWT-RPC services that live in the GWT project and
make calls to the services in the service project (rather than
bothering with something like GWT-SL for now). However, the objects
passed to and from the services are available to the GWT project as
bytecode in the jar only, not as source for the GWT cross compiler. So
far, I've been creating my own DTOs in the GWT project by hand, along
with a utility class to convert to and from them. However, that is
getting tedious and can be error prone.

One approach that I've seen mention of is building the service jar to
also contain the source, but I'm not much of a fan of that and had
trouble getting it to work anyway. I've also looked at Gilead, but
that's focused on entities, which only covers some of the types I'm
working with; others are just POJO DTOs. I've also looked at GWT-SL,
which looks useful for configuring services, but just uses Gilead for
serialization support and doesn't seem to add anything on top of that.

A solution I've come up with is to generate java source for DTOs
(instead of writing them by hand) using reflection against the objects
being used. I have a basic code generator working now that will create
a module definition and a DTO/utility pair of classes. The DTOs live
in the client package while the utility classes live in the server
package, providing bi-directional conversion functions. Currently, it
only supports primitives and Strings, but I'm planning to expand it to
support primitive wrappers, Dates, references to other DTOs, and
collections (List, Map, Set).

Before going any further, I thought I would find out if anyone has any
thoughts about this solution, knows of any existing similar efforts,
or has any other ideas about how to handle this. Thanks.

-Brian

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

Reply via email to