4.25 out of 5
4.25
260 reviews on Udemy

Single-Page Application with ASP.NET & jQuery Hands-On

Learn how to build a single-page application from start to finish with ASP.NET Web API 2, Entity Framework and jQuery.
Instructor:
Patrick God
2,249 students enrolled
English [Auto-generated]
Building a basic single-page application
Front end development with HTML, CSS and jQuery
Back end development with Web API 2, Entity Framework and SQL Server
Building a restful web service with Web API 2
Calling a restful web service with jQuery and Ajax
Entity Framework Code First Migrations
Saving data persistently with Entity Framework and SQL Server
Publishing your single-page application with Internet Information Services (IIS) on a Windows Server

Single-page applications are the way to go if you want to build state-of-the-art web applications. But if you look around, there are so many big frameworks out there that just seem to take ages to learn. Guess what, you don’t need a framework like Angular to build single-page apps. Plain JavaScript and jQuery do the trick and more importantly, you have to build a fast and reliable back end. And that’s what you will learn in this course.

The single-page app you will build in this course is a shopping list application that uses every CRUD operation with HTTP requests, calling a RESTful web service – using ASP.NET Web API 2 – which saves your data persistently in a SQL Server database.

Make yourself ready to learn some jQuery, HTML and CSS for the front end. And for the back end you will use Microsoft’s ASP.NET Web API 2 for the RESTful web service and Entity Framework with Code First Migrations to communicate with the database.

On top of that you will learn how to publish your single-page app to Internet Information Services (IIS) so that everyone can access your new single-page application.

Patrick, the author of this course, has built several web applications professionally as freelancer and employee and over the years he learned many things that you just don’t have to do to succeed in building a single-page application. This course will save you time, because you will learn the crucial and most important parts quick, so that you can get your single-page app out there in no time!

Sound’s good? Let’s get started!

What kind of single-page application will be built?

During this course you will learn how to build a complete single-page application by building a simple shopping list web application – an app that comes in quite handy for almost everybody. In this web application the user will start by creating a new shopping list. After that she will be able to add items to her list, check them off and delete them. If the user wants to access a certain shopping list, she can do so by adding the id of the list in the URL – which will be delivered by your web app, of course. That way the user is able to create the list at her computer and open it afterwards with her smartphone when she is actually in the grocery store.

What technology is used for the front end?

There are so many frameworks out there that you simply don’t need or are just too big to start learning how to build single-page applications. In this course you will learn the basics that you will also need to know when you want to understand how frameworks like Angular work. Because when you start with Angular for example, you might get results sooner or later, but maybe you won’t know what actually happens under the hood

In this hands-on course you will learn and understand the essence of single-page applications by using the following technologies:

  • HTML – You will build the application like any other website with plain old HTML.

  • CSS – To change the appearance of the application you will use a little cascading style sheets.

  • JavaScript – The foundation of every single-page application framework is JavaScript. You won’t learn the whole language, of course, but you will know how to use JavaScript for your web application.

  • jQuery – To make things a bit easier and quicker, you will use the most famous JavaScript library jQuery.

  • Ajax – With the help of jQuery and Ajax you will make the actual calls to the web service which returns data from the database.

What technology is used for the back end?

The back end or server side will be implemented with .NET technologies. You will need a RESTful web service you will call from the front end, a framework that maps your C# models or classes to database tables and of course a database. The following technologies will be used for that matter:

  • ASP.NET Web API 2 – It’s the state-of-the-art framework that helps you build HTTP services easily. With Web API 2 you will build a RESTful web service that enables the front end (or any other client you want to reach in the future) to make all CRUD (create, read, update, delete) operations by using GET, POST, PUT and DELETE HTTP requests.

  • Entity Framework – An object-relational mapping (ORM) framework that allows you to map your C# models with actual database tables. This part is crucial to save your data persistently.

  • SQL Server – At first the database you will use in this course is a file that will be generated by Visual Studio. But later on, especially when you want to publish your app to IIS and make it available to the world, you will use a SQL Server database.

So far for the server-side. Don’t worry, every technology is available for free!

What tools do I need?

The entire course uses the Microsoft stack to develop the single-page application – apart from the browser, which is Google Chrome. The following tools will be used and are totally free:

  • Visual Studio 2017 Community Edition – Most of the time you will develop the application in Visual Studio. It might help if you already know this IDE. Older versions of Visual Studio also work.

  • SQL Server Express Edition – This will be your database. The Express Edition is available for free and absolutely suits your needs.

  • SQL Server Management Studio – This application is perfect to manage your database. Don’t worry, you will learn how to use it step by step in this course.

  • Google Chrome – As mentioned above, during this course Google Chrome and its developer tools will be used to access the web application. But any other browser with developer tools available will also do the trick. This means you can also use Firefox, of course. Even Internet Explorer would work… but honestly, it’s not recommended.

  • Internet Information Services (IIS) – Not really a tool for developing the application but for publishing it. If you have no access to IIS you can still follow the steps of publishing and use the results later on with a Microsoft Hyper-V Server for free! Everything is taught in the lectures.

