Ruby widget toolkits testing

October 16, 2007

A friend of mine gave me a netgear wifi router and I decided that would be fun to have a systray applet to check for connected stations. The basic parsing was easy, but then came the GUI part. The first idea was do it in a multi plataform fashion, and later on I just decided to do it with the most important toolkits (in general) that I found bindings for: GTK and WxWidgets.

Alto I dig WxWidgets, I found the GTK binding more mature and (I never thought I would say that) easier to use. I I really think GTK is counterproductive when programming in C (or worse, C++) for Linux, but thankfully GUI programming is not my daily job.

So that’s my first GUI app in Ruby. I kinda tried to follow code guidelines for each toolkit (when I could found them) and keep the same overall structure (separated dialogs, timer control for scraping the router’s info, etc).

If I had to do another GUI app in Ruby (which I’m planning, a SciTE project manager), I would use GTK and chill out about the multi-plataform-OS stuff. Usually these kind of scripts tend to be used only by who programmed them and as example to other programmers rather than morph into a full fledged project.

WxWidget version

GTK Version

Advertisements
%d bloggers like this: