This post is in continuation to the series started for exploring the Enterprise library here. This post will cover in detail the newly introduced Unity Application Block.
Before we start the discussion there are few concepts that need to be understood for getting a good grasp of the Block.
Inversion of Control (IoC): It means that objects do not create other objects on which they rely to do their work. Instead, they get the objects that they need from an outside source.
Dependency Injection (DI): It means that this is done without the object intervention, usually by a framework component that passes constructor parameters and set properties.
More about DI can be found here
IOC is implemented using DI (Dependency injection).
IOC is a principle while DI is a way of implementing IOC. In DI we have four broader ways of implementing the same:
• Constructor way
• Exposing setter and getter
• Interface implementation
• Service locator
These two concepts forms the basis of this block and more details about these can be found here. (Although it takes JAVA as the language, the concept is applicable to .Net and any other language that implements these patterns).
MSDN has a great article for introduction to Unity
More about the Unity Block can be read here
Following Links contain the implementations –With Code
Link1
Link2
Hope this was useful,
Till Next We Connect….
Happy Learning.
Before we start the discussion there are few concepts that need to be understood for getting a good grasp of the Block.
Inversion of Control (IoC): It means that objects do not create other objects on which they rely to do their work. Instead, they get the objects that they need from an outside source.
Dependency Injection (DI): It means that this is done without the object intervention, usually by a framework component that passes constructor parameters and set properties.
More about DI can be found here
IOC is implemented using DI (Dependency injection).
IOC is a principle while DI is a way of implementing IOC. In DI we have four broader ways of implementing the same:
• Constructor way
• Exposing setter and getter
• Interface implementation
• Service locator
These two concepts forms the basis of this block and more details about these can be found here. (Although it takes JAVA as the language, the concept is applicable to .Net and any other language that implements these patterns).
MSDN has a great article for introduction to Unity
More about the Unity Block can be read here
Following Links contain the implementations –With Code
Link1
Link2
Hope this was useful,
Till Next We Connect….
Happy Learning.
Comments
Post a Comment