Musings on an Erlang GUI System.

Marc Ernst Eddy van Woerkom Marc.Vanwoerkom@REDACTED
Sun Feb 16 21:47:51 CET 2003

>   Just take a look at the screen shots at
>   This stuff is drop-dead-beautiful. (warning it's very alpha - stuff
>   written in objective C etc.) - with a bit of help
>   we did manage to get it running :-) 

>   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.

Older GUIs were *drawn* by which I mean that rather low level
graphic operations were used by their underlying graphic libaries/toolkit,
operations like drawing pixels, lines, flood filling areas.

Recent GUIs are rather *rendered* (a term which I believe is borrowed from
the 3d graphics area). For example see the rendering pipline in Java 2:

The graphics operations used here are more complex, composition plays
a role, as do transformations, clipping and antialiasing. 

Also compare the differences in Font handling in the old days and
in a modern engine like Java2D.

And that is not the end of the road:

Many of those graphical advanced (ok, usability is a different issue :-) 
commercial websites were created by people with a graphics designer background
not programmers, using authoring tools from companies like Adobe and 
I bet that more and more of those advanced graphics operations which a
professional graphics designer program like Photoshop or similiar offers 
to a designer, will sooner or later show up in a next generation rendering 
API of a future GUI toolkit.

Imagine not having Java2D as engine for rendering your GUI, but having
rather the GIMP available for that purpose.

>   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.

The GIMP is written in Scheme and might be nice on a bitmapped device
with lots of CPU power.. 
Stuff like PDF or Flash includes design decisions that make it
possible to run that stuff on todays hardware.

>   IMHO there is *no difference* (or should be no difference) between
>   layout on paper and layout on the screen - so I do not want *two*
>   technologies for this but only *one* - by far the best technology for
>   layout on paper is PDF - and for screen rendering is the anti-aliased
>   font stuff in the freetype project.

That common technology would still render on an abstraction level above
the real hardware, mostly because devices have different sort of
pixels and because of scaling issues. 
A TFT screen can take advantage of sub pixel rendering, printing might 
stick to more complicated techniques like halftoning, depending on
the printing hardware, or depending on the size of the output page
(e.g. a wall poster vs A4). 


>   Desktop publishing has ruined typography - did you know that, for
>   example that Times New Roman is one of the most widely used fonts for
>   printing on A4 - but that is was *explicity* designed in 1931 (for the
>   times newspaper) for setting *narrow columns of type*.

The naive view is that one can scale graphics up and down to a certain
degree and so fonts were scaled without mercy.

>   << in a few years we'll probably have electronic paper and then they *will*
>   have merged back into one medium - the current dichotomy between screen and paper
>   is unfortunate, and probably only temporary >>


>   My second thoughts on a GUI are that it should be *entirely* based on
>   message passing - like X-windows - In principle I want the GUI to run
>   on one machine and I want the control process to run on another
>   machine - if we wrote them like this then we could write wonderful
>   apps - spawning of GUI's on remote machines etc.  great fun ...

That it is not always network transparent, is due to not always
having the CPU/GPU horse power.

X11 on my old 386/8MB box was not much fun.


More information about the erlang-questions mailing list