Eitan Suez's Home

TextMate icon

QtRuby

Posted by Eitan Wed, 15 Feb 2006 15:57:00 GMT

I just read the Pragmatic Friday on QtRuby: coding Qt client applications with Ruby.

On the good side:

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.

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.

Two observations:

  1. the signal/slot mechanism really does not utilize the strengths of the ruby language.

    in rails, you can say:

    before_filter :method_name
    

    and in ruby in general, one can do all kinds of neat things with code blocks besides.

    in javascript, one connects a signal to a slot like this:

    button.onclick = method_name
    

    then why on earth should i choose to do this instead:

    connect(button, SIGNAL("onclick()"), 
      some_other_obj_ref, SLOT("method_name()"))
    

    ???

    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.

  2. 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.

    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.

    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.

    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.

    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:

    1. a stronger, richer, cleaner, simpler metamodel (reflection), and
    2. facilities in its syntax for making the use of that metamodel completely transparent, like it is in smalltalk

Posted in  | no comments

Comments

Comments are disabled


Powered