There’s a good article on Devx about Aspects and when to use them in conjunction with Object Orientated design.
I have found them very useful in Java applications for
– Performance Metrics
– Design Enforcements
– Data Persistence
All areas where (a) there needs to be small bits of code , scattered throughout the application and (b) written by a small core team , but respected by the wider group of developers working on the application.
Aspects allow you to separate these concerns into a separate layer , but apply them to the the finished Java Classes to run in standard JVM. Aspects can be turned off or on as required.
Some people see them as akin to Filtering of calls to servlets – you can intercept the call (be it HTTPRequest or a request to a method) and modify it as appropriate.
Needless to say , this is a very powerful technique , but can cause chaos if use incorrectly!