Posted by joconner
on March 23, 2008 at 10:53 AM PDT
I am enthusiastic about Beans Binding, but a coworker threw a wet towel on me.
I recently wrote a brief introduction to Beans Binding called Synchronizing Properties with Beans Binding . I was enthusiastic about Beans Binding, and then a coworker threw a wet towel on me. The conversation went something like this:
John: I just finished an article on java.net. This API might be useful in this project.
Coworker: Yeah, what's that?
John: Beans Binding. It's an API that will help us bind beans together, synchronizing properties.
Coworker: What do you mean?
John: You know...say you want to update a table with new data anytime a result set changes, or maybe you want a price field to display the current total of all purchased items in a shopping cart. You can use beans binding to synchronize the properties without having to write all the plumbing and event handling yourself.
Coworker: Hmm. Java hasn't always had that?
John: Well, yes. Java has always allowed you to synchronize properties, but we've never had an API to make it this easy.
Coworker: Really? We've had this in Flash and Flex forever.
John: You've had binding?
Coworker: Binding, or Beans Binding...whatever you call it. We can bind a variable or property to another variable or property so the updates trickle throughout the application. It's a great feature, a must-have, and I couldn't do without it. I use
[Bindable] among other things.
John: Yes, it's great. I agree. So take a look at that article . Beans Binding, it's pretty cool.
Coworker: You're just getting binding in the Java language? Hmm... really? I just assumed Java would have had that all along.
John: Um, it's not exactly part of the language. It's a new API. Making changes to the language is difficult and usually takes a long time...
Coworker: Oh, I misunderstood. It's not part of the language? Just a separate API? Got it. Hmm...ok. Well, uh, gotta run.
John: Hey, wait. But Java FX Script has a
bind keyword that is part of the language. Remember? I told you about Java FX Script earlier.
Coworker: Right. Java FX Script. It's about time Java got got a bind operator or keyword, something.
John: No, not Java. Java FX Script. That's the new language for rich client app development. Java FX Script has the
bind operator. Java has the Beans Binding API.
Coworker: OK, right...well...hey...I have to get back to work on this Flex app. But I agree, binding is great, couldn't do without it, use it all the time.