ASP.NET, gives web application developers access to the.NET Framework. You can build applications on ASP.NET in the Google Cloud. In this module, we'll show you how. In this module, we'll look at how to create a Web application using Microsoft's ASP.NET MVC Framework on Google Cloud Platform computer. In module two of this class, we looked at how to provision our Microsoft Windows Server on Microsoft's SQL Server Infrastructure. We've got some active directory domain controller, a web server running Microsoft's Instant Information Services and a pair of Microsoft SQL Server instances running in an always on availability group. Now it's time to build an application. We'll be coding a simple ASP.NET MVC application using C#. Now if you're a developer working with Microsoft technologies, you'll know that this is a great way to build a web application. We'll use Microsoft Visual Studio as our Integrated Development Environment. We'll publish our application to Internet Information Services using Google Cloud tools for Visual Studio. If you're not a developer just be aware that a web application to live its application functionality using a standard web browser. The browser accesses the application as a URL and the server responds with dynamic outputs generated from data. In our case, from data stored in Microsoft SQL Server. ASP.NET MVC makes use of a widely used application architecture called Model View Controller. This architecture is frequently used when writing web applications. It allows for a clean separation of concerns between modeling, manipulating, and displaying data. Here's the first participant of our MVC application - the Model. In an MVC application, the model's responsibility is to represent the application data and business rules. In this example, we've created the model class using C# code contact. We used this to build an address book application. We can see that the contact class, defines a set of properties, and in our application we'll use this class to create contact objects. Each contacts will have its own name, email address, and cell phone number. Of course, in a more full featured application, the contacts would have many more characteristics, but then it wouldn't fit on a single slide. In addition, our contact has a numeric ID, we'll make use of Microsoft Entity Framework to simplify integration with Microsoft SQL Server. The idea will be used to enable us to map each contact object to a record in a database table. The next plan MVC is the view. The view's responsibility is to present model data to the user and also to display forms that allow users to add to data to be collected by the application. We've written our view, using a template in a language which code razor. A razor file is easy to understand, if you know HTML as the template is written with HTML marker an embedded code. Our example shows a fragment of a razor file with C# code, will have a.cshtml extension as it consists of C# code and HTML marker. You'll notice in our example, that this template makes use of the dt and dd HTML elements, which are used with a description list elements to represent terms and descriptions. Web designers would style these elements using cascading style sheets to present our address book contacts to users. As well as an HTML skeleton, arrays of filing clips embedded C# code in the form of a template. There are lots of different ways of doing this. In our example, we've made use of a helper. This used to take the properties from model objects and embed the model properties into the HTML outputs, that sent back from the server to the client. The final member in an MVC triad is the controller. The controller receives the request from the user's browser, and is responsible for coordinating a response back to the browser. In ASP.NET MVC, controllers are classes written in C# code. The class contains a set of methods. Each one of these is called an action method. There's a default convention that's used to map URLs against the class name and the action method. In our example, imagine this our application was running on a server located at http://michael.com. The ContactsController and Details action method, will be used to handle requests from a browser using that base URL, followed by slash contacts, the name of the controller, then slash details, the name of the action method. This will then be followed by a number that corresponds to the ID of one of our contact objects or one of our contact records in the database table. In the body of the details method in our controller, we've written code using Microsoft Entity Framework to get a record from SQL Server and return it as a contact object. The controller passes this object to the corresponding view, which formats it and returns it to the user's browser. This slide shows just how little code is required to connect a model to a database using Microsoft Entity Framework. As a developer, all you have to do is inherit from the DbContext base class and other property using the generic DbSet collection of your model class. Entity framework will automatically create a database with a compatible scheme of your model class if it doesn't already exist. And then show that your model objects can be created, retrieved, updated, and deleted in that database. Already mentioned that Visual Studio offers a great developer experience for coding ASP.NET MVC applications. Simply use the Web Project template and select the MVC option. You'll be able to automatically integrate your user's existing windows logins, to get a seamless login experience against your new enterprise web application. One nice thing about writing ASP.NET MVC Applications with Visual Studio is that the development environment will scafold nearly all of the MVC code for us. All we have to do is to code the model and supply a class that knows how to map this model to the database for the Entity Framework. Once you finish writing your code, then you'll also find it straightforward to publish your application to Internet Information Services using Visual Studios Integrated web deploy. And Google have made it even easier to deploy to computer engines, virtual machines for Visual Studio using Google Cloud tools.