The Model View Controller design pattern
When using ASP.NET Core 5 MVC, there are two types of applications that developers can build.
- The first use is to display a web user interface, using a classic client-server application model where the page is composed on the server. The result is then sent back to the client. To build this type of application, you can take advantage of Razor, which allows developers to mix C# and HTML to build rich user interfaces elegantly. From my perspective, Razor is the technology that made me embrace MVC in the first place when ASP.NET MVC 3 came out in 2011.
- The second use of MVC is to build web APIs. In a web API, the presentation (or the view) becomes a data contract instead of a user interface. The contract is defined by the expected input and output, like any API. The most significant difference is that a web API is called over the wire and acts as a remote API. Essentially, inputs and outputs are serialized data structures, usually JSON...