Sunday, August 28, 2011

jQuery and GQuery - any bad interactions?

Hi All,

I'm still checking out ways to integrate my GWT code with JS libraries.  

I recently discovered JQM4GWT (a GWT wrapper for JQueryMobile) - which seems great but is still half baked.  I'm also a little unsure if I agree with the level of abstraction taken in JQM4GWT - I think perhaps it is wrapping too much.  

I (think) my primary needs in using a JS library (eg, JQueryMobile)  are pretty simple.  

1) I want to be able to bind events to the JS code so that event handlers are are written in GWT.  
2) I want to be able to create elements in the DOM, add JS markup (eg, "data-rel=dialog"), 
3) I want to call JS methods (eg, listview('refresh'); ) 

To achieve 1, is it reasonable to use GQuery to do the event binding - could there be any bad interactions when using jQuery as well?   I've been checking out GQuery.  It seems like a great way to do 2.  JSNI makes 3 pretty simple, albeit, with the caveat of keeping track of the elements in GWT. 

In some respects, I feel like what I am looking for is a really light-weight GWT library that makes wrapping JS libraries easy.  Pretty much something like Backbone.js but for GWT.  Any gems out there?  Should I make one?  Is this folly? 

Tom

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