Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2001 08:57:39 -0700
From:      Doug Barton <DougB@DougBarton.net>
To:        Ernst de Haan <ernst@jollem.com>
Cc:        ports@FreeBSD.ORG
Subject:   Re: XML-based ports system ?
Message-ID:  <3B13C6F3.86553EE1@DougBarton.net>
References:  <20010528105709.A9284@c187104187.telekabel.chello.nl> <20010528225753.C50483@xor.obsecurity.org> <20010529133739.B924@c187104187.telekabel.chello.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Ernst de Haan wrote:

> Well, here goes nothing. These are some of the main advantages of XML in
> general:
> 
> [1] XML is an industry standard that is replacing SGML,

	XML is a subset of SGML. More precisely, it's a particular type of SGML
markup. 

> HTML and a lot of
>     proprietary file formats. Slowly but surely. It is supported by key
>     players on both sides of the field (Microsoft, Sun, IBM, Oracle, Apache,
>     etc.)
> 
> [2] `New' users are more and more already familiar with XML, and not with all
>     kinds of proprietary file formats.

	New users are definitely familiar with text files. 

> They know how to work with DTDs, how
>     to do transformations of XML files using XSLT, etc.

	Most of the new users we have lately have a hard enough time understanding
simple instructions in plain english. Further obfuscating things with XML
is unlikely to help.

> I expect that a lot
>     of potential *BSD users will be familiar with XML between now and 5
>     years from now.

	That is a 100% true, and equally meaningless statement. I expect that a
lot of potential *BSD users will be familiar with blue paint between now
and 5 years from now. 
 
> [3] It is much easier to learn one file format (XML) than learning 15
>     different file formats. Using XML for almost all file formats is clearly a
>     tremendous advantage in terms of simplicity.

	 Using one file format for all configuration files forces a type of
"consistency" onto things that are actually quite different. This leads to
its own form of complexity. 
 
> The advantages specific for the ports system are or could be:
> 
> [4] We would be able to define everything in one file (in a clean manner).

	Everything? Including the patches? Several proposals have already been
made to combine all of the regular elements of a port into one file that
don't involve XML. I'm still irritated that the distinfo and pkg-* files
weren't combined into the Makefile during the last pass. 

> [5] We would be able to move the ports collection even more from a procedural
>     to a declarative approach.

	What, precisely, do you mean by this, and what are the advantages to the
declarative approach?

> We would lose some bloat, like the lines like:
> 
>        .include <bsd.port.pre.mk>
> 
>     Or rather replace it for other kinds of bloat ;)

	This I agree with.
 
> [6] We will be able to leverage existing XML tools for filtering,
>     transformations/conversions, etc.

	There are many more tools for manipulating text files.

> We can use standard tools to create
>     XHTML documentation (using XSLT), to name an example.
> 
> [7] For every XML format a DTD defines the syntax for the format. The syntax
>     will have to be simple (which is a pro) and using the DTD it will be very
>     easy to check.

	The same is true of the Makefile format. 

> There are standard tools for this, again.
> 
> Hmm, this list of probably incomplete, but let the flame wars begin! ;)
> 
> This is an example of what a simple port definition could look like:
> 
>    <port name="jdk"
>          prefix="linux-sun-"
>          version="1.4.0"
>          uses-linux="true" >
> 
>       <maintainer name="Ernst de Haan" email="ernst@jollem.com" />
>       <category>java</category>
>       <category>devel</category>
> 
>       <distribution>
>          <distfile>j2sdk-1_4_0-linux-i386.bin</distfile>
>          <master-site location="NA/US">ftp://ftp.sun.com/j2sdk</master-site>;
>          <master-site location="EU/UK">ftp://ftp.sun.co.uk/j2sdk</master-site>;
>       </distribution>
> 
>       <dependencies>
>          <arch-dependency arch="i386" />
>          <run-dependency executable="javavm" port="java/javavmwrapper" />
>       </dependencies>
>    </port>

	How exactly is this format better than the equivalent makefile format? All
you've done is exchange one set of classifications for another. It could
easily be argued that your format is more verbose and complicated, and
therefore more prone to user error. 

	In case you haven't figured it out yet, I am seriously opposed to the idea
that XML is as a panacea for everything that supposedly is wrong with unix.
Unlike many of the proponents of this plan I have years of experience in
using XML to write applications. Well implemented XML does a few things
passably well. Bad XML is truly horrid, and there is a lot more bad than
good. 

Doug

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B13C6F3.86553EE1>