Thursday, March 8

Beans Binding

Hello folks,

as I have some spare time now (being on leave for two weeks), I would like to point your attention to the JSR-295 "Beans Binding" databinding framework for Swing, which seems to be near completion. Proper databinding support looks to me to become a big plus for rich client applications with Java.

The lead of the project has very recently been taken over by Shannon Hickey, who introduces himself in this forum post at He writes, the project would be "almost ready" for an initial public release.

But how exactly does a databinding framework ease the development of rich client applications? For one part, it hides the tedious work of creating listeners, binding them to widgets and having them update your Java beans behind a convenient automatism. This obviously makes the development more easy. For another part, the automatism allows GUI editors like Netbeans to actually support databinding visually. Roman Strobl (Roumen) has put together an excellent demonstration using Flash, which shows how Netbeans 6 might do the job. This stuff looks very neat, it is exactly what I was missing in Java Swing.

The Beans Databinding project is not the only effort to provide databinding in rich client applications. Specifically, there is
The article "Understanding JFace databinding in Eclipse" on developerworks compares both frameworks and shows how they are typically used. If I pull out my crystal ball and try to see the future, I think I will see the JSR-295 API survive the two others in the long run. How exactly will have to be seen as soon as a public release is out. After all, the JGoodies framework is (I guess) used in a number of projects already, so it won't go away too quickly. For the JFace databinding... I would hope that they review their framework design, comparing their goals with what the future Beans Databinding standard API can bring, and conclude that it is better to use the standard API (with some extensions possibly) instead of writing something else entirely. As it is new and not yet fixed, the chance is still there to switch to the standard API (if possible). (effjay)