Sunday, May 1, 2011

Re: Using Google Closure Library within GWT JSNI .....

I just went down this road (with success). I've been using GWT, but I really wanted to use a Closure menu button widget. So I figured out how to mix closure widgets into my GWT app, gluing them together with JSNI as you expected. I've made a blog posting sharing my experience mixing Closure with GWT.

There is some minor "impedance mismatch" between Closure and GWT. First, closure has its own home-brew event system, so you gotta setup/catch your events on the closure side before you send things back via JSNI to GWT world. Second, the "big deal" with Closure is that once you identify the closure widgets you need on a page, you can run it through the closure compiler and eliminate all unnecessary javascript code, and compile it all into a single, compact js file. Because of this it would make no sense for someone to create a GWT "wrapper" library containing all the individual closure widgets. Instead, you gotta look at each GWT page load and design for the closure widgets you'll need.

I also see no reason why there would be any performance issues.

-broc

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment