Your on the right track, but if the base interface is used ( in the
signature ) of any RPC method, GWT *has to* generate serializers/
deserializers for every concrete implementor class of that interface.

So, how to work around that...

IF/F the entire app was was coded to the Domain Interfaces, but the
DTO's were the generic Map types outlined above, you could use GWT
generators to bridge the gap.


On Jul 6, 2:20 am, "brett.wooldridge" <[email protected]>
wrote:
> Are these classes truly sub-classes, or are you using MyObject as a
> generic "Object" (in the Java Object class sense) that is
> serializable?
> Meaning, does MyObject have a bunch of state that is also shared by
> MyObject1..50?  Or is MyObject pretty much empty with all of the
> state in the individual sub-classes?
>
> If that is the case, what is the purpose?  So you can pass MyObject1..
> MyObject50 type objects through the same RPC method?
>
> I'm asking because it's hard to imagine (in Object Oriented terms) a
> reasonable scenario in which there is a base class with truly shared
> state across 50 subclasses.  Sure, such cases exist (witness Java
> Object or a UIObject type class), but they are relatively rare in
> typical
> domain modeling.
>
> It seems a mistake to have something like:
>
> class MyObject {
>    protected int id;
>
> }
>
> class MyObject1 extends MyObject {
>    // more state
>
> }
>
> yada yada...
>
> class MyObject50 extends MyObject {
>    // more state
>
> }
>
> If you can provide some context around your modeling domain,
> it will be easier to answer your question.  But on the surface, it
> sounds like you need to rethink your object model.
>
> If MyObject is empty or fairly empty of state, you might dodge the
> bullet (without solving the modeling issue) by making it an interface.
> By doing so you can still have one RPC method that takes the
> MyObject interface without having truly polymorphic subclasses.
>
> -Brett
>
> On Jul 4, 11:46 am, Joshb <[email protected]> wrote:
>
>
>
> > We are currently working on a very complex project that has:
>
> > * A very large set of Data Objects which all extend from a Single
> > Super Class ( eg. MyObject, MyObject1 extends MyObject, MyObject2
> > extends MyObject ... MyObject50 extends MyObject)
> > * each of these objects have 10-30 properties, often consisting of my
> > varients of MyObjects
>
> > As a result, when I try and bind a RPC service ( GWT.create
> > ( MyObjectService.class ); ), it is taking 10+ seconds to bind.
> > Running in debug hosted mode using -extra indicates that, in fact, the
> > log output of the RPC binding is over 17,000 LINES!!!!
>
> > I have broken up my application into several separate GWT modules, and
> > roughly each one has its own RPC service.  Each time it is called and
> > bound using deferred binding, there is this 10+ second delay.  This is
> > obviously slowing down development/testing, and probably doing a lot
> > of other bad things at the same time.  I'm sure there must be a better
> > way.
>
> > I am very curious (anxious) to know others thoughts on how to avoid
> > this situation when dealing with large, intertwined models.
--~--~---------~--~----~------------~-------~--~----~
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