O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

FIGURE 17.16 An ASP.NET ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required