AOP@Work: Dependency injection with AspectJ and Spring
Dependency injection and aspect-oriented programming (AOP) are two key technologies that help to simplify and purify domain models and application layers in enterprise applications. Dependency injection encapsulates the details of resource and collaborator discovery, and aspects can (among other things) encapsulate the details of middleware service invocations -- for example, to provide transaction and security management. Because both dependency injection and AOP lead to simpler, more easily tested object-based applications, it is natural to want to use them together. Aspects can help to bring the power of dependency injection to a wider range of objects and services, and you can use dependency injection to configure the aspects themselves.
Read full article from AOP@Work: Dependency injection with AspectJ and Spring
No comments:
Post a Comment