Best data binding solution for GWT

北城以北 提交于 2019-12-29 11:36:32

问题


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


回答1:


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.




回答2:


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




回答3:


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




回答4:


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 )




回答5:


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




回答6:


i have just read it a few minutes ago in a mailing list that a so called GWTEventService 1.0 has been released. I am not completely sure, if that is what you want, but it sounds promising for me.

Let me cite the site:

GWTEventService is an event-based client-server communication framework. It uses GWT-RPC and the Comet / server-push technique. The client side offers a high-level API with opportunities to register listeners to the server like to a GUI component. Events can be added to a context/domain on the server side and the listeners on the client side get informed about the incoming events. The server side is completely independent of the client implementation and is highly configurable. Domains can be defined to decide which events are important for the different contexts.

Maybe this is a solution for you. I will give it a try.




回答7:


Gilead, formerly Hibernate4GWT, "defines a PersistentRemoteService class, inheriting from RemoteServiceServlet to handle seamlessly persistent entity management." It's been under active development for several years now.




回答8:


check out the eclipse databinding 3.5 for gwt




回答9:


use google-web-toolkit-incubator http://code.google.com/p/google-web-toolkit-incubator/wiki/Downloads?tm=2 for databinding. uface doesnt have a compiled version out, and their source code DOESNT compile following their directions. (entry right above this one is referring to uface).




回答10:


Check out the gwtXP at http://www.gdevelop.com/w/gwtxp/.

gwtXP allows you to declare UI elements, data binding and action handlers in XML. Examples:

  • Declare UI elements: <g:label text="User Name: "/>
  • Declare data binding (uses Eclipse data binding): <g:textBox text="${user.userName}"/>
  • Support both value binding and list binding.
  • Declare action handlers: <g:button text="Save" onClick="#{saveUser}"/>

Updated on March 06 20010: See the post at http://www.gdevelop.com/w/blog/2010/03/06/data-binding-in-gwt/



来源:https://stackoverflow.com/questions/396786/best-data-binding-solution-for-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!