Hello Thomas,

To be honest, I hesitated to produce the first release of gwtmodernizr
without provide a deferred binding mechanism. I'm glad that you tackle
the subject because I would like to have opinions about that.
We are ok on the fact that hard permutation must not be used in order
to avoid "permutation explosion" as you mentionned. But what is the
added value to use soft permutation (i.e. a rebind decision at
*runtime*) for a property with two possible values (i.e. supported or
not) ? Is it just in terms of cleanest code (i.e using GWT.create()/
rebind rule instead of if/else branch)?
Other thing : in gwtmodernizr, a lot of features are tested in the
same way so I delegate the test in a method of the parent object to
avoid to duplicate the code. Is it possible to do the same in
<property-provider> ? I mean, is it possible to "share" javascript
methods between different "<property-provider>" in order to avoid
duplication of code ?

Julien

On Jan 13, 4:36 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> How about using deferred binding? (you already use it but in a very limited
> way)
> in other words, splitting Modernizr's code into <property-provider>s (and
> with fixed values when possible: i.e. almost nothing is supported in
> user.agent=ie6, history.pushState is supported in user.agent=ie8, etc.),
> combined with soft-permutations to avoid "permutation explosion" (at least
> in the number of generated files; I haven't ever used soft permutations so I
> don't really know how it all works)
> This would allow users of your library to do the NativeVideoPlayerWidget
> vs. FlashVideoPlayerWidget, or NativeDateBox vs. DateBox choice using
> deferred binding rather than if/else branches.

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