logo       

Re: [jruby-user] Newbie questions: JRuby desktop application: msg#00238

lang.jruby.user

Subject: Re: [jruby-user] Newbie questions: JRuby desktop application


Another question: When looking at pure Swing code in Ruby, it doesn't
look that...Rubyish (to say the least). So I guess all Ruby Swing
developers are running some kind of framework around Swing? Which is the
best or most used framework around? I've found Profligacy, which look
great - are there any more?

I'm not going to start the age-old argument of "which framework is the best," but I can offer an opinion as someone who's used a handful of different methods for wrangling Swing on my current JRuby project.

First up is the XMLBuilder-esque Cheri::Swing.  I find that its lightweight nesting syntax makes it great for complex nested JPanel layouts or simple collections of components that can be placed using Box panels.  Its lack of more recent LayoutManager support beyond the basics makes it difficult to use for layouts that are typically a challenge in Swing.  The disappointing thing about Cheri is that it seems to not be in development any longer.  There has been no source release since 0.0.7, which contains a bug that breaks the example of using Builder::Builder from the project's homepage.

Enter Profligacy.  Profiligacy has a markup language called LEL that is great for doing the things that GroupLayout can do.  It's cumbersome for doing nested panels though, due to having more stuff around the basic definition block (like the layout string parameter and the need to call build afterwards).

We have also used the GUI designer in NetBeans to make absolute-positioned layouts that we hand-converted to Ruby.  We've even done quite a few layouts by hand using the regular "Java-like" syntax you describe above.  Neither of the above two frameworks can cover every case; Swing and its layouts can be difficult and inconsistent.  I think we are just starting to see the beginning of what Ruby can do for Swing, so stay tuned and I bet things will get exciting...

--
Karlin Fox | Developer
Atomic Object | http://atomicobject.com
[Ph] +1 616 776 6020 [Fx] +1 616 776 6015
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise