On Fri, 11 Feb 2000, Perrin Harkins wrote:
> On Thu, 10 Feb 2000, Vlad Safronov wrote:
> > What's the benefits of using XML in building web site with dynamic
> > content?
> > (web site is a front end to database)
> 
> This is off-topic for this list, but I can't resist...

(me either)

I do have something to sell, so take this with however much salt you like
(I'm co-authoring a book on XML).

The benefits I personally get out of xml are really summed up by examples.

1. My CV.

In my line of work I have to taylor my CV regularly to different clients,
different look/feel, different output formats. To aid in this I keep my CV
in a state of high entropy - it contains no formatting information - only
semantic information. I could have taken a custom built format, specified
using indentations and keywords that a parser has to recognise. Instead I
chose XML for 2 reasons: It's easy to write, and it's easy to parse.
Writing custom output filters for my CV is easy - the XML modules on CPAN
are first class, and great for doing this sort of thing (of course I'm
biased there too - if you see my CPAN directory).

2. Client Work

Working on different clients sites, on different projects can sometimes be
overwhelming in the different things you have to deal with. Sometimes you
might be writing a Quiz script, other times its a massive
database/tables/charts/documents project. I try and consolidate my work
down to XML as much as possible to reduce the skill set I have to spread
myself over. That way the client gets someone who has honed their skills,
and it makes my life easier.

3. The Book

I want to be able to just write. The publisher wants to be able to publish
in glossy format. The other co-authors want to be able to read what I've
written, but also see formatting. To this extent we use DocBook/XML. I can
just write, and add the docbook formatting later, the publisher gets a
format that they already have tools to deal with, and the other co-authors
can use the freely available docbook tools to view it as html or postscript.

4. My WebSite.

(I haven't implemented this yet - like most web workers I'm too busy
working on other peoples web stuff to do my own). I'd like a web site where
anyone can come in using Lynx or IE5 or Mozilla or Opera or any other
browser. Rather than have to spend weeks writing code that transparently
works on all browsers, I'd like to write my site using a template system
that magically transforms my writing to HTML appropriate for the user agent
visiting. XML and XSLT can provide this. Rather than write pages to a
specific style with toolbars in the right place, and format things how I
want them, I can write in XML, and down transform to HTML using a
stylesheet. When I want to change the look of my site I change the
stylesheet and the site changes with it. This isn't magic - a lot of
template systems exist today - many of them written right here for
mod_perl. But XSLT allows me to leverage those XML skills again. And I
think authoring XML is easier than most of those template tools (although
XSLT isn't trivial).

5. Data Transformation

As part of my content management system I'm building a B2B server. I want
to be able to accept and transmit all sorts of different XML formats.
Different companies expect their data in different formats. To do that I
have only to create a parser to recognise MY format, and create XSLT
stylesheets to transform formats from other companies to my format. And
vice-versa.

Hope this gives a brief insight into how useful (and important) XML is
becoming.

-- 
<Matt/>

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.

Reply via email to