You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by eb...@us.ibm.com on 1999/07/13 03:40:40 UTC

Why XML for config and deployment data (was: Re: Jakarta/Apache XML/RDF configuration file format(s))



Both the Enterprise JavaBeans spec and the servlet 2.2 spec specify the
application deployment data be an XML file and have published respective DTDs.
It is obvious that there is a large momentum in the industry moving to use XML
for config/deployment. specifically.  IBM Websphere is moving in the same
direction (Actually *has* moved)  In V2 of WSS last year, we use internal XML
files to deploy servlets into our server...  My esteemed IBM colleague's
previous flame forced me to stop and think why?   This is what I came up with:

1) Code re-use.  specifically XML Parsers.

Parsers that validate and manipulate DOM trees by reading XML files are freely
available and reliable.

2) Interoperability (This is perhaps the biggest benefit).

Configuration data typically needs to be shared by different application and
tools.  For example, a user would generate their servlets and JSPs in an IDE
like symatec and would publish into a server like Jakarta.  Part of publishing
these servlets is providing information on how they will be used.  Arguably, XML
is the language of interoperability for application-to-application and
server-to-server data interoperability.

3) Validation.

A defined DTD is a powerful way to specify the config data format and to
validate actual information.

4) Natural Expression.

It was someone else that also posted that XML allows for more natural structure
of the data than (name, value) property pairs in use today.  I agree.

5) simple editing (free admin GUI ?)

Leveraging the tons of tools being developed for editing XML data.  Including
XSL for query and scripting, and JSP for web presentation.


6) Extensibility.  need I say more?

Still not convinced? ....  Need a list of more benefits? ...  call the private
hotline:  1-800-YNOTXML    :-)  It is actually redirected to Stefano's cellular
phone in Italy.


Cheers,
-Elias


IBM WebSphere Application Server

(919) 254-  (tie 444) 9179 (Office)
(919) 696-3390 (Pager/Cell)
net.Meeting address (audio/video): elias.raleigh.ibm.com

"Simplicity is often the result of profound thought"




James Todd <ja...@eng.sun.com> on 07/12/99 07:17:54 PM

Please respond to general@jakarta.apache.org

To:   general@jakarta.apache.org
cc:    (bcc: Elias Bayeh/Raleigh/IBM)
Subject:  Re: Jakarta/Apache XML/RDF configuration file format(s)






from my experience in helping folks config apps i've designed
i believe the dimensions of xml will help folks see the "trees
through the forest" more readily and i also believe the optional
verbosity which can be present in xml but is not necessarily a
given provided a "default friendly dtd" is also a gain for those who
care to see the "reason behind the design."

admittedly config management can be solved in a number of ways
but i for one like to use expressive tools to 1) help in my design and
understanding and 2) help to readily convey such design intents to my
colleagues and/or customers. in my book xml config formats achieves
both these objectives.

<thisIsNotReligiousFlameBait>
this is one of the very reasons i chose to implement some of my
early (4 years back) web applications in tcl vs perl. while perl
is large and has a great following i find the expressive nature of
tcl more supportable, etc.
</thisIsNotReligiousFlameBait>

i'd also add that i like to read/write less after i understand something,
not before. i believe the assertions that xml formats are necessarily
more verbose then a name/value counterparts are not completely
accurate. my opinions anyways.

- james

Stefano Mazzocchi wrote:

> Jan-Henrik Haukeland wrote:
> >
> > James Todd <ja...@eng.sun.com> writes:
> >
> > > [*] ... the the primary motivation of migrating to a xml config
> > > format for tomcat was "user error" since, in my opinion, folks doing
> > > configuration will be able to "see" the constructs in a well
> > > documented xml file with an associated dtd over a just as powerful
> > > yet much flatter "name/value" approach (eg property, rc).
> >
> > Logically, this can't be correct. If we're talking about hand editing;
> > it must be a lot harder to edit a voluminous XML file with lot's of
> > syntactic sugar, than a set of key=value pairs.
> >
> > Now, the _only_ logical reason for using XML for configuration files
> > is, if the server should provide a configuration tool. Such a tool
> > will be much better of with an XML config file to work with, but a
> > human beeing, with emacs, will not.
>
> I tend to agree on this one. In my own tests writing the
> ExtendedProperties class for JServ I came to the conclusion that
> properties and XML are functionally equivalent, but XML is at least
> three times as verbose. So, Jan-Henrik is right on this, humans tend to
> like to read (and write) the least possible amount of things.
>
> XML is cool because it allows you to "see" the configuration structure
> while it's harder with properties that emulate such structure with the
> dot-format of the keys with no indentation.
>
> Anyway, much of this is personal taste but nobody would change a
> configuration format for personal taste but only for significant
> features you gain. And with XML this appears to be the case.
>
> --
> Stefano Mazzocchi       A language that doesn't affect the way you
>                       think about programming, is not worth knowing.
> <st...@apache.org>                             Alan J. Perlis
> ---------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org





