IamA Microsoft ASP.NET and Web Tools Team (and Azure) on reddit

Yesterday, Scott Hanselman, Damian Edwards and  Mads Kristensen from Microsoft were at Reddit answering people's questions and future of lot of things around web/cloud development and Microsoft. The transcript was quite informative and interesting to read. If you are a web developer using any of Microsoft's technologies or…

Why Sprint.Rest client is better than RestSharp for building REST clients?

If you are interacting with any REST service then you problably have used some kind of HTTP client library. I have used RestSharp on few project. RestSharp is quite cool. You can learn more aobut RestSharp from their website. They have got an example there that talks about what you…

Fluent controller builder updates

Yesterday I blogged about a fluent controller builder that I put together. You can read about it here. While building further tests using this controller builder I soon got into trouble. My initial design catered well for simple controllers which always have default constructors. So following code workedvar documentController = Build…

Fluent controller builder for unit testing Web API controllers

This post is not about unit testing Web API controllers. A gentleman named Peter Provost has already written about this in enough details here. I actually followed his post to fix some issues with my unit tests. In order to unit test Web API controllers you need to set up…

Service Locator vs Dependency Injection

We recently introduced IoC container (Autofac) in our project. And we liked it, we liked it so much that we have started using in more than a few places now. But soon I realized a trap we are falling into, the trap of "Service Locator" pattern. Before I get into…

Analogy - Single Responsibility Principle

"Single Responsibility Principle (SRP)" is one of those software design principles which are difficult to explain to a junior developer. And subjective-ness in the implementation makes it even more difficult. I tend to use analogies from real life to explain software design principles. Sometimes they  work, other times they…