Ruby-GNOME2 and Glade2 Demo #
Here is a ten-minute flash movie made by Mutoh-san to demonstrate implementation of Web browser using Ruby-GNOME2 and Glade2. Glade is a user interface builder for GTK+ and GNOME and generates an XML configuration file which can be converted to Ruby script by libglade.
What is your favorite GUI tool kit for Ruby on Linux (I am investigating)?
mico
Yup, saw that a couple of days ago. It’s very impressive. I don’t code GUI apps, so I don’t have a suggestion.
Danno
Is it okay to be shocked that a web browser can be implemented in 10 minutes?
I mean, I know he didn’t do the rendering engine for the pages or anything (or DID he?, I didn’t finish watching yet), but still, it’s pretty impressive.
Danno
Okay, no rendering engine (that would be impressive in 10 minutes, VERY impressive, impossible, I think though, in 10 minutes, maybe an hour).
Still, I like what I see, and, if I may predict where you’re going with this: MouseHole Browser?
osoh
Yes, quite impressive!
At this time, we’re using QtRuby. But whenever I can, I’d like to try Korundum with KDE goodies.
Both of them are available at Rubyforge.
See ya!
Vagabond
I’m quite partial to the GTK toolkit, it even has gasp decent API documentation which at times borders on the excellent. Glade also takes the sting out of most of the UI design stuff.
I’d try the QT bindings, but I purged QT from my system 6 months ago and haven’t found a reason to reinstall it. Also, I’m not sure I want to be forced to licence my programs under the GPL (even tho I generally do…)
Now, if we just had a good console UI toolkit thingy I’d be happy…
Vag
zem
I like gtk. The API feels nice, though it’s not very extensible if you want to step outside the box.
zem
Extensible from the ruby side, I meant – I daresay it’s easy enough to extend in C
daigo
I did not know Glade and vnc2swf. They are great. I wondered which (Qt or Gtk) is mature for Ruby.
kode
I haven’t tried any yet, but I feel like foxrb is nice enough for me to try out first.
kode
or whatever it is called, fxRuby? fox gtk, in any case.
porges
I’m not sure what you’re trying to say here: “Glade is a user interface builder for GTK + and GNOME and generates an XML configuration file which can be converted to Ruby script by libglade.”
But it sounds wrong ;)
Vagabond
Yeah, its wrong, the XML generated by Glade can be loaded into any application that has libglade bindings or libraries. It doesn’t generate any actual application code (well glade can generate C/C++ code but its depreciated and will be removed in glade 3 I think). Basicially you load the xml into your app, then you gain access to all the widgets defined in it.
I mainly like it because it allows me to skip defining every last widget in ruby, and its easier to change (most of the time) then hardcoded widgets.
Vag
binbunban
I hope the focus of Ruby’s fan will move from macosx/fox-libs to gnome/gtk. gtk are: lgpl, multiplatform (nix,win,mac) and gnome is becaming better and better. There are already mature apps like Alexandria.
Tsela
Porges, Vagabond: you’re both right, of course. However, what _why meant is that you can generate Ruby code from the Glade XML file. The Ruby-GNOME2 bindings come with a tool for just that: create the application skeleton that loads the XML file and prepares the callback methods.
riffraff
I prefer Gtk since they seem to have a better api and because my desktop of choice is gnome. Btw, notice that you can create glade files even from other applications i.e. this gui builder written in python seem nice
matt
I just started a project using Ruby-GTK, GNOME Web Studio. I was initially going to write it in C, but I’ve been able to get really far in only a few hours with Ruby. I’m looking forward to this toolkit maturing and being a standard install on all major distributions like PyGTK is today.
Trejkaz
QtRuby is rather nice, the only real flaw I can pick with it is that it’s basically a Ruby wrapper around a C wrapper around a mostly-C++ API . :-)
Vagabond
Tsela: Ah, I was not aware that there was a glade code generator for Ruby. I think I prefer keeping it seperate anyway though, its easier to modify IMO .
Vag
MenTaLguY
I’m partial to GTK + as well. Can’t abide Glade though.
If you use it for code-generation, you lose the advantages of easy modification, as Vagabond points out.
If you don’t (i.e. libglade), you have to code around it and lose the opportunity to refactor your UI code. Gets all flat and mushy.
Tsela
Vagabond: AFAIK , the code generator doesn’t translate the Glade XML file into Ruby. It just creates a Ruby file which loads the XML file and contains empty declarations for the call-back methods. So you still have full separation of interface and implementation. It just saves you the tedious job of writing the boiler-plate code yourself.
Aj
I’m partial to wxRuby. The wx library is stable and friendly. Partnered with ruby, its almost too good. It’s also x-platform and uses native widgets.
phil602
All about the Glade and GTK lovin’. The Ruby-Gnome2 team has pulled some really sweet moves that I can appreciate. Not only are they bindings to GTK , but they just feel…. rubyish.
Developer108
I’d vote for wxRuby. :)
Developer108
I’d vote for wxRuby. :)
Kathy
wxRuby is fantastic! Give it a try! Only problem is getting it to install on Mac OS X (Tiger) with darwinports.
Comments are closed for this entry.