Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] newbie question on how to use AOP

Not wrong at all, but not 100% :) most people just starting off down the AOP road tend to think of aspects as something separate from their core business logic and traditional application architecture - and sometimes this is absolutely fine.

Aspects, although commonly used as additional to core business logic as implemented using traditional classes, *can* be an actual part of your core business architecture. This would be the case where a cross-cutting concern was something more than a passive aspect like logging. For example, I have applications where the threading is controlled using aspects - this is actually part of the business logic - it just so happens that the cross-cutting thread logic is better designed and implemented in aspects. Same can be said for design patterns, see Jan Hannemann's work at http://www.cs.ubc.cal/~jan/AODPs/, these patterns are absolutely core to your application but benefit from AO refactoring in some cases.

So, you're definitely doing great but you'll find that the more AO software development you do the more the AO approach and perspective will permeate through your designs. This is perfectly natural and often a good thing.

Have Fun!

Russ

On 1 Feb 2005, at 19:01, Danijel Arsenovski wrote:

<x-tad-bigger>Hi,</x-tad-bigger>

<x-tad-bigger>  </x-tad-bigger>

<x-tad-bigger>Just started going through AspectJ in Action..</x-tad-bigger>

<x-tad-bigger>It seems to me that right way to use aspects is to write code in that way so the main line of execution can compile and run in pure java even if no aspects are compiled/created.</x-tad-bigger>

<x-tad-bigger>In that case code will only lack these characteristics, but will still execute perfectly well.</x-tad-bigger>

<x-tad-bigger>For example, this means that if we use aspects for logging, pure java code should execute as well in both cases, with and without aspects. Of course, logging will be performed only in case where aspects are used…</x-tad-bigger>

<x-tad-bigger> </x-tad-bigger>

<x-tad-bigger>Is this observation obvious, or am I missing something?</x-tad-bigger>

<x-tad-bigger> </x-tad-bigger>

<x-tad-bigger>Thanks,</x-tad-bigger>

<x-tad-bigger> </x-tad-bigger>

<x-tad-bigger>Danijel</x-tad-bigger>
<x-tad-bigger> </x-tad-bigger>_______________________________________________ aspectj-users mailing list aspectj-users@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/aspectj-users

Back to the top