Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best data binding solution for GWT

Have you ever used one of the many half-baked data binding solutions for GWT? If so, how well did it work?

I'd like to stop rolling my own bindings for GWT but there's no clear winner in the data binding space.

I'd prefer to use something with a future e.g. GWT Incubator but there's nothing there yet.

I use GWTDesigner and love it but it doesn't seem to have a solution for this either.

Its a pretty fundamental missing feature. Do you know if the GWT team plans to add support for this? In that case, maybe I'll wait.

Thanks

like image 387
Steve Buikhuizen Avatar asked Dec 28 '08 22:12

Steve Buikhuizen


5 Answers

In case of any doubt about this nowadays, you should use GWT Editors:

http://www.gwtproject.org/doc/latest/DevGuideUiEditors.html

At some point in the future there will be support for jsr 303 validation too.

like image 105
Jon Vaughan Avatar answered Nov 16 '22 22:11

Jon Vaughan


You can check out http://code.google.com/p/gwt-pectin/

like image 4
Andrew Avatar answered Nov 16 '22 22:11

Andrew


SmartGWT ( http://www.jroller.com/sjivan/entry/smartgwt_1_0_released ) is a GWT API for the product smartclient. They have a good databinding solution, because it was built with server side integration in mind. But the downside is that it's not a pure native GWT framework. It's a JSNI wrapper around another product (Smart Client Framework).

like image 2
Edwin Avatar answered Nov 16 '22 22:11

Edwin


if its data binding of the UI to models (i.e. a textbox bound to a property of some model object), then GWT has a library feature called the UIBinder. Its not quite ready for production use yet apparently (thus unreleased), but the google wave team is using it (and looks like its working pretty good). Checkout this page for some info http://code.google.com/p/google-web-toolkit-incubator/wiki/UiBinder

If you are talking about GWT RPC returning model objects from the server (such as hibernate objects), Gilead as mentioned elsewhere is probably worth looking at - though i've never had any personal experience.

There is another method, and that is using Javascript Object Overlays to turn json into their equivalent class models for use in GWT (good for frameworks like grails that can churn out json easily, but their domain model is not RPC compatible). check out these blog posts for some tips on that http://raibledesigns.com/rd/entry/json_parsing_with_javascript_overlay (and http://googlewebtoolkit.blogspot.com/2008/08/getting-to-really-know-gwt-part-2.html )

like image 1
Chii Avatar answered Nov 16 '22 20:11

Chii


I suggest you try HexaBinding, which is non invasive and only focused on dara binding. Here is the link : https://github.com/ltearno/hexa.tools/blob/master/hexa.binding/README.md

like image 1
Arnaud Tournier Avatar answered Nov 16 '22 20:11

Arnaud Tournier