Intro
This article is a follow-up to its predecessor Introduction
to IOC AKA IOC Part 1, basically I am have chosen a dependency injection
container that I have been acquainted with for some time now and I will be
going in deep on how it works and how we can use it in a real life application.
First – Know Ninject
It is a dependency injection container that is used to separate
application parts to be more loosely coupled, highly maintainable and then weirs
them back with each other flexibly, so in Short it does IOC “you can check the
previous article if you need more of understanding on what IOC really is here
is the link http://mohammedezzatawad.blogspot.com/2012/08/ioc-inversion-of-control-principle.html”
Second – How it works
So that’s a good and a very important thing you need to know
before using any framework, how does it work and to be precise the question you
need to ask yourself is what is going on under the hood?, well as most of the Dependency
Injection containers it is basically using reflection to analyze the types it
is working with and to weir object implementations at runtime. It also uses the
generation system the one that was introduced in CLR 2 AKA Microsoft dynamics
which allows you to create types at runtime.
Third - Lets Use Ninject
For a start lets know where you can get the framework, you
can either download it from their official site http://www.ninject.org/download.html
or you can download it using nugget.
Following there will be a blog post on how to use Ninject in
a testing application
Comments
Post a Comment