BenefitsWhy would you want to add another tool in the already-complex development environment of your team? The ultimate reason is: it will reduce development and maintenance cost of your applications. Let's see how. Less of Lines of CodeEvery line of code is a source of complexity and a potential source of problem. Every line of code costs money. Therefore, every line of code that does not contribute directly to the core concern of the program should be considered with great attention. Non-functional requirements like transaction management, tracing, security, and exception handling, rarely add business value to the program. They are nevertheless important, since unreliable programs are of no business value at all. As they are typically implemented by the repetition of the same pattern for the dozens and dozens of methods to which they apply, non-functional requirements generally result in numerous lines of codes. With aspect-oriented programming, you can address non-functional requirements declaratively and simply remove these bad and expensive lines from your code. Better DesignThe problem with non-functional requirements is that their implementation is mangled in all methods implementing functional requirements. This severely violates the established principle of separation of concerns. With aspect-oriented programming, you could:
Automate Pattern ImplementationImplementation Patterns are best practices learned by the community through experience. Patterns are often formalized in natural language as 'recipes' giving a solution to a given problem. Aspect-oriented programming (AOP) makes it possible to encapsulate some of the best practices into executable code: instead of suggesting how to implement correctly exception handling, you may make a custom attribute out of it, and let it available to the team. |

