Click here to Skip to main content
15,880,725 members
Articles / Programming Languages / C#

Introducing .NET C# Inversion Of Control and Microsoft Unity Hands-On Lab

Rate me:
Please Sign up or sign in to vote.
4.09/5 (3 votes)
16 Mar 2015CPOL2 min read 7.5K   8   1
Introducing .NET C# inversion of control and Microsoft Unity hands on lab

Introduction

During the past few months, we introduced and heavily extended usage of Microsoft Unity IoC container in our code base as a part of the effort to make the code more loosely coupled.

As a result of those changes, we now even more than before also rely on Inversion Of Control or more specifically Dependency Injection.

Thus both Microsoft Unity and IoC/DI are now a crucial part of our toolbox. In order to bring everybody on our team up-to-speed as well as to have training material for newbies, we decided to create a simple training material which should help us.

After a brief discussion within the team, we agreed that the best way to handle it would be to:

  • Collect some solid resources describing the IoC/DI.
    • Martin Fowler is obviously the first choice - though differences between IoC and DI are better explained in different resources :-).
  • Provide hands-on lab project which will cover all the specifics for:
    • Inversion Of Control/Dependency injection
    • Microsoft Unity Container
    • Will serve as a self-training material
  • We will publish it on Github under MIT license.

Target Audience

.NET software developers/engineers and architects who:

  • would and are willing to learn about IoC/DI
  • are familiar IoC/DI but would learn about Microsoft Unity IoC container
  • would learn about possible challenges which usage of the MS Unity can bring

Training Materials

With my colleagues, we prepared a set of projects which allows everybody to play with all the stuff on reasonably sized projects.

A brief introduction can be found here.

Github Projects

If you are either familiar with Github or if you would use this as an opportunity to learn more about it, you can just fork/clone repositories below.

Direct Access

In the case that you do not like Git/Github, you can use direct links below to get the latest version of training projects as well as sample solutions in the form of ZIP packages:

Contributions

If you will find something which needs to be fixed or if you have some interesting sample task, just send it as a Github pull request - we accept contributions under MIT license.

Thanks to everybody who already contributed with their time either in the form of code or even advice :-).

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader NCR
Czech Republic Czech Republic
I'm software developer since 1996. I started with assembler on Intel 8051 CPUs, during years I was interested in C, C++, Sybase PowerBuilder, PHP, Sybase Anywhere Database, MSSQL server and multiplatform development.

Currently I'm developing in C++ and C# (this is my favorit and I spent some time with MCPD achievement). I'm also interested in design patterns.

Comments and Discussions

 
GeneralChanges look good Pin
voloda227-Jul-15 8:53
voloda227-Jul-15 8:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.