Put your controllers on a diet

Have a read of this fantastic post by Yngve Bakken Nilsen on cleaning up your controllers.

Nilsen accurately points out that in the real world, controllers, even with the best of engineering intentions, can get bloated. Nilsen focuses on the scenario of your controllers containing Actions for Views and Ajax requests that will return Json data, which is a common cause of controller bloat.

The post demonstrates that you can use SignalR to isolate any Ajax calls away from your controllers. I like his approach, but its also worth noting that you can use the Asp.Net Web API to achieve similar functionality. Using the Asp.Net Web API will allow you to easily separate your controllers that return data from your controllers that return views, but it does leave the client side requesting and manipulation of the data up to you.

Great post all the same, have a read.



HTML and CSS layout frameworks

Here’s a brief list of some great HTML and CSS frameworks. I’d recommend that all sites being developed now use a good CSS layout engine – doing so will save you hours of development time in tweaking CSS just to get your layout right, and will mean that you have more time to focus on the core goal of you application. Enjoy: