xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett McLaughlin <new.insta...@gte.net>
Subject Re: JDOM and Thank You :)
Date Thu, 27 Apr 2000 19:33:01 GMT

> Gee, JDOM sounds just like Xerces and DOM.
> Did you guys build JDOM because you found something frustrating about Xerces
> and DOM?
> If so, what was it?
> Maybe it's just the cynic in me, but I'm always cautious
> of "let's create yet another standard / api so I can
> put it on my resume and acquire instant fame and fortune"?
> Note, I'm not saying that's the case here. Just curious.

Sure... fyi, we should probably move off these huge, general lists. 
jdom.org is a great place to start, or even xerces-j-dev.

JDOM is so far from DOM it's scary ;-)  Check out the API docs -
http://jdom.org.  JDOM is much more lightweight, must less
memory-consumptive, much faster, and more in tune with what Java
developers want.  It has no ties to Xerces, other than that we by
default use Xerces.  There's nothing about Xerces that frustrates me; we
supply it as a default,  but we also use Oracle V1 and V2, Project X
(what used to be, at least), IBMXML4J, we don't care.

And I find DOM extremely frustrating - it's a total wash for pure Java
usage.  Yes, I know the arguments (I wrote a book on it, after all ;-)
), they had to be cross-language, etc., etc., and I'm fine with that. 
But we aim to provide /Java/ developers a means to use XML _easily_.  I
do not in any way believe DOM provides this today, or that it will in
the future.  It is non-intuitive, too big, and doesn't behave like
Java.  Who ever heard of:


People in Java?  no way - people in Javascript without overloading? 
yup.  So we don't emulate DOM, other than that we provide a complete
view of an XML document.  We don't even mandate that the whole document
is in memory, unless you want it to be.  We just say, here's some data,
let's provide easy ways to get at it.  You should really look at the API
docs, they would answer lots of these questions for you ;-)


> -----Original Message-----
> From: Jason Hunter [mailto:jhunter@acm.org]
> Sent: Thursday, April 27, 2000 11:48 AM
> To: general@jakarta.apache.org
> Cc: general@xml.apache.org; cocoon-dev@xml.apache.org
> Subject: Re: JDOM and Thank You :)
> Ray Cromwell wrote:
> >
> > Could you summarize at a 30,000ft level what JDOM does and why it is
> > needed? I tried going to the web site, but there were no specs.
> The web site now contains the slides from our presentation last night
> to the Mountain View JUG.  (See Brett's announcement below.)  These
> slides address some of the high-level issues.
> > Browsing the JavaDoc gave me the impression it's intended to allow
> > I/O of XML from storage other than just text.
> Yeah, it's always hard to learn the philosophy of an API from the
> Javadocs.  :-)  Our goal is to be an easy and efficient API for reading,
> manipulating, and writing XML data from Java.  The API is intuitive,
> and the implementation is lightweight and flexible.
> JDOM integrates well with DOM and SAX.  You can construct a JDOM
> document using *any* DOM or SAX parser (plug in your favorite, we
> default to Xerces).  We suggest building with the SAXBuilder right now
> because it's faster than DOMBuilder, but we have plans for builders that
> are faster still.  Notice you don't need to know any SAX to use
> SAXBuilder.
> You can also convert a JDOM document to any output format you want
> including XML, a DOM tree, or SAX events.  For example, if an
> application expected SAX as input, you'd just output the Document to
> SAX for that to work.  Very slick.  If you want it output to a database,
> you just write a SQLOutputter that writes the document to a database.
> > However, one thing concerned me was that the JavaDoc didn't say
> > that their versions of Node, Element, et al, implemented the
> > org.w3c.* interfaces. IMHO, any API that doesn't atleast implement
> > the w3c interfaces is dead-on-arrival.
> We don't implement the org.w3c interfaces, and aren't going to.  We're
> not DOM and don't need to inherit DOM complexities and inefficiencies.
> As one of our beta testers said:
>    Having used JDOM for serveral days now, I have found it much
>    simpler to work with over DOM and especialy SAX. JDOM just flows
>    better for a Java programmer like myself and the code you end up
>    with is much cleaner. I like it ;-)
> Here's Brett's announcement about new content on the site:
>   Some changes have just been made to the website.  First, we've
>   updated the news page to reflect the upcoming press release.
>   Obviously, it's not out yet, so it's a placeholder that will soon
>   be filled in.
>   I've also added Jason's and my slides from last night to the
>   Documentation download page.  I'm working on getting a copy of
>   Acrobat writer, and as soon as I get that, I'll convert them to
>   PDFs.  For now, they are just in .ppt  (Sorry linux people - my
>   laptop can't read them either ;-) ).
>   Also, I've added .tar.gz downloads for source, binaries, and docs,
>   and added a small file (antRun) to the source dist. so that JavaDoc
>   builds correctly in Unix.
> -jh-
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org

View raw message