With the release of Nuget, the one thing that has been made easier is the setup time of projects. I thought i'd do a small post on the setup procedure I follow for a tutorial project that i'm busy with on ASP.NET MVC 3 (Razor).
Once you have installed ASP.NET MVC 3 and Nuget, let's add the libraries that we are going to be using for this project.
- As a dependency injector for MVC I tend to use Ninject (you can use one of your liking). Open up the Package Manager Console that was installed as a video studio addon when you installed nuget.
By opening up the Package Manager Console inside of Visual Studio, once you have created your project, you can pretty much copy and paste the big black board text from the nuget.org package information page.
Dependency Injection from Wikipedia
Dependency injection (DI) in object-oriented computer programming is a technique that indicates to a part of a program which other parts it can use, i.e. to supply an external dependency, or reference, to a software component. More simply, dependency injection is the passing or setting of dependencies into a software component. In technical terms, it is a design pattern that separates behavior from dependency resolution, thus decoupling highly dependent components. Instead of components having to request dependencies, they are given, or injected, into the component
- Now we need somewhere to store the data, for our tutorial, we are going to be using Entity Framework. Same story for what we did with Ninject.
This concludes the first part of our tutorial. In the next tutorial, we will cover what these 2 libraries gives us and what we are going to use them for.Read More