Understanding the MVC Pattern
The ASP.NET MVC application template works to separate your code and markup into three distinct layers: the model represents your application domain objects (or data), the view is how you render data to the user and request their input, and the controller is where you write logic to handle user requests and combine model data with the right view when responding to users. Putting code into layers has been a good practice for many years. Layered separation increases opportunities for code reuse, makes your code more understandable, and supports test-driven development. The ASP.NET MVC framework requires this separation. Figure 17.16 shows an illustration of the ASP.NET MVC implementation.
Get Microsoft Visual Studio 2015 Unleashed, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.