In this post, we will explore some important tips while working on MVC. Note that while jotting down these tips, MVC4 was used. In latest versions like MVC 5 or MVC 6. These tips are useful while working hands on MVC. Here are some important tips for ASP.NET MVC:-
- Disable Request Validation
- Cache Your Data
- Isolate Data Access Logic from the Controller
- Using a Master View Model
- Use Strongly Typed Models
- Use Data Annotations for Validation
- Take Advantage of Model Binding
- Cache Pages that Contain Shared Data or are Public and don't Require Authorization
- Use Extension Methods
- Take Advantage of Model Binding