Hacker News new | past | comments | ask | show | jobs | submit login
Why should JS coders have all the fun? (squery.posterous.com)
31 points by shahriarhaque on July 25, 2010 | hide | past | favorite | 9 comments



I haven't seen anybody write new Swing GUIs like he did in quite some time. First of all, you don't have to declare the listeners on the form class, and you typically would create an anonymous that listens to each component.

Second, there is a library called swixml (http://www.swixml.org/) which allows you to write the GUI part of the code in a declarative manner and have the library wire the two things together.

Both makes it much less of a pita to write GUIs in Java.


Agreed. I did quite a bit of Swing development a few years ago.

There is also Griffon (http://griffon.codehaus.org/) that is a MVC (Rails like) framework for Swing apps that uses Groovy. I haven't used it, but from what I have seen, it does make it easier to work with Swing.

I had not heard of swixml. Thanks for the pointer.


Even in java ecosystem, there are several tools that make gui desing easier: Swing builder in groovy (http://groovy.codehaus.org/Swing+Builder), Scala Swing Dsl (http://stackoverflow.com/questions/1570175/scala-and-swing-g...), Cheri for jruby (http://objectmix.com/ruby/251973-cheri-builder-style-jruby-s...), and the list goes on.

But it's good to see the effort on Java as well, which can do DSLs as well, even those these are easier on languages that actively support them, such as scala, groovy, ruby, clojure, ...


I seriously do not understand why people don't just use the free GUI builder that comes with Netbeans, then wire up the resulting classes.

And wiring them up doesn't get any easier than using JRuby with Monkeybars (http://monkeybars.org). Yes, I'm biased, I'm the project leader. But still. :)

DSLs and such are nice for smallish UIs, but once you get to anything remotely sophisticated tweaking text files to sort out alignment, flow, balance, etc. is crazy. (And double crazy if those text files are XML.)


Great link. I knew monkeybars once, but totally forgo about it. It seems complement swing with what glade does to gtk (and its code generators do, from taking xml and turning into python/ruby/perl,etc files).


As a Java-for-pay programmer, I'm not extremely experienced in the Java ecosystem; why use Swing to make a GUI instead of using HTML?


Swing for desktop apps, HTML for webapps, I guess.


I yearn for the day when we laugh at that mindset.


Ugh, casting.

Is the use of generics in Java still not common?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: