Friday, June 3, 2011

Choosing AsyncController vs Controller in Asp.Net mvc

Hi All,
I hope last post was really handy to those who want to implement AsyncController in Asp.Net mvc, today lets see what are all the parameters helps in deciding Synchronous and Asynchronous Controller.

1) When you have very simple method - Then prefer Controller class than AsyncController
2) When the method is more oriented towards CPU intensive task - prefer Controller class
3) When the method is more oriented towards I/O or network intensive task - prefere AsyncController class
4) When you prefer simplicity than efficiency prefere Controller class
5) When you perefer maintainability prefer Controller class.
6) When you want your request thread to be Non blocked - prefere AsyncController

I hope this helps you to make better decission duriing your design phase..


No comments: