Monday, May 18, 2015

DataBinding library for Java and GWT

Hi all,

I would like to introduce a new project i just released. It is a non-intrusive library doing data binding for Java and GWT (it might probably also work with Android and J2Objc but i did not test it in those environments yet).

It uses deferred binding to declare classes which need instrumentation on GWT. And it uses Java reflection when run in a standard JVM.

There is also an annotation processor to generate observable classes out of normal Java POJOs (although integrating your POJOs with the binding system only involves adding a call to the Property.notify(...) method in your setters).

I think some interresting points about the library are :

 - it supports path to properties. One can specify the binding source or destination starting from an object and walking a path. For example you can specify bind( person, "employer.address.city" ) and the data binding library will walk the objects to find the target value (it will also subscribe on each walked property to detect changes).
 - it has a debug / log feature where you can inspect what happens inside a binding. This is cool when things go wrong and allow to detect problems really easily
 - it has virtual properties, which allow to enhance existing classes without touching them. For example one can easily attach a "selected" property to an ArrayList instance to manage the currently selected item directly on the list.
 - it has a statistics method which allow to check that your application does not leak resources
 - it does not bind you to Editor framework or anything else
 - it has been carefully optimized so that it does not add a significant overhead.
 - it can work with JavaScriptObject, allowing for example to bind a text value .to( widget, "element.style.backgroundColor" );
 - it is already used in production applications, so it's ready for you to use. That's why i am releasing it...
 - it is available on maven central, so easy to try out !
 - it has a method to dynamically detect similar objects fields between two objects and bind them automatically (it is very useful to auto bind a POJO to a view in one line of code, your view does not even have to know about the POJO class - it just needs to have the same field names, hence increasing the potential reuse of each view !).
 - there are samples applications code available and a quick start user guide on the github page.
 - there are other points but i think those ones are the most important

I'd like to ask you if you please have remarks or so. If you try it, please feel free to post comments or pull requests.

Here is the link :

Thanks !

Arnaud Tournier

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment