ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cost...@covalent.net
Subject RE: Embed Sandbox Proposal: HOWTO?
Date Mon, 29 Jul 2002 23:11:41 GMT
On Mon, 29 Jul 2002, Wannheden, Knut wrote:

> Yes, I guess I didn't distinguish the two quite clear enough.  But IMHO the
> two should be renamed somehow, because their responsibilities are still
> quite different.  The oat.ant.ProjectHelper unfortunately has both the
> responsibilities to act as the interface for a ProjectHelper implementation
> (as ProjectHelperImpl) and as a factory like object which delegates to the
> appropriate ProjectHelper implementation.

I think the pattern is reasonably common - JAXP, commons-logging, JDOM
( I can think of many others ).

It is true that having a separate factory would be more 'pure', but
most people who will write a ProjectHelper are very likely to understand
this.


> Why a stream of input?  As an example is a DOM tree certainly not a stream,
> not has it necessarily been constructed from one, but it is perfectly suited
> as input for an Ant project.  In this case I think Object as input makes

Yes. Or a pre-constructed tree of RuntimeConfigurable. Or some 
internal thing that the IDE uses ( assuming that an IDE-specific helper
is used that will take the internal representation and create the 
RuntimeConfigurables/Task tree ).

I think Object is reasonable for the interface. It may not be very good
at detecting compile-time errors, but it's better than forcing the
application to create a file or some other ugly hacks to work around
a stricter API.

Costin


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message