ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject [DISC] Aspect types was [DISC] Aspect implementation
Date Fri, 01 Jun 2001 17:57:16 GMT
Hi,

An important thing in AOP/SOC is finding the right "hinge points". A hinge
point is a point in code which needs to be flexible so that arbitrary
cross-cutting concerns can be plugged in. 

For example one hinge point in Ant would be what to do with exceptions
generated either pre-execute() or during execute(). This hinge point is
required by aspects who want to implement fail-on-error style functionality.

Another hinge points would be - before/after tasks
instantiation/destruction (So you could time task, set context classLoader,
other)

So before we define the Aspect interface I think we should try to generate
a list of aspects that we think would be valid to implement. After that we
can list the hinge points. Some hinge points will be used in unison (ie
pre-create/post-destroy pair) and high correlation of use.

We then have to decide whether we list all the hinge points in one
interface or delegate them to multiple typed interfaces. This would be
based on correlation of use and size of interface. The first apprach
doesn't scale well but is fine if there is a small number of hinge points. 

I guess you can look at TC3 vs TC4 to see how different designs play out.
TC3 is far easier to build initially but difficult to extend without
pissing off a bunch of interceptor writers ;) TC4 is harder for container
writers to initially build but simple to extend. It also scales better well
(though this is not likely to be an issue with ant???). Some would argue
that TC3 is easier because multiple hinge points are usually used together.

BTW you seem to be using the term join points synonymously with what I have
termed hinge points. Is this true?

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message