Why should I pay for this course although there are so many free tutorials available?

A good question! Indeed there are lots and lots of tutorials available online that might get you the information you are looking for. The advantage of this course is that you will get this one big package out-of-the-box. You will see every single step from start to finish on how to build your single-page application. Starting from the front end, then building the perfectly fitting solution for the back end and even publishing it on a server. You can’t miss anything, because you’re able to watch the whole development process. And if something is still unclear, you can always ask a question in the forums. And if you are still not happy you can get your money back – no questions asked.

Introduction, Theory & Tools

1
What you will learn

Welcome to the course! Here's an overview of all the contents you will find during the lectures.

2
What is a single-page application?

In this lecture you will learn the structure of a single-page application. What is the essence of a SPA and how do front end and back end work together?

3
Tools (Visual Studio, SQL Server & Chrome)

A short overview of the necessary tools for this course. Every product is available for free.

Building the front end - HTML, CSS & jQuery

1
Introduction
2
Create a new web application project

We start the front end by creating a new web application project in Visual Studio.

3
First some HTML & CSS

In this lecture we will start with the first view of the single-page application.

4
Some more HTML & CSS

It's time for the second view and making the HTML and CSS code for our entrance complete.

5
Let’s write some JavaScript code with jQuery

We have to add jQuery to our project before we start with the JavaScript code.

6
Create a new shopping list

It's time to create a new shopping list with JavaScript.

7
DOM inspection

Let's have a deeper look at the DOM elements of our single-page application.

8
Add items to the list
9
Checking and deleting items
10
Load a list on startup by ID

Adding the ID of a shopping list into the address bar should load it. We'll cover that in this lecture.

11
Improving usability

After this lecture, you don't have to use your mouse to create lists and add items. We will make the user's life easier.

12
Summary

Adding the Web Service - ASP.NET Web API

1
Introduction
2
Model-View-Controller pattern

A single-page application uses the Model-View-Controller pattern. In this lecture you will learn what this actually means.

3
Adding the models

We create our C# classes for shopping lists and the corresponding items.

4
Controllers & CRUD

The shopping list controller will be added in this lecture.

5
HTTP GET - Receiving a single shopping list

We write our first HTTP GET method.

6
HTTP GET - The AJAX call

It's time to communicate with the back end. We implement the HTTP request in the front end.

7
JSON serialization

Before the communication works, we have to make a little change in the Web API configuration.

8
Error handling & testing
9
HTTP POST - Create a new shopping list
10
HTTP POST - The client part
11
Networking & routing

Let's have a deeper look underneath. What happens after an HTTP request and why does Web API know what method it should use?

12
Add item controller

It's time for the shopping list items.

13
Add items to a list - another POST request
14
Add items to a list - The client part
15
HTTP PUT - Check items off
16
HTTP PUT - The client part (1)
17
HTTP PUT - The client part (2)
18
HTTP DELETE - Remove items from a list
19
HTTP DELETE - The client part
20
Summary
21
Web Service Quiz

A short quiz to test your knowledge about the web service.

Persistence with Entity Framework

1
Introduction
2
Preparations & a new controller

We add the new controllers with actions using Entity Framework.

3
Code first migration

With code first migration our models will be mapped to database tables. You learn the necessary steps in this lecture.

4
HTTP GET - Receive a shopping list from the database
5
HTTP POST - Create a shopping list
6
Manipulating the browser history

So far we could not use the back button of our browser if we wanted to create another shopping list. It's time to change that.

7
HTTP POST - Add items to a list
8
HTTP PUT - Check items off
9
HTTP DELETE - Remove items from a list
10
Summary

Publish

1
Introduction & preparation
2
Create a new database with SQL Server Management Studio

In this lecture we create a new user and a new database for the single-page application.

3
Web Deploy with Internet Information Services (IIS)

With the help of IIS Manager we will prepare our single-page application for web deployment.

4
Publish with Visual Studio

It's finally time to publish our single-page application to the web.

5
Summary

You made it! Congratulations! Have a look at all the things you have accomplished.

You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.3
4.3 out of 5
260 Ratings

Detailed Rating

Stars 5
140
Stars 4
87
Stars 3
25
Stars 2
3
Stars 1
5
e4b0570fa5ab50b321ed121f55792f6f
30-Day Money-Back Guarantee

Includes

3 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion