• Animal
  • Auto
  • Computers
  • Education
  • Finance
  • Health
  • Math
  • Mobiles
  • Programming
  • Science
  • Sports
  • Technology
  • Terms
  • Web


  • Difference between IOC and AOP in Spring

    IOC vs AOP

    IOC and AOP are concepts in Spring Framework. IOC is Inversion of Control or Dependency Injection and AOP is Aspect-Oriented Programming. Both are different concepts which are part of Spring framework.

    Read below point-wise Difference between IOC and AOP in Spring

    – Check out Difference Between Springs and Struts

    IOC in Spring

    Inversion of Control

    • IOC means Inversion of Control.
    • Inversion of Control a.k.a. Dependency Injection (DI) is mainly to do with maintaining loose coupling and managing the dependencies between the components of an application.
    • Dependency Injection is a design pattern that strives to reduce explicit dependencies between components.
    • IOC is good when you have a dependency on a component and you don’t know to which implementation.

    AOP in Spring

    Aspect-Oriented Programming

    • AOP means Aspect-Oriented Programming.
    • It is mainly to do with Abstracting functionality that applies across the application in all components of your application.
    • Aspect-oriented programming allows you to specify an implementation pattern (using source code, not natural language) into a so-called aspect
    • AOP is used when you need to apply a common behaviour to all components. Here there is no necessarily dependency required.

    Similarties between IOC and AOP in Spring

    1. Both achieve loose coupling.
    2. Both achieve seperation of business logic with IOC and AOP code

    These are the few differences between IOC and AOP in Spring.

    Posted under: Programming
    1957 readers are already subscribed to this blog! Why don't you be one of them? Subscribe to this blog via your favorite RSS feed reader or by entering your email address on the form below:








    Leave a Reply

    page counter
    NiharsWorld on Twitter NiharsWorld on Facebook NiharsWorld RSS Feed