I don't think this is a case where I would think of using either
deferred binding or GIN. The API you outlined should work as is for
anyone who can write their own datasource. For users who can only
provide a URL to the data, they can use your HttpDataSource or a more
specific subclass of HttpDataSource that you provide. (However, at
that point, maybe what you really want is a pre-built application that
prompts the user for the URL to their data?)

Also, when using the API, users will be able to have multiple
instances of the widget that use different datasources in the same
application.

Deferred binding is typically used in cases where you would want to
use reflection but can't since the JRE emulation layer in JavaScript
doesn't support reflection. That doesn't seem to come into play in
this case.

It's unclear to me, though, how you want people to use your widget.
Unless you're delivering a pre-built application, I think your java
API is fine. If you are trying to deliver a pre-built application,
deferred binding isn't going to help out because you'd have to supply
your configuration parameters at compile time.

-Brian

On Mon, Feb 21, 2011 at 5:17 PM, Uemit <uemit.se...@gmail.com> wrote:
> Sorry for the thread bump:
> So I was thinking a little bit more about this problem.
> Both GIN and deferred binding respectively allow for customization of the
> widget's datasource during compile time.
> With gin I have a litte bit more flexibility (creating factory, singleton,
> etc)? For my personal taste the nicer/cleaner approach seems to be to use
> deferred binding to configure it.
>
> Is it actually possible to allow both? Configuration by either deferred
> binding or gin?
> And I still don't know how to solve the problem wiith the non-default
> constructor with either gin or deferred binding. In case of gin I might use
> a Factory but I am not sure if there is not a better approach.
> thanks in advance
> Uemit
>
> --
> 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-toolkit@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.
>

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

Reply via email to