gutopia-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rgui-dev] Clairvoyance


From: Leon Torres
Subject: Re: [rgui-dev] Clairvoyance
Date: Wed, 28 Aug 2002 17:08:57 -0700 (PDT)

On Wed, 28 Aug 2002, Massimiliano Mirra wrote:

> I do feel the need for a glimpse of the future, though.

Definitely. While we should be building something now, we should aim for
the future.

I guess I've hinted what my vision was, it's worth repeating. The future
is a gui tk written in pure-Ruby. Ruby-Wise is probably the forefather of
this approach. We should be leveraging the power of Ruby to build us a
nice, new API which is an adherent of the Ruby way from day 1. To get
there, lots of work needs to be done. However, we can be there _today_
with gutopia. Gutopia will provide the first implementation of that
magical API, but its guts are not pure Ruby. Instead, it relies on already
established gui tks, usually written in C/C++, to do the driving. In time,
as this new Ruby-only tk matures, gutopia should be slowly retired in its
favor. It is *very* important that gutopia does not lock itself into any
particular alien gui tk model, especially those written in C/C++. In the
end, the pure-Ruby approach should be an innovative thing, not a copycat.

> Will you write `class Model' instead, and then
> GUtopIa::AutoMagic.create_gui(model)?

We will be using the native Ruby widgets. It will be effortless:

# require 'gutopia'; include GUtopIa  # out with the old, in with the new
require 'rubytk'; include Rtk
b = Button.new(:label => "Tickle Me!") # attaches to root window
def b.on_press(*data)
  label = (label == "Tickle Me!" ? "That tickles!" : "Tickle Me!")
end
App.new.run

If Joe User makes a nice combo-widget, we can add it to the cvs right
away. No C worries, no cross-platform issues, no headaches. This, my
friends, is heaven.

> Will you open application-gui.gtp and write some markup language?

Built-in hooks to use markup would also be nice. The external xml or yaml
definition can take advantage of it.

b.label = "<font color='#AA0000'>Red text</color>"
or
<button><label><font color='#AA0000'>Red text</color></label></button>

or layout/decorate xml

<decorate target="mybutton"> <!-- or something less verbose -->
  <label><font color='#AA0000'>Red text</color></label>
</decorate>

> Will you think in terms of TreeView, ListView, CheckButton, i.e. in
> terms of appearance?  Or will you think in term of tree, array,
> boolean, i.e. in terms of meaning, and let some kind of style sheet do
> the layout for you?

Definitley try to use the MVC approach for layout and themes. Kind of how
XSL transforms XML via XSLT. Swap the XSL, get a different layout and
theme. I'm no expert at this approach, so others might have better ideas
or pointed objections.

> What kind of application will you actually be writing, and what kind
> of application will you *not* consider writing, given what you will
> have?

I won't be writing MS Office, that's for sure. Most programmers are hired
to do in-house coding. They need an uber-efficient gui tk to really get
their tasks flying. Optimal speed is not usually an issue.

Cheerio,
- Leon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]