Results 1 to 4 of 4

Thread: Relationship between IoC and AOP

  1. #1
    Join Date
    Aug 2004
    Location
    Michigan, U.S.A.
    Posts
    3

    Default Relationship between IoC and AOP

    Hello,

    I was wondering whether or not there is a relationship between IoC and AOP. It seems like dependency injection can be achieved through introductions in AOP, but I am not competent enough in AOP to try it out. Or, are they completely different principles? Does anyone have any information regarding this topic?

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    I think they're best considered as separate principles. Both, however, in combination, can help to keep framework dependencies out of application code--one of the major goals of Spring.

    Spring uses IoC to configure AOP framework objects such as pointcuts and interceptors. E.g. MethodInterceptors are configurable themselves by Dependency Injection.

    Spring uses AOP primarily to deliver declarative services such as transaction management. However it's AOP framework allows the authoring and use of sophisticated custom aspects, as described in the Reference Manual.

    There's a lot of material about IoC and AOP and how they relate in "J2EE without EJB".

  3. #3
    Join Date
    Aug 2004
    Location
    Michigan, U.S.A.
    Posts
    3

    Default Re:

    Interesting, thanks for the reply. "J2EE without EJB" sounds like a really informative book.

  4. #4
    Join Date
    Aug 2004
    Location
    Germany, Magdeburg
    Posts
    279

    Default

    Read it and have fun. I read the book in one session. It provides much value. You will love it!

    For further reading about AOP you may read 'AspectJ in Action'. I think the book is one of the most complete and most easy to follow introductions to AOP in general and AspectJ in special. It is a really mind-opener.

    I am not using AspectJ that often, since the Eclipse plugin isn't that complete today. I really got that feeling they screwed us with Lancaster. :-(


    By the way:

    Thanks Rod for sharing your insides! The book filled some holes and also made me think about certain problems. Many thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •