Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: [NEWSDELIVER] Could "declare warning" output method signature?




James,

I am not sure I quite understand your question. One goal of "separation of
concerns" is to improve the understandability of the main logic but the
concerns cannot be implemented in complete isolation. That is to say a
developer of the main logic needs to know an aspect is to be used for
tracing (so he/she doesn't implement it by hand) but need not worry about
the details of its implementation.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/

James Gan <ganzhi@xxxxxxxxx> on 19/04/2005 03:08:31

Please respond to James Gan <ganzhi@xxxxxxxxx>

To:    Matthew Webster/UK/IBM@IBMGB
cc:
Subject:    Re: [NEWSDELIVER] Could "declare warning" output method
       signature?


Hi, Dear Matthew,

Thank you for your kind help. I agree with you that complex pointcut
is difficult to maintain. But IMHO, I feel that it will be much
flexible if design of main logic won't be affected by aspects. Should
we consider every possible aspects when we design main logic of
software? Maybe it will be a heavy burden of developers if some simple
but strange policy is enforced.

The producer of thread don't care how many kinds of clothes the thread
will be used. So I woder why designer of a crosscut concern must take
care of other crosscut concerns? What do you think about it?


James,

If you are talking about entry/exit trace (which can be easily refactored
as an aspects) as opposed to debug trace (which tends to occur at arbitrary
points in the code not coincident with a well define set of join points and
is hence much more difficult to refactor) and the distribution appears to
be random then there is little point in trying to reproduce the "policy"
using an aspect. The resulting pointcuts will be "fragile" to changes in
the base code i.e. when someone adds a new method or changes the signature
to an existing one it won't be traced. Much better to express the actual
policy you want i.e. "all public methods excluding toString()" and capture
that as an aspect. If this results in too much output or an unacceptable
performance overhead it is a simple task to refine the aspect and exclude
those methods that are not needed.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/




Back to the top