[jdom-interest] Stirring up Trouble
brett.mclaughlin at lutris.com
Wed Jul 19 10:41:56 PDT 2000
Dave Hurrell wrote:
> I disagree. Good design appears simple and is intuitive. The basis
> of these discussions it a fundamental design flaw in jdom that breeds
> the confusion. Jdom attempts to store both an elements content and
> whether that element exists or not in the same field. --GreatOne
What are you arguing? This is a white space discussion.
> Brett McLaughlin wrote:
> > OK, guys, I'm about to wreak some potential havok.
> > Because of my book being out, I've been forced to do a bit of "technical
> > support" on a lot of Java and XML questions. I'm sure Jason and
> > Elliotte, as well as Simon, know what I'm talknig about here. Lots of
> > people have latched on to the word "intuitive" in JDOM, as in "it is
> > intuitive to use", and warped that thing all out of content. So let's
> > set the record straight (for myself, as well).
> > "Intuitive to use" and "does what the developer expects" are perhaps
> > deceiving terms. JDOM isn't some sort of smart compiler that does the
> > right thing even when you tell it to do the wrong thing. It can't fix
> > your mistakes, and it won't make up for a complete lack of knowledge
> > about XML. In fact, I would say that if you don't know Java or XML at
> > all, you have no business complaining about why JDOM doesn't work (you'd
> > be surprised at how many mails I get from people who "don't really know
> > Java" but find "the examples don't work"). Feel free to lurk and ask
> > questions, but don't complain that something you have no idea about
> > doesn't magically fix your errors.
> > So what does that mean? That I am finding that intuitive is a tough
> > word. It means "does what the developer expects, as long as the
> > developer's expectations are correct." Sort of tricky, huh? In light of
> > that, I find that JDOM should /not/ be intuitive in the case where the
> > developer is wrong, as that could encourage really bad concepts and
> > practices.
> > So, here's the crux of (at least) this email:
> > getContent(boolean preserveWhitespace);
> > is perfectly intuitive.
> > But what does
> > getContent()
> > do? I'll be the first to admit that I argued and argued that this should
> > not return whitespace, because that wasn't intuitive to the user. But if
> > the user things XML content ignores whitespace around textual content,
> > they would be WRONG. And I would be WRONG to encourage that belief. So
> > I'm now advocating that getContent() simply call getContent(true) and
> > return text with whitespace around it. I'm so convinced I'm willing to
> > make the /very/ painful changes in my book and defend the decision to
> > roughly 25000 readers (already!). So let the talks begin, I'm wanting
> > this resolved ASAP.
> > -Brett
> > --
> > Brett McLaughlin, Enhydra Strategist
> > Lutris Technologies, Inc.
> > 1200 Pacific Avenue, Suite 300
> > Santa Cruz, CA 95060 USA
> > http://www.lutris.com
> > http://www.enhydra.org
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://email@example.com
Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc.
1200 Pacific Avenue, Suite 300
Santa Cruz, CA 95060 USA
More information about the jdom-interest