Archives

Archives / 2009 / August
  • ASP.NET MVC + MVC Contrib + Unit Testing

    One of the key benefits of the MVC (Model View Controller) pattern is a separation of concerns that leads to better testability.  Microsoft recognizes this and will automatically create a separate MS Test project when creating a new ASP.NET MVC solution.  While this gives you a nice head start, there's room for improvement.  While actions in the MVC pattern are simply methods on a class that can easily be called by MSTest (or any unit testing framework), most web applications have interactions with supporting objects such a Request (query string, form parameters, etc…), Response (cookies, content type, headers, etc…), Session, and more.  In a live environment, these objects come as a result of the HTTP request being processed by IIS.  In a test environment, you're isolating just your controllers and actions and you don't have IIS and an entire HTTP pipeline.

  • Know Your Environment!

    This is probably one of the most embarrassing things I've admitted to in public (well, maybe not – but close).  I really had to think about whether I wanted to post this.  The mentor in me said "You need to post this.  Others may run into this situation and this will help them."  But the rest of me was saying "You can't admit to that!" The mentor in me won out and I'm posting this in the hopes it may save someone else a few hours of headaches.

  • Lansing Day of .NET 2009

    Last Saturday (August 1st) was Lansing's Day of .NET.  The guys organizing this did a great job and I had a really fun time.  I gave my "Intro to ASP.NET MVC" presentation.  I got some great questions during the presentations as well as good feedback.  I did have a few questions that I wanted to follow up on: