[Y-devel] XML Bundle widget
Dave Snowdon dsnowdon at club-internet.fr
Sat Feb 21 16:08:09 GMT 2004
Hi folks
I got Y to compile and run so now I have no excuse for not getting my
grubby little fingers into the code :-)
There's a few things I'm interested in contributing to such as Open GL
support (if anything remains to be done; I saw that Claude has written
some code for this), multiple input devices and audio support but I was
thinking about something smaller to get me started.
Anyway...
In Mark's thesis he mentions that one way of improving the start-up time
would be the possibility of throwing an XML document at the server which
then instantiates all the widgets described in the file in a single
request. I was thinking that there are more reasons to like the idea of
widgets being able to accept and generate XML descriptions. For example
it would make it easier to build resource editors. The UI editor could
throw some XML at the server which instantiates the user interface, the
editor allows the developer to edit the UI and, when done, asks the
server to send back the XML for the current state. The XML is then ready
to use by the aplication being built. Another reason is
internationalism, you can edit the XML UI description and translate the
text without touching the executable.
I was thinking that the way to go about building this would be to build
a widget ("XML Bundle" seems like a good name) which implements a method
with a string parameter which is interpreted as XML. The widget parses
the XML (using a simple lightweight parser like expat) and instantiates
the widgets. The XML file would allow the developer to name widgets -
the names would then be associated with the id of the instantiated
widget and used as properties on the XML Bundle so that client
applications could then look up the identifiers for individual widgets.
To do this in a clean way would require each widget class to have
methods supporting the parsing and generation of the XML that represents
it. This way the XML Bundle widget doesn't need to know anything about
the widgets it's buildng except how to find the correct widget class to
hand a piece of XML to (actually I would probably not pass the XML
itself but instead route the callbacks from the XML parser to the widget
class concerned).
So, before I start coding, does anyone have any comments on the above?
Anyone already started doing something similar?
Dave
--
New book: "Inhabited Information Spaces" Web site: https://www.iisbook.com
Dave Snowdon <dave at emptiness.org>
This mind intentionally left blank.
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved