Archive for August 28th, 2009

What is IoC Container

August 28, 2009

The business logic layer can be developed without coupling it with any other layers by using IoC provided by the Spring Framework. The IoC container is the core component of the framework. IoC lets the developer implement the business logic as Plain Old Java Objects (POJO) and wire them up so that they can be injected or called at runtime. This approach lets you avoid specifying the business objects as dependencies at compile time.


What is IoC

August 28, 2009

IoC stands for Inversion-of-Control. IoC is a concept,and an associated set of programming techniques, in which the control flow is inverted compared to the traditional approach. “In other words, the framework calls the procedures created by the programmer, rather than programmer calling the procedures or methods of the framework. IoC is based on the “Hollywood Principle.” The Hollywood Principle says “Don’t call me, I will call you.”

IoC is used to ‘inject’ dependencies at runtime. When one uses this pattern, the dependencies of a particular object are not satisfied at compile time. Instead, the framework provides the required dependencies to the object at runtime. Thus, this pattern releases the programmer from the chore of providing all the dependencies at compile time.

What is AOP

August 28, 2009

AOP stands for “aspect-oriented programming”. AOP is first introduced by Gregor Kickzales in the year 1996. AOP provides the ability to implement crosscutting logic- that is, logic that applies to many parts of your application in a single place and to have that logic applied across your application.

There are two kinds of AOP implementation. Static AOP, such as AspectJ provides a compile time solution for building AOP based logic and adding it to the application.

Dynamic AOP such as Spring, allows crosscutting logic to be applied arbitrary to any other code at runtime. it is basically used by Transaction Management.