On 9/22/05, Gary Feldman <[EMAIL PROTECTED]> wrote:
> Troy Laurin wrote:
>
> >On 9/20/05, Gary Feldman <[EMAIL PROTECTED]> wrote:
> >
> >>but on the other hand there are some
> >>things that make can do easily, but which are tricky or more work to do
> >>in NAnt - such as adding a project-wide pre or post compile step.
> >
> >That actually sounds like a good idea... do you think there would be
> >demand for an AOP-style framework for NAnt, so tasks can be extended
> >by registering pre- and post-task event listeners  which can inspect
> >the task's parameters and optionally modify those parameters, or
> >trigger some other action?
> >
> >
> I don't think that AOP has crossed the chasm yet, and the way it
> violates the principle of locality of reference makes me wonder whether
> it's appropriate for the typical NAnt user.

AOP is certainly still in its infancy and hasn't quite proven that it
is here to stay... and you're right that it does violate locality, but
it also has the potential to improve the declarative nature of NAnt.

> Another idea might be to
> just have a mechanism to set defaults.

I think AOP would be much more useful in terms of triggering actions
in response to tasks.  Almost the inverse of target dependencies - one
target specifies that it can't run until this other target has already
run... in contrast, a trigger would specify that it must be run before
this particular task is run.

For an example that's not great (but may grow into something more
useful), the standard concept of updating source code before building
it could be reimplemented as a pre-trigger on the cpp task - before
the source is compiled (or even the up-to-date check), the trigger
could update the source files from source control.

I stress that the above example isn't a good idea in and of itself -
there is very little use in general in updating a small portion of a
source tree, and a great danger in updating multiple parts of a source
tree in multiple operations.  The already standard pattern of updating
the entire tree is much more useful in general, and much safer.  The
example is just the best I could think of at the moment.  Perhaps
that's a sign that there isn't a valid use-case for this in NAnt? :-)


Off topic, what's a typical NAnt user? ;-)
Valid point, though.  If in practice using AOP is just as likely to
obfuscate build files as clarify them then the documentation should
clearly state that the facility shouldn't be used unless it is likely
to simplify the build script, or if it would be difficult to write the
script without.

--
Troy


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to