Summary
We spent some time putting the standard application data flow under our lens--a two-way communication pattern between the server and their clients, built upon the HTTP protocol. We acknowledged the fact that we'll mostly be dealing with JSON-serializable object such as Quizzes, so we chose to equip ourselves with a QuizViewModel
server-side class, along with a QuizController
that will actively use it to expose the data to the client.
We started building our MVC6-based Web API interface by implementing a number of methods required to create the client-side UI; we routed the requests to them using a custom set of Attribute-based routing rules, which seemed to be the best choice for our specific scenario.
While we were there, we also took the chance to add dedicated methods to get, insert, update, and delete single entries from our controllers. We did that following the RESTful conventions enforced by the Get,
Put
, Post
, Delete
methods.
In the next chapter, we will see how we can consume...