ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simeon H.K. Fitch" <sim...@fitch.net>
Subject Re: Proposed API Refactoring
Date Tue, 05 Dec 2000 01:57:06 GMT
On Tue, Dec 05, 2000 at 12:24:20PM +1100, Peter Donald wrote:
> At 09:58  4/12/00 -0600, Simeon H.K. Fitch wrote:
> >Something I'm confused about, so be patient with me: If the goal is to
> >generate the Ant data model from some other info source than an XML
> >file (say, a GUI constructed tree structure), why would one want to go
> >through the SAX interface to communicate with Ant?
> 
> well any number of reasons. If the data model is too different from DOM
> (Which I think it is) then it makes little sense to go through DOM. But if
> we have DOM sources then we must allow them to be used to generate the
> model. Remember DOM is just an input and not the final model.

What I'm looking for is a construction API that doesn't use SAX or
DOM. If we want a general approach to generating Ant datamodels, why
remain so w3c/XML centric?

<snip>

> Instead of having N project
> builders it would be better to have N SAX producers and one SAX Project
> Builder. The reason for this is that there are already many SAX converters
> 

I don't see the benefit to having N SAX producers over N project
builders. I would think that in the long term one would go through
more contortions trying to generate the appropriate SAX events rather
than directly building the project. Take the case where you want to
store the project in a relational database, where you have separate
tables for each data type (Target, Task, etc). Going to the w3c/XML
SAX event API rather than instantiating the node types directly, or
going through a factory seems a little weird.

> out there and it means that the project builder can be easily maintained
> and there is less chance different input sources causing projects to be
> built inconsistently.

Couldn't various SAX producers be just as likely to produce
inconsitent SAX events as any project builder? If we are trying to
isolate ourselves from the construction of invalid project data
structures, I have to argue that there are more straight forward ways
that better support the Ant semantics (like a Factory approach that
enforces the providing of certain data).


sim

--
Mustard Seed Software 
mailto:simeon@fitch.net

Mime
View raw message