This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: Swing Binding and Validation
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
I am one of those developers with a focus on web development aka J2EE stuff, but moved to Swing development recently for some projects. First of all, its much harder to seperate concerns in Swing, in web environments you have 31 frameworks for role seperation and most of them are quite easy to use. With Swing the choice is not as big.
I used JGoodies and its Forms and Looks API in the past and used a lot of components from the UIF framework. All this resulted in very neat user interfaces and good layouts, but my seperation was still in a poor state. So i started into the missing 2 APIs from JGoodies, which are in fact the ones where most of Karstens current efforts goes into: Validation and Binding. I have not covered it all yet, but all i can say about these two is that when applied correctly, your resulting application is maintainable and cleanly designed.
All of you working with Swing know how hard it is to seperate GUI presentation from Domain Models. Normally, these two are happily mixed in most Swing Applications. No more when using JGoodies Binding. You will need some time to learn this stuff, but it pays of.
Some presentations from Karsten about "binding" and "validation":