Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Question on architectural aspects

Hi everyone,

Hopefully this isn't an off-topic question, but if it is as it it not very AspectJ technical in nature then please let me know where else I can ask it. I am looking at the recent example on this list of using aspects to provide a default implementation to a method on an interface (I think this is in Ramnivas' book). I'm worried about the knock on effects this could have on a design, the worst case being the apparent possibility of getting a diamond shape multiple inheritance issue ? Maybe I'm not understanding the example, but I got all excited when I first saw it earlier on this list but then the more I thought about it the more concerned I got.

I think my problem stems from questions over whether or not aspects are best applied as 'system side' cross cutting concerns or potentially on the much smaller class only scale? I can definitely see the advantages for using aspects on the small scale in terms of the clever things that can be done, but isn't that getting awfully close to using aspects to do clever things that the language is specifically attempting to prevent us from doing? 

I always understood the more system level selling point for applying aspect concerns across the big picture, but when aspects start to seriously affect the underlying architecture of the business logic I get worried as I feel that one of the rules of aspect orientation is to apply aspects to business logic, not define the business logic itself in aspects. I guess the rule I tend to use is develop the application using good OO and patterns, identifying cross cutting concerns for the aspects to be developed for, and then bring both parts together ... but the business logic still makes sense to me in plain OO. 

I guess I'm not clearly seeing the advantages of applying aspects on a class by class basis, or to invoke architectural decisions such as OO patterns, but I am definitely seeing worrying problems where developers are going to be coming to new applications and are going to find it increasingly difficult to understand the business logic as it is being applied using aspects.

I know this is not a technical AspectJ question, and I apologise once again if this is the wrong place, but this discussion is killing me at work with my OO people and I'm desperate to fully understand the motivations behind aspects being used on the small scale.

Cheers

Russ Miles

<Never any offence intended>



Back to the top