Monday, June 20, 2005

programming (AOP) have in common.

I went through a very interesting paper about AOP and Java Dynamic Proxies. I’ll have to look at JBoss AOP to find out how it is implemented.

1 Comments:

At 2:45 AM, Anonymous Anonymous said...

Hi Arnaud,

Again, a very insightful link!

Again I wonder if maybe the author glosses over an area that could be of high concern to programmers:
"Although useful, dynamic proxies are not always appropriate. Code simplification comes at the expense of performance. Each level of indirection adds overhead—this is especially true of reflection-based mechanisms."

From my understanding, AOP approaches can use either runtime injection (i.e reflection) of aspects a la Aspectwerkz 1 or compile time such as AspectJ which negates the impact of reflection.

Just a point to consider!

Cheers,
Tom

PS If you were to implement an AOP framework yourself using an approach like the one suggested I guess you would use a single dynamic proxy which would then

1. Invoke your chain of cross-cutting concerns each implementing an Invokable interface (or similar), then
2. Issue a single reflection call to invoke the actual method.

As opposed to each cross-cutting concern being a dynamic proxy and therefore requiring multiple reflective calls. Just my 2¢...

 

Post a Comment

<< Home