Category Archives: ASP.NET MVC

Automatic page element focus in MVC

It’s really annoying when a web page doesn’t have focus set to an element on the page by default. Especially for things you visit regularly like login pages. It shows no effort went into the design or UX.  So here’s … Continue reading

Posted in ASP.NET MVC, Javascript, jQuery

Keeping domain models and view models separate with ASP.NET MVC and WCF

The location, role and responsibility of objects within a software system is a common topic in the forums with plenty of disagreement about what is and isn’t correct. But first, let’s just define some commonly found objects and their roles: … Continue reading

Posted in Architecture, ASP.NET MVC, WCF

Unit-testing ASP.NET MVC ViewModel validation

One of the biggest advantages ASP.NET MVC has over ASP.NET Web Forms is the ability to unit-test your views (UI), controllers (HTTP request handlers) and view models (data) easily thanks to the separation of concerns that the MVC pattern gives … Continue reading

Posted in ASP.NET MVC, NUnit, TDD | 3 Comments

ASP.NET ViewState is dead

UPDATE: I have left this article here for historical reasons but you should now consider ASP.NET Web Forms as obsolete due to it not supporting unit-testing and the amount of data that is passed between client and server. I recommend … Continue reading

Posted in ASP.NET MVC, ASP.NET Web Forms | Leave a comment