Let's Talk Software

Rants about software to keep us sane

Simple Injector in ASP.NET MVC & WebAPI

Category: Custom Software Tag: Published 2014-02-16

TLDR: Simple Injector is good, use it.

As most developers do, we use IOC in our ASP.NET MVC sites, it cleans up the code and allows for better testing.  If you're not familiar with check out this article on Dependency Injection.

One of the longest running IOC libraries is Structure Map, which we originally choose because of it maturity and stability.  After running with this for 4 (ish) years (with complete success), I started to look into different possibilities for my Injector library.  Knowing that Structure Map has every feature you would ever want leads me to think there might be code that is affecting performance.  I only use IOC for a Service Layer & Repository Layer injection and its very simple at that, so I really don’t need all of the bells and whistles. I would rather have less features and better performance.

Dependency Injection in .NET has matured over the years and we now have options upon options.  After researching and reading many different perspectives and gauging community participation, Simple Injector was to be my next experiment.  The following is how I set it up in a new MVC project. (fyi this is all with Visual Studio 2013)

Read more

Four Keys to Better Software

Category: Custom Software Tag: #Agile #Custom Software Published 2013-10-16

Building custom software can be a big undertaking depending on the requirements of the project. Many times businesses begin building software only to have the project fail because the process was not designed or managed properly. Here are 4 key items you should strive towards when starting a software project to get better software.

Read more