<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Eitan Suez's Home: QtRuby</title>
    <link>http://u2d.com/articles/2006/02/15/qtruby</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>QtRuby</title>
      <description>&lt;p&gt;I just read the Pragmatic Friday on QtRuby:  coding Qt client applications with Ruby.&lt;/p&gt;

&lt;p&gt;On the good side:&lt;/p&gt;

&lt;p&gt;I believe toolkits such as KDE to be much richer in terms of numbers and variety of widgets when compared to Swing.  This could save a developer a terrific amount of time.&lt;/p&gt;

&lt;p&gt;It's also terrific to see that one doesn't have to code in C++ to actually employ this library.  So, a real Kudos for QtRuby.&lt;/p&gt;

&lt;p&gt;Two observations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;the signal/slot mechanism really does not utilize the strengths of the ruby language.&lt;/p&gt;

&lt;p&gt;in rails, you can say:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;before_filter :method_name
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and in ruby in general, one can do all kinds of neat things with code blocks besides.&lt;/p&gt;

&lt;p&gt;in javascript, one connects a signal to a slot like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;button.onclick = method_name
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;then why on earth should i choose to do this instead:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;connect(button, SIGNAL("onclick()"), 
  some_other_obj_ref, SLOT("method_name()"))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;???&lt;/p&gt;

&lt;p&gt;on the other hand, i do really like the choice of metaphor
used in qt:  the metaphor of a signal.  maybe it's because
i have some kind of background in electrical engineering,
but probably not.  anyhow, i like it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;my initial feeling about qtruby is that the divide between
the c++ world of qt and the ruby language is not transparent;
one notices it.  i wonder to what extent this might be an 
issue when developing a full-fledged system.  &lt;/p&gt;

&lt;p&gt;so what i'm trying to say is that i'm not certain if 
qt and ruby are exactly a *marriage made in heaven).
i'm not sure what the "best" solution is.&lt;/p&gt;

&lt;p&gt;I qualify these comments with 'initial feelings,' and what I mean to imply is that I could [very well indeed] be completely wrong about this.&lt;/p&gt;

&lt;p&gt;full-featured, cross platform widget libraries are not
exactly a dime a dozen, i understand.  so yes, there's gtk
and there's qt, and there's swing, and there's swt.  but
one can't magically say tomorrow, there'll be a ruby-native
widget library.  i know some swing, and now just a little
tiny bit of qt.  i don't know swt or gtk/glade at the moment.&lt;/p&gt;

&lt;p&gt;so far, my scale gives more weight to java + swing over
ruby + qt, even if ruby holds a few language gems that are
absent in the java language.  it's also nice to see that
java has been narrowing the gap with its language improvements
in v5;  specifically:  annotations and enumerations.  i still
believe that java needs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;a stronger, richer, cleaner, simpler metamodel (reflection),
and&lt;/li&gt;
&lt;li&gt;facilities in its syntax for making the use of that metamodel
completely transparent, like it is in smalltalk&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
      <pubDate>Wed, 15 Feb 2006 09:57:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:7894685e6ab1e415219d593148a27c20</guid>
      <author>Eitan</author>
      <link>http://u2d.com/articles/2006/02/15/qtruby</link>
      <category>Programming</category>
    </item>
  </channel>
</rss>
