Chapter 1. Introduction to MVC
MVC is an architecture pattern that stands for Model-View-Controller. My definition of MVC is summarized as follows:
- The model manages the data for the application. Each model commonly represents one or more tables within a database.
- The view contains the visual representation of the application. In websites, this is commonly achieved with HTML, CSS, and JavaScript.
- The controller is the middleman between the model and the view. A typical controller would request data from the model and pass it to the view for use in displaying the data. When saving data, it would be the opposite. It would receive data from the view and pass it to the model to save it.
ASP.NET MVC 5 is a framework that implements the Model-View-Controller (MVC) architecture pattern.
The term MVC will be mentioned repeatedly throughout this book. In most scenarios, I will be referring to the MVC framework that implements the MVC pattern.
Creating Your First Project
Visual Studio offers a variety of templates that help you start your project. This book will focus on two specific templates: MVC and Web API.
The MVC template allows the creation of web applications that use the Model-View-Controller architecture pattern. This will be discussed in more detail throughout this book.
The Web API template allows for the creation of RESTful web applications. REST is another type of software architecture pattern that is commonly used for creating APIs or client-server applications. Web ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access