Re: Why XML for config and deployment data (was: Re: Jakarta/ApacheXML/RDF configuration file format(s))

Posted by tc...@agency.com.
Another reason is that in XML the meaning of whitespace and mechanisms for
escaping special characters is extremely well defined. Meaning that it
is frequently easier to insert values that perhaps the original designers
didn't consider.

Tom



Re: Why XML for config and deployment data (was: Re: Jakarta/ApacheXML/RDF configuration file format(s))

Posted by James Todd <ja...@eng.sun.com>.
right on! put very well. YNotIndeed.

i didn't really high-light the interoperability benefits of xml described
data but in my previous gig my recommendations was to xml'ify
every asynchronous system-to-system message ... out with all the
cool proprietary hacks we where proud of and worked quite well
and in with an xml replacement ... and this wasn't just 'cuz xml is new
and sexy and we needed it on our resume either ... noooo way ...
pushing and pulling xml messages from system-to-system will have
*huge* benefits in making real systems in use today much more
extensible and adaptable.. i was also an advocate of xml'ifying all
system-to-system messages that sat on top of the http protocol.

closer to home a bit (jakata) i think the "validating parsers" to help
operate on config data is the immediate win.

- james

ebayeh@us.ibm.com wrote:

> Both the Enterprise JavaBeans spec and the servlet 2.2 spec specify the
> application deployment data be an XML file and have published respective DTDs.
> It is obvious that there is a large momentum in the industry moving to use XML
> for config/deployment. specifically.  IBM Websphere is moving in the same
> direction (Actually *has* moved)  In V2 of WSS last year, we use internal XML
> files to deploy servlets into our server...  My esteemed IBM colleague's
> previous flame forced me to stop and think why?   This is what I came up with:
>
> 1) Code re-use.  specifically XML Parsers.
>
> Parsers that validate and manipulate DOM trees by reading XML files are freely
> available and reliable.
>
> 2) Interoperability (This is perhaps the biggest benefit).
>
> Configuration data typically needs to be shared by different application and
> tools.  For example, a user would generate their servlets and JSPs in an IDE
> like symatec and would publish into a server like Jakarta.  Part of publishing
> these servlets is providing information on how they will be used.  Arguably, XML
> is the language of interoperability for application-to-application and
> server-to-server data interoperability.
>
> 3) Validation.
>
> A defined DTD is a powerful way to specify the config data format and to
> validate actual information.
>
> 4) Natural Expression.
>
> It was someone else that also posted that XML allows for more natural structure
> of the data than (name, value) property pairs in use today.  I agree.
>
> 5) simple editing (free admin GUI ?)
>
> Leveraging the tons of tools being developed for editing XML data.  Including
> XSL for query and scripting, and JSP for web presentation.
>
> 6) Extensibility.  need I say more?
>
> Still not convinced? ....  Need a list of more benefits? ...  call the private
> hotline:  1-800-YNOTXML    :-)  It is actually redirected to Stefano's cellular
> phone in Italy.
>
> Cheers,
> -Elias
>
> IBM WebSphere Application Server
>
> (919) 254-  (tie 444) 9179 (Office)
> (919) 696-3390 (Pager/Cell)
> net.Meeting address (audio/video): elias.raleigh.ibm.com
>
> "Simplicity is often the result of profound thought"
>
> James Todd <ja...@eng.sun.com> on 07/12/99 07:17:54 PM
>
> Please respond to general@jakarta.apache.org
>
> To:   general@jakarta.apache.org
> cc:    (bcc: Elias Bayeh/Raleigh/IBM)
> Subject:  Re: Jakarta/Apache XML/RDF configuration file format(s)
>
> from my experience in helping folks config apps i've designed
> i believe the dimensions of xml will help folks see the "trees
> through the forest" more readily and i also believe the optional
> verbosity which can be present in xml but is not necessarily a
> given provided a "default friendly dtd" is also a gain for those who
> care to see the "reason behind the design."
>
> admittedly config management can be solved in a number of ways
> but i for one like to use expressive tools to 1) help in my design and
> understanding and 2) help to readily convey such design intents to my
> colleagues and/or customers. in my book xml config formats achieves
> both these objectives.
>
> <thisIsNotReligiousFlameBait>
> this is one of the very reasons i chose to implement some of my
> early (4 years back) web applications in tcl vs perl. while perl
> is large and has a great following i find the expressive nature of
> tcl more supportable, etc.
> </thisIsNotReligiousFlameBait>
>
> i'd also add that i like to read/write less after i understand something,
> not before. i believe the assertions that xml formats are necessarily
> more verbose then a name/value counterparts are not completely
> accurate. my opinions anyways.
>
> - james
>
> Stefano Mazzocchi wrote:
>
> > Jan-Henrik Haukeland wrote:
> > >
> > > James Todd <ja...@eng.sun.com> writes:
> > >
> > > > [*] ... the the primary motivation of migrating to a xml config
> > > > format for tomcat was "user error" since, in my opinion, folks doing
> > > > configuration will be able to "see" the constructs in a well
> > > > documented xml file with an associated dtd over a just as powerful
> > > > yet much flatter "name/value" approach (eg property, rc).
> > >
> > > Logically, this can't be correct. If we're talking about hand editing;
> > > it must be a lot harder to edit a voluminous XML file with lot's of
> > > syntactic sugar, than a set of key=value pairs.
> > >
> > > Now, the _only_ logical reason for using XML for configuration files
> > > is, if the server should provide a configuration tool. Such a tool
> > > will be much better of with an XML config file to work with, but a
> > > human beeing, with emacs, will not.
> >
> > I tend to agree on this one. In my own tests writing the
> > ExtendedProperties class for JServ I came to the conclusion that
> > properties and XML are functionally equivalent, but XML is at least
> > three times as verbose. So, Jan-Henrik is right on this, humans tend to
> > like to read (and write) the least possible amount of things.
> >
> > XML is cool because it allows you to "see" the configuration structure
> > while it's harder with properties that emulate such structure with the
> > dot-format of the keys with no indentation.
> >
> > Anyway, much of this is personal taste but nobody would change a
> > configuration format for personal taste but only for significant
> > features you gain. And with XML this appears to be the case.
> >
> > --
> > Stefano Mazzocchi       A language that doesn't affect the way you
> >                       think about programming, is not worth knowing.
> > <st...@apache.org>                             Alan J. Perlis
> > ---------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: general-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org


Re: Why XML for config and deployment data (was: Re: Jakarta/ApacheXML/RDF configuration file format(s))

Posted by Stefano Mazzocchi <st...@apache.org>.
ebayeh@us.ibm.com wrote:

> Still not convinced? ....  Need a list of more benefits? ...  call the private
> hotline:  1-800-YNOTXML    :-)  It is actually redirected to Stefano's cellular
> phone in Italy.

:)

-- 
Stefano Mazzocchi       A language that doesn't affect the way you 
                      think about programming, is not worth knowing.
<st...@apache.org>                             Alan J. Perlis
---------------------------------------------------------------------



Re: Why XML for config and deployment data (was: Re: Jakarta/ApacheXML/RDF configuration file format(s))

Posted by James Todd <ja...@eng.sun.com>.
wow ... i !really! like this one. simply stated. very cool.

- james

Federico Barbieri wrote:

> In a few words...
>
> Smart data structures and dumb code works a lot better than the other
> way around. [The Cathedral and the Bazaar]
>
> Federico
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org


Re: Why XML for config and deployment data (was: Re: Jakarta/ApacheXML/RDF configuration file format(s))

Posted by Federico Barbieri <sc...@pop.systemy.it>.
In a few words...

Smart data structures and dumb code works a lot better than the other
way around. [The Cathedral and the Bazaar]

Federico