Monday, December 13, 2010

Few basic things to follow in Asp.Net MVC

After reading and writing code on Asp.Net MVC, I feel there are soo many ways we can improve our approach but few important best practices that we must follows are listed below.
  1. Security considerations
  2. Dependency Injection pattern
  3. Controllers must not interact with HttpContext, Data access classes, Configuration etc and never contain any logic
  4. Adopt PRG Pattern
  5. Verbs are important
  6. Create Extension methods of UrlHelper
  7. Avoid ViewData use ViewData.Model
  8. Html Helper extensions
  9. Always Encode
  10. Routing

No comments:

Post a Comment