ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Cook" <jimc...@iname.com>
Subject RE: Did somebody say Shut up and Write? :)
Date Wed, 20 Dec 2000 05:54:20 GMT
> -----Original Message-----
> Would you advocate the same thing in our case - ie we throw an
> exception if
> develoeprs try to add a task to project or a target to a task etc. I don't
> like this kind of behaviour generally. It is alright to have a unified
> interface for it all (I am actually building this - the Camelot Container
> API in Avalon atm) but I don't think it is good in our case.

I really don't get the whole container-contained argument. As a rule, I
don't like to restrict someone from doing something just because it was
something that I didn't forsee them wanting to do. Take your example of
assigning a project under a task. I suppose I could write code to disallow
this, but in my world, I see every Task (including Project) as a method call
with a return type.

Suppose the return type for a project had some value to that Task. It could.
We just have to open our minds a little. I am not one that subscribes to the
concept that we must protect the developer from themselves. If the argument
is that this tool is used by someone with the technical abilities of my Mom
(none to speak of, but a great cook!), then I still say that Ant core should
remain as I sketched it, and the particular implementation that is exposed
to these "delicate users" is more restrictive. I don't want to alienate the
power users however.

>  The target/project objects have no reason to be proxied while tasks do.

I have a real problem with the concept of these Proxy objects. I am not sure
I see the benefit of them in the existing structure, and I certainly don't
see the need for them in the future. What is accomplished through the use of
these proxies that is worth the mass of code to support them?

It can't be performance, because my informal benchmarks show object creation
for a 100 node build script to be below 100 ms. Proxies do produce a smaller
memory footprint (but not by much), but in relation to the memory that
javac, jar and javadoc use it is a pittance.

frANTic, as it exists now, does not use these proxy semantics and the code
is much cleaner for it. I think that foregoing the proxy pattern will
enhance the ability of scripting at runtime as well.

> Besides does swing alow buttons to be contained by buttons. If so who does
> message handling and do you think that it is intuitive? ;)

Swing does allow this, and the message handling is performed by the button
that received the user input.

> >I would also argue that because James' approach results in
> significantly less
> >code than a design that has not been normalized, that the
> maintenance benefit
> >from code reduction alone is a win.
>
> I  think it would be more code size - mainly because we use proxies.

The payoff I see from frANTic is that we will not have to focus on the core
of Ant any longer. The capabilities of Ant lie in the Tasks, not the core.
If something as simple as a Task Execution Engine performs its job properly,
it will provide a solid and extensible framework for Task authors to let
their imagination run free.

jim


Mime
View raw message