XML

Alan Kennedy alanmk at hotmail.com
Fri Jun 20 17:18:38 EDT 2003


Roman Suzi wrote:

> I have a feeling that XML steadily moves out of buzz-word set into
> usual life. But along with this I have a feeling that XML is not as
> useful as it was presented during it's hype period. I myself have
> not found any use for it. There is always something more practical
> than XML.

I think that there are some important areas where XML can, does and will
continue to make an impact, apart from the obvious usability in data
interchange.

One example is the portability of technical knowledge that comes about
for people who use markup. Take javascript: Creative
and design people, i.e. non-programmers, who have learnt to manipulate
HTML and xhtml DOMs using javascript can take that knowledge directly
over to manipulating SVG (Scalable Vector Graphics) DOMs, for example:
the principles and execution are exactly the same.

That last statement is not always true when you get into proprietary
formats, such as Macromedia Flash for example. The latter does a
*reasonable* job at some tough tasks

 o Streaming content
 o Optimising bandwidth usage, encoding only changes in a visual
representation
 o Doing compression on content
 o Synchronising multiple media streams

But, until recently, users of Macromedia's Flash programming toolset had
to learn a different object model from that which they were accustomed
to in HTML DOMs. Macromedia worked hard to rectify this in Flash 5 and
6, because they recognised that they were risking excluding potential
users: "actionscript" continually gets closer to javascript.

I know the argument could be made that this "knowledge transferability"
is a feature of javascript, not of XML. But javascript was designed as a
language to manipulate DOMs, so it could be viewed as an (HT|X|*)ML
specific language. I think the ubiquity of javascript (not always to the
common good ;-) says something about Markup as a simple data model that
ordinary people can understand and use in practise. Markup is
introducing whole generations to a declarative style of programming, as
used in for example, Cascading Style Sheets, Netscape XUL sidebars, etc.
I know grandmothers that hand code HTML+CSS in Notepad (really).

Of course the point remains that XML is hugely resource inefficient for
many problems. But maybe in 5 years we'll have so many terahertz and
gigabytes and megabits-per-sec that we won't care. Just this week, I was
delighted to take delivery of a little (1cm x 3cm) USB keyring that
stores 256 megabytes in non volatile, zero power requirement, solid
state storage (kewl ;-) . It cost me €55 plus VAT: someone told me later
that day that I could have bought 512 Megs for €45! Efficiency in
resource usage is not necessarily a barrier to adoption, as Microsoft
have been demonstrating for years.

It can also be said that XML confuses many issues: e.g. the old canard
of expressing programming languages in XML ("Xython"). But that can be a
boon as well: without all this confusion, how else could we IT people
keep ourselves gainfully employed <0.3 wink>

On the python side, I believe that, although javascript is custom
designed for manipulating markup data structures, python is the best
natural fit for such data structures. Python's combined simplicity and
power in manipulating sets, sequences and mappings makes it a very
natural fit for XML (and indeed general data) processing. I wouldn't be
surprised if Python, or something very close to it, shows up as a
compulsory subject for school kids sometime in the next ten years. And
of course, python was what cured me from my irrational desire to
represent everything in XML %-)

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list