Getting Started with the Code Camper SPA Hi, my name is John Papa with Pluralsight. I'm very excited to share with you the Building Single Page Apps with HTML5, APS. NET Web API, Knockout and jQuery course. Quite a mouthful of a title but it covers quite a lot. So why am I so excited? Well, this is my favorite type of course because I get to share not just one or two specific technologies, but rather, a whole lot of great web technologies to create what is commonly called a Single Page App, also known as a SPA, that works across multiple devices and screen sizes. And along the way in this course, I'm going to dissect the apps' data layer, the web service layer, and the presentation layer and explain how it all works together, why it works, and how the choices are made to pull in all the technologies. By the end of this course, you'll be armed with the knowledge to build a Single Page App and enhance it to suit your needs.
Technologies and Patterns of the Code Camper SPA In the previous module, we talked about what a SPA is. And we took a walk through an example of the SPA, the Code Camper Application that I'll be using throughout this course. We also talked about the different client technologies that we're using inside the Code Camper SPA. In this module, we're going to take a closer look at this solution structure of the Code Camper SPA, walk through how to create the projects and the solution from scratch. And then demonstrate a couple of tools and key resources that you can take advantage of, that I'll be demonstrating. Such as some responsive design and mobility features. So let's begin.
Data Models, Entity Framework, and Data Patterns In the previous module, we took a look at the different technologies that you need to get started with the Code Camper application to build the SPA. In this section, we're going to specifically look at the data layer and how we build our models using ORM like the Entity Framework and some of the data patterns that we can use in building a data layer. We'll start up by talking about the different technologies that we use inside the data layer itself and then walk through how we create models, our models are our containers for our data. Then we'll go through the Entity Framework and its DbContext using the Entity Framework Code First and the different patterns that it provides. And we'll set that up and show how you can use that to save and retrieve data. And then we're going to walk through two patterns that we're going to use inside of our data layer. One is called the Repository pattern and the other is the Unit of Work pattern. And these patterns go hand in hand and they've been out there for many years and work many different technologies. We're going to use these to help abstract and simplify our data access to the Entity Framework and keep it decoupled from our web service layer. So with that, let's dive in.
Surfacing JSON Data with ASP.NET Web API When building any application, getting the data from the server to the client then being able to pass it back from the client to the server, is really important. So in this module, we're going to take a look at how we can take advantage of the ASP. NET Web API to handle serving our data from the server up to the client and then back. And specifically, we're going to look at how we can do with JSON data. In the previous module, we looked at how we can create the data layer using the unit of work, repository, and entity framework code first. This section will look at how we can interface with that layer using the Web API and then communicate back up to the client. So the Web API is going to be the glue between our client code and our data layer. So we're taking a look at why we'd want to use the Web API, it's always good to start there. Next up, we'll be setting up the routes for the Web API controllers. The routes are important because they direct the traffic to and from the client to the server and back. They will be creating some API controllers of couple of different kinds and flavors, some of that handle request very simply, and others, they have a little more customized actions to them. And then, we'll be doing some customizations to the controllers so they can serve the data back the way you want to. Doing things like validation, or handling JSON requests. And after writing all of this code, it's good to show how we can test it. So, we take in a look at some different frameworks that you can use to test your Web API controllers. And with that, let's dive right in.