There have been a lot of JavaScript frameworks fighting for the affections of web developers worldwide, and a few of them have caught on. In the next few sections, we will learn about AngularJS and KnockoutJS. But first, let's focus on using some basic JavaScript to read and write data to/from your Web API.
The example for this section will use the following files:
HTML file with client-side JavaScript to use the Web API
Server-side controller class
Server-side model class
The following screenshot shows the preceding three files that we need:
We will be dealing with these files in the example in this chapter:
The static HTML file is in the
wwwroot
location of the web applicationThe controller is in the
Controllers
folder (by convention)The patient model is in the
Models
folder (by convention)
To visualize what the application looks like, see the following screenshot of the Patient Records App: