On 08/29/2009 06:02 AM, Christian Goudreau wrote: > Huh, I have done this with a command pattern style... > > bind(ServiceCached. > > *class*).in(Singleton.*class*); > As simple as that ! I use XML between client and server. Action class > know what is the url to use and when a response is received, I have a > class that transform my XML in object. > > Works fine, I have to rework the cache a little because for now I use a > static array. > > Here's some meat : > > http://pastie.org/598748 > > I have to change my XMLObjectBuilder for a static one, since I don't > really need to have more than one instance of it. If I had passed more > than one object In my xml file, I simple have to call the same class, > with a diffrent object, to build the object. > > Hope you'll find that interresting > > Christian
Thanks, but after staring at this post & the pastie code, the end result looks like it's "six of one, half dozen of another." The pastie code demonstrates a unique class per object; which is fundamentally the same as my first solution. Also, there is no demonstrated linkage between the gin binding (ServiceCached) and the pastie code; which linkage would be interesting to see, but I'm guessing will also map one-to-one rather than one-to-many. I really don't see any way to get around the one-to-one mapping requirement given that RequestBuilder is implemented as a class, not an interface. As always, I'm willing to be proven wrong. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
