Hi Christian:

Thanks for the meat!

I hope you have time for a few questions...

So ServiceCached is:

Public interface ServiceCached  {
public class GetProductsName implements Action;
public abstract class GotProductsName implements RequestCallback;
}

Action: from gwt-dispatch? How do you get past the "extends
serializable" part of its definition? Serializable seems to bring in
all kinds of Java RPC baggage; which definitions cause problems at
link time. I notice that here it's not bound to a generic type.

Why is GotProductsName an abstract class?

I'm assuming that the injection is something like:

@Inject
Fred (ServiceCached serviceCached) {
this.serviceCached = serviceCached;
}

So how does that get us to GetProductsName?

Looking forward to your responses!



On Sat, Aug 29, 2009 at 6:02 AM, Christian
Goudreau<[email protected]> 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
>
> On Sat, Aug 29, 2009 at 4:36 AM, Jeff Chimene <[email protected]> wrote:
>>
>> It looks like that's the only way.
>>
>> One wrinkle that was not mentioned in the original post is that the
>> URL argument to a RequestBuilder instantiation is RESTful with
>> volatile path components. IOW, instance bindings will not solve this
>> problem.
>>
>> I'm using binding annotations:
>>
>>  bind(RequestBuilder.class).annotatedWith(XXX.class).toProvider(XXXRequesterAsync.class);
>>
>> bind(RequestBuilder.class).annotatedWith(YYY.class).toProvider(YYYRequesterAsync.class);
>>
>> I'm using the provider binding because I want only one instance of
>> each implementing class.
>>
>> The XXXRequesterClass knows what CGI method and URL to use when
>> instantiating a RequestBuilder object. The volatile URL path
>> components are concatenated at runtime.
>>
>> Each annotation class (XXX.class, YYY.class) is an interface.
>>
>> Discuss amongst yourselves.
>>
>> On Fri, Aug 28, 2009 at 6:02 PM, Jeff Chimene<[email protected]> wrote:
>> > On 08/28/2009 05:53 PM, Jeff Chimene wrote:
>> >> Hi,
>> >>
>> >> I'm not enough of a Java pundit to understand how to implement a
>> >> RequestBuilder using Gin.
>> >>
>> >> The issue is that one cannot instantiate a RequestBuilder class w/o a
>> >> HTTP method and a URL.
>> >>
>> >> How does one pass these parameters in such a situation?
>> >
>> > I thought about using BindingAnnotations. I'm hoping there is Another
>> > Way.
>> >
>> >>
>

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