As mentioned in Chapter 1, REST 101 and Getting Started with ASP.NET Core, the MVC pattern is all about separating concerns. It aims to give developers some guidelines to ensure that the different components of the web application are not mixed up. The following is a refresher on the MVC pattern:
- The Model seeks to define the domain model of our application. It should also be noted that models don't contain any references to our data sources and databases. They describe the entities in our app.
- The Views part presents the data in the form of HTML pages. In web services, views are not included because the model is serialized in JSON, HTML, or other similar formats. The critical point is that views should not contain logic. They are hard to test and hard to maintain. Over the past few years, views have become increasingly more powerful...