Many Java developers have embraced the non-intrusive style and flexibility of aspect-oriented programming (AOP), particularly when it comes to building highly decoupled and extensible enterprise systems. In this article, you'll see for yourself how one of AOP's functional design concepts -- static crosscutting -- can turn what might be a tangled mass of tightly coupled code into a powerful, extensible enterprise application.

Aspect orientation is a powerful principle to draw upon during the fast-paced cycle of transforming business requirements into software features. By shifting the primary design focus away from the traditional hierarchical nature of object-oriented programming (OOP), AOP and design principles allow software architects to contemplate design in a horizontal, yet complementary, manner to object orientation.

In this article, you'll learn how to implement one of the most underused features of AOP. Crosscutting is a relatively simple design and programming technique that packs a hearty punch, particularly when it comes to building loosely coupled, extensible enterprise systems. While dynamic crosscutting -- in which the runtime behavior of objects can be altered -- is considered one of the foundations of AOP, static crosscutting is a far less known technique. In this article, I'll attempt to remedy that. I'll start with an overview of both dynamic and static crosscutting, and then move quickly into an implementation scenario that demonstrates the latter technique. You'll see for yourself how handily static crosscutting meets one of the most common enterprise challenges: how to keep an application's codebase flexible while leveraging third-party code.

AOP banishes the tight-coupling blues