The Artima Developer Community
Sponsored Link

Java Community News
Shannon Hickey Updates Beans Binding Reference Implementation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Shannon Hickey Updates Beans Binding Reference Implementation Posted: Oct 22, 2007 8:02 AM
Reply to this message Reply
Beans Binding (JSR 295) aims to define a common framework for connecting properties of different beans for notification, especially in the context of data binding in Swing UIs. Spec lead Shannon Hickey recently updated the reference implementation with notable performance improvements and support for binding a JSpinner's value property.

Data binding—the ability for a UI component to notify business objects of changes initiated by users, and vice versa—is among the more common UI development chores. The Beans Binding API (JSR 295), aims to provide a unified mechanism for that task in Swing.

The JSR 295 reference implementation is being developed as part of the Beans Binding project. Spec lead Shannon Hickey recently updated the reference implementation. Among key new features are dramatic performance improvements, support for binding to a Spinner's value property, and bug fixes. An overview of the latest changes are available from Hickey's blog post, Beans Binding 1.1.1 Beats 1.0's Butt, Bigtime:

Extreme performance gains in this release are the result of a fix made to the BeanProperty and ELProperty classes. As these classes are central to Beans Binding, most things now perform many orders of magnitude faster...

Once a listener is installed on the property, values along the paths are cached, and only updated in response to property change notifications. Knowing that developers are likely to encounter beans that don't fire the correct notifications, and that resulting problems may pose tricky to debug, I began work on allowing developers to turn on a debug option that would have BeanProperty and ELProperty log a message when they detect such a change without notification. They would do this by re-evaluating the entire path on every method call and comparing each object to what they have in their cache. This would, of course, remove any performance gains accomplished by the caching; but only when the debug option is on...

While the toggle for this debug option hasn't yet been added, it turns out that in 1.0 the logic itself was left turned on, only without the messaging—a code path that served only to remove all caching benefits. In 1.1.1 this code path has been turned off pending completion of the debugging feature.

What do you think of the JSR 295, Beans Binding, API?

Topic: Enunciate 1.5 Released Previous Topic   Next Topic Topic: Are BPM Tools Useful to Developers?

Sponsored Links


Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use