Daniel Carrera
10/29/2003 9:14:00 AM
On Wed, Oct 29, 2003 at 05:56:24PM +0900, Pablo Lorenzzoni wrote:
> | I was just wondering what it would take to be able to use Ruby for the
> | programming logic.
[snip]
> (2) Or we want to use XUL's scheme in our Ruby programs - which can be
> more interesting... writing our GUIs using XML is, surely, much easier
> than the traditional method. The problem is that Ruby doesn't have a
> "standard" Graphical Toolkit... So, "our XUL" either have to be bound to
> some existing Toolkit and act as "yet another layer" for the GUI
> programming, or (which I think is more interesting) act as an agnostic
> layer, working with just any Toolkit.
That's a very interesting idea. I hadn't thought of that. I could write
a GUI program with Ruby and (let's call it) RubyXUL. I can run it with
one toolkit and you can run it with another (because they both have a
wrapper for RubyXUL).
That would be a neat way to meet differences in platforms and personal
taste. I don't have to worry about the fact that my GtkRuby application
won't run under Mac. Or that Fox doesn't look good under KDE.
Also, we don't have to exactly copy Mozilla's XUL. If there's any place
where we feel that the Mozilla team went wrong, we can change it in ours.
Okay, XUL is XML. Ruby comes with an XML parser, so that's not a
problem.
> If we could imagine an "agnostic" Glade that outputs XML in the XUL
> format, and make it work with any toolkit Ruby support... that sounds
> as a good idea.
Indeed.
So I guess that for each toolkit we'd need a library that can interpret
read XUL and produce the GUI.
There can be an environment variable which specifies which toolkit the
user wants.
I had never thought of designing toolkit-agnostic GUIs. That's a very
neat idea.
Cheers,
--
Daniel Carrera | OpenPGP KeyID: 9AF77A88
PhD grad student. |
Mathematics Dept. | "To understand recursion, you must first
UMD, College Park | understand recursion".