TechHui

Hawaiʻi's Technology Community

Does anybody here have any stories from the trenches of using Groovy with Swing? (Maybe Swing isn't dead?)

I'm looking at technology stacks for cross-platform rich-client desktop applications. It seems that data binding GUI widgets is always a tedious part of the job, and I'd like to simplify it. I like the looks of the JavaFX bind operator. JavaFX seems to have some potential when it matures.

In the meantime, the latest builds of Groovy SwingBuilder also have some nice binding support that integrates pretty seamlessly into the builder paradigm. Anyone here tried that approach?

Then there is JGoodies Binding, which is a little bulkier, but looks finely crafted.

Any thoughts or advice on the relative merits of JavaFX, Groovy SwingBuilder (with binding), and JGoodies Binding with respect to rapid development of Swing GUIs with minimal effort to implement and maintain binding?

Any thought on JSR-295 in general?

Aloha,
Todd

Views: 229

Reply to This

Replies to This Discussion

I've used JGoodies binding, which works well. All of Karsten's work is very solid. I've been playing around with JavaFX, which I think has great potential, but as you suggest in your posting it isn't yet fully baked. I really like the JavaFX script syntax.

I haven't tried Groovy SwingBuilder.

JIDE released a new framework that includes databinding. I haven't used the framework, but their other Swing products are very good.
Hello Todd,

I’ve played around with Groovy’s SwingBuilder and noticed there is an example at Codehaus that ties in JGoodies (http://groovy.codehaus.org/Using+JGoodies+Animation+with+Groovy). In general, I like Groovy builders (i.e., the DSLs they support) and SwingBuilder is very nice. However, be warned that syntax errors for property names are checked at runtime. Therefore, you’ll want to do sufficient testing to make sure every execution path is checked. I have not looked at JavaFX close enough to see if it also has this problem with DSLs. I suppose the Groovy creators would call this a feature and maybe it is. However, it seems to me that it would have been nice for at least static properties of a DSL to be checked at compile time.

Groovy is a viable option right now, unless you can wait for JavaFX. If you have worked with Java extensively, you may also find Groovy easier to migrate to since JavaFX’s syntax is very different from Java.

Is JSR-295 ready yet?
Hey Todd & Larry,

Did you get the JetBrains email about JetGroovy Plugin 1.5? Its pretty impressive - definitely the best Groovy IDE support around. It has refactoring support, code hints, etc.

http://www.jetbrains.com/idea/features/groovy_grails.html?nl
No, but thanks Dan! I'll look into it!

Reply to Discussion

RSS

Sponsors

web design, web development, localization

© 2021   Created by Daniel Leuck.   Powered by

Badges  |  Report an Issue  |  Terms of Service