Other than logging, and transaction management what are some practical applications of AOP?
aop
Solution
Ask any support person: logging is not a good application of AOP. They don't care what method is being called inside the app. They care about the significant actions the app is performing and need that information to be presented in a way they understand. To create decent logs, you have to treat logging as another user-interface to the app and design it accordingly.
It would be more accurate to say that AOP can be used to implement tracing.
And I'm not convinced it's useful for transaction management either. I've found plain OO delegation cleanly separates transaction management and business logic.
Still, good question! I've found that arguments for AOP fall into two camps:
- Bodging changes into poorly designed code without having to clean up the poor design.
- Working around poor development tools, such as weaving tracing into an app because the environment does not have good support for tracing or debugging.
Problem
I understand the principles but i have a hard time seeing where the practical applications are outside of a few. Please enlighten me ;)