Musings on an Erlang GUI System.

Chris Pressey cpressey@REDACTED
Sat Feb 15 01:05:20 CET 2003


On Fri, 14 Feb 2003 21:58:33 +0100 (CET)
Joe Armstrong <joe@REDACTED> wrote:

> 
> I have been thinking about GUIs for a long time :-)
> [...]
> IHMO all this swing/motiv/you name stuff it is all *wrong*
> 
> I think the only decent way to define a GUI is to *draw* it in a page
> description language - this is *extremely* declarative and very easy
> to understand.
> 
> What I'd like to see is *one* page description language that can be
> used for making GUIs AND pages of printed text.

I think the only decent way to define a UI is to *not* define a UI.

The UI should follow naturally from richly-defined data types.

Don't do *anything*, just define your data right, and let the data define
the UI.

For this you need a smart UI engine that can examine your data and show a
form appropriate to what you want to do it.

If the data has constraints on it, implement those same constraints in the
UI.  If the data has actions associated with it, let those actions be
taken from the UI with buttons or whatnot.

But even a crude example of this can be seen in BASIC.  INPUT A asks the
user for an integer, and INPUT A$ asks for a string; so why not INPUT A()
to ask for a whole array?  Why not extend it to entire structures?

The big win is that, ideally, coding up a UI becomes virtually a non-issue
to the programmer, who can spend more time getting the data definition
right, which is probably what s/he should be doing.

While this appears at first to clash with Joe's desire to define
everything precisely, I don't think it is - it's really on two different
levels.  If the programmer is "hands off" the UI, that job falls entirely
into the UI designers' lap, where they should be able to have to freedom
to interact with the form and present it exactly how they think it should
be layed out on the medium.

As soon as I have some example code that isn't wholly embryonic, I'll post
a link to help illustrate.

-Chris



More information about the erlang-questions mailing list