Slashdot Mirror


Dependency Injection with AspectJ and Spring

An anonymous reader writes "IBM DeveloperWorks has an interesting article about the complementary aspects of dependency injection and aspect-oriented programming. Adrian Colyer, Chief scientist of Interface21, examines how to combine these two techniques to 'facilitate advanced dependency injection scenarios.' From the article: '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'"

3 of 48 comments (clear)

  1. Good News! by maxcray · · Score: 5, Funny

    This is good news! I have long wanted to "encapsulate the details of middleware service invocations".

  2. My brain hurts... by advocate_one · · Score: 4, Funny
    honestly, does anyone actually understand what the heck they're going on about here???
    'facilitate advanced dependency injection scenarios.' [...]'Dependency injection encapsulates the details of resource and collaborator discovery, and aspects can (among other things) encapsulate the details of middleware service invocations'
    --
    Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
    1. Re:My brain hurts... by Kj0n · · Score: 5, Informative

      I understand it, but only because I already know this stuff.

      A better article to start with is: Inversion of Control Containers and the Dependency Injection pattern, by Martin Fowler. It's older than the one mentioned in the story, but still relevant.