Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MacRuby+IronRuby or JRuby for Desktop Applications? [closed]

For Web Applications I use Ruby on Rails. And now it's time to see if I can code Desktop Applications with Ruby.

So I wonder which one I should choose.

The way I see it is MacRuby+IronRuby vs JRuby.

The former lets me have desktop applications for both Mac and Windows while the latter lets be have in both, but only learning one tool.

  • Is there strong arguments to use the former than the latter?

  • Will JRuby Desktop Applications be as native (or near-enough-native) as MacRuby+IronRuby Desktop Applications?

  • What are the pros and cons for each solution?

Im very new too Desktop development. Share your thoughts and experience!

like image 325
never_had_a_name Avatar asked Oct 15 '22 01:10

never_had_a_name


2 Answers

MacRuby uses the native Apple Objective C stack.
Pros: Its class library is basically a wrapper for the Objective C GUI classes. You get fast native applications.
Cons: Only runs on Macs. They are not portable to the iPad or iPhone either (none of the Ruby solutions are).

IronRuby uses the native Windows .NET framework.
Pros: Use native WinForms to create rich native applications. It has access to the full .NET ecosystem of libraries.
Cons: Only runs on Windows.

JRuby uses the Java abstraction layer (JVM).
Pros: Multiple GUI libraries available. The most common ones are SWT and Swing. SWT uses native widgets and is faster and more native like. Swing is purely Java (emulated widgets) and is more portable. There are further libraries abstracting SWT and Swing to make them more Ruby friendly. Look at Profligacy for Swing for instance.
Cons: A layer above a layer above a layer. Swing and SWT are very mature but the Ruby layers above them are less so.

There is also another option
Ruby with the Qt library.
Qt is cross platform, uses native widgets and is written in C++. It is fairly fast but the library is complex and big.

My rule of thumb is the more complex your GUI is, the closer you should be to the native platform. You need to also evaluate the learning curve for each of these graphical libraries and the effort needed to port between platforms.

like image 50
Bernard Avatar answered Nov 09 '22 13:11

Bernard


IronRuby just lots its main developer, so you may want to consider that one carefully. https://en.wikibooks.org/wiki/Ruby_Programming/GUI_Toolkit_Modules might help

like image 25
rogerdpack Avatar answered Nov 09 '22 12:11

rogerdpack