OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] SVG Can't Replace XUL

[ Lists Home | Date Index | Thread Index ]

On Thu, Feb 26, 2004 at 11:51:40PM +0100, Robin Berjon wrote:
> Gerald Bauer wrote:
> >  Well, using SVG to replace XUL is wishfull thinking.
> Not to replace, to implement. Getting people to agree on what's needed 
> in a UI system is wishful thinking. I sure hate every single GUI toolkit 
> that I've tried to use.

There was one GUI toolkit I really liked, and another that was OK once
I implemented some higher-level wrappers.

This seemed ike a side-issue at first, and then I realised it isn't.

The toolkit I liked using was version 3 of Sun's NeWS toolkit (TNT).
Earlier versions put a lot of people off and were less elegant.

The toolkit I kinda sorta liked (as they say in Texas) was an
object-oriented extension to Scheme.  The plus side was it was
very predictable: like NeWS/TNT, you could guess methods of an object
based on your knowledge of other parts of the toolkit.  The down
side was that, like NeWS/TNT, it was hard to debug, and there
was little type safety.

The nice thing about the NeWS tolkit, and what makes it relevent
here, is that the programming language - a fairly clean
object-oriented extension of PostScript (!) - had graphics
primitives as first class objects.  I didn't need to use an
array of numbers an opcodes (or a linked list or whatever) to
represent a path: it was a fundamental data type and I could
iterate over it.  Fonts were arbitrary collections of procedures
(although Type 1 and F3 fonts had restrictions on them, for
efficiency, you could use Type 3 unrestricted colour fonts too).

So there was a close impedence match between the problem space
and the language: the user was manipulating objects, which
were represented as objects either living in the server or
proxied into the application, and the objects were drawing
UI controls which ultimately involved graphical operations
which are a primitive part of PostScript.

In principle at least one ought to be able to come close to
this with SVG.  You'd want a language in whch pieces of XML
(XML literals, if you will) were first-class objects too,
so just as in C++ you can say,
    unsigned int i = 3;
    String sock_colour = "Argyle";
so you should be able to say
    XML element name = <name>Simon</name>;
    XML element svg:rect = <rect ..... />

This has been something I've found useful about XML Query, and
although I'm not sure I'd want to do UI programming in a
declarative language, I did use Scheme before... although we
had mutators such as set! available as I recall.

> >SVG is markup for rich 2D graphics. XUL is markup for
> >rich widgets (e.g. windows, wizards, dialogs, trees,
> >datagrids, splitters, menus, toolbars, and so on).
> Rich widgets aren't created out of thin air, they're created using rich 
> 2D graphics.

I think we're in agreement :-)



Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS