Building Serverless Applications in Azure

Over the years serverless has become a buzzword, but what does it look like to build via a serverless architecture? This course will teach you how to build serverless applications in Azure, from implementing web hosting to deployment and monitoring.
Course info
Rating
(29)
Level
Beginner
Updated
Aug 15, 2017
Duration
4h 7m
Table of contents
Course Overview
Going Serverless
Serving Static Web Content Without a Web Server
Building APIs Rapidly with Azure Functions
Storing Schemaless Data with Azure Table Storage
Securing Your Application with Azure AD B2C
Automating Deployment with Azure Resource Manager
Monitoring with Application Insights
Description
Course info
Rating
(29)
Level
Beginner
Updated
Aug 15, 2017
Duration
4h 7m
Description

The serverless architectural style allows you to rapidly create scalable and cost-effective applications without the overhead of managing servers yourself. In this course, Building Serverless Applications in Azure, you'll learn about many powerful services in Azure that facilitate the implementation of a serverless architecture. First, you'll dive into a step-by-step of how a serverless application is created and how to host static web content. Next, you'll explore how to create a custom back-end code, secure the application, and how to access data. Finally, you'll discover how to automate deployment and monitor it in production. When you're finished with this course, you'll be able to apply the serverless architectural style to your own cloud applications in Azure.

About the author
About the author

Mark Heath is a software developer based in Southampton, England, working for NICE Systems as a software architect creating cloud based digital evidence management systems for the police. He is the creator of NAudio, an open source audio framework for .NET.

More from the author
Azure Functions Fundamentals
Intermediate
3h 40m
Apr 25, 2019
More courses by Mark Heath
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi, my name's Mark Heath, and welcome to my course, Building Serverless Applications in Azure. I'm a Microsoft MVP, and I work as a software architect and senior developer at NICE Systems. Over the past couple of years, serverless has become a bit of a buzz word, but what does it actually look like to build your applications with a serverless architecture? So in this course, we're actually going to build a serverless application, so that you can see for yourself what's involved, and what the benefits are of using this architectural style. We'll start off by seeing how we can host our static web content with Azure Blob storage, and then we'll see how Azure functions, in particular is a really great fit for serverless architectures. We'll discuss the tricky issue of what source of database you should choose for your serverless application, and compare the benefits of several options that Azure offers us, including SQL Database, Cosmos DB, and Table storage. Of course security is critical to all modern applications, so we'll see how Azure Active Directory B2c can allow us to support user management and login, as well as securing the calls to our backend functions. By the end of this course, you'll have a good idea of what's involved in creating serverless applications in Azure, and you'll know how to automate their deployment, and monitor them in production. And even if you're new to Azure, you'll be able to follow along with this course. The Azure functions that we create are going to use C#, but the platform supports several alternative languages, so you don't need to know C# in order to build your own serverless applications in Azure. So I hope you'll join me on this journey to learn about serverless architectures on the Azure platform with the Building Serverless Applications in Azure course at Pluralsight.

Going Serverless
Hi, Mark Heath here, and welcome to this Building Serverless Applications in Azure course on Pluralsight. Let's get started by talking about what this course is about. So the purpose of this course is to demonstrate how you can get started building applications using a serverless architectural style, and we'll do so by actually creating a very simple serverless application so you can see step by step what's involved. And we'll be building it on the Microsoft Azure cloud computing platform, and so as we go along, we'll be making use of several features available in Azure. Now who's this course for? Well, if you're a software architect, or maybe you're just thinking about what architecture to use for your next project, and you're interested in finding out what a serverless architecture might actually look like in practice, then this course will help to give you a feel for what's actually involved. Now if you're a. NET developer, and you've used Azure before, then you're going to feel right at home following along with this course, but if not, don't worry, the principals of serverless architectures can actually be applied in many different programming languages, and serverless applications can run on many different cloud providers. So what you'll learn in this course can easily be translated into your language and platform of choice. In fact, we're going to see that that's one of the strengths of serverless, it gives us complete freedom to use the technologies and services that make most sense for you. So let's get started by answering the most obvious first question, what exactly do we mean by serverless architectures?

Serving Static Web Content Without a Web Server
Hi, Mark Heath here, and in this module, we're going to talk about how we can serve static web content in our serverless application hosted in Azure, without necessarily having to have a traditional web server. So we're going to start off by talking about why in serverless applications it's very common to implement your frontend as a single-page application or SPA. And with a SPA, our HTML content isn't dynamically generated server side, instead it's just static HTML, CSS, and JavaScript assets that we need to serve up. And so we'll look at two different ways we can approach this in Azure. We can serve them directly from Blob storage, which is a very serverless way of approaching the problem, but we'll also contrast that with using Azure's Service, which although isn't as pure a serverless option as serving it directly from Blob storage is, it does offer a number of benefits. And so what we'll do is we'll start creating our Who's Playing demo application, and we'll see both of these techniques in action to host our static web content.

Building APIs Rapidly with Azure Functions
Hi, Mark Heath here again, and in this module, we're going to be looking at how we can use Azure Functions to allow us to rapidly create backend APIs for our serverless applications. And so in this module, we'll start off with a quick overview of what Azure Functions is, and explain how it fits in to a serverless architecture. And then we'll look at the functions that our Who's Playing demo application needs. We're going to make three functions in this module for the purposes of demonstration. There'll be one function to allow the event organizer to create a new event, and this will use messages in a queue to trigger another function that sends an email to each participant with a link allowing them to respond. And then we'll also need a function that returns details of an event for the web page to make use of. And so in this module, we'll start to build these functions to quickly turn our prototype into something that's almost ready to be used.

Storing Schemaless Data with Azure Table Storage
Hi, Mark Heath here, and in his module, we'll be talking about how we can store the data for our serverless application. We'll discuss several different approaches, but the one that we're going to demonstrate is storing schemaless data in Azure Table storage. So in this module, we're going to start off by discussing two different options we have for how to structure our data. We're going to compare a more traditional relational database approach, to using a schemaless document DB, or sometimes called noSQL approach. And then we'll look in particular at a few of the database options that Azure has to offer, and these include Azure SQL Database, Azure Cosmos DB, and Azure Table storage, and we'll see the different benefits and limitations of each approach. And then finally we're going to upgrade some of the functions that we created in the last module to actually store information about the events and responses of our Who's Playing application in a database, and this'll mean that we can complete the first phase of building out our minimum viable product. We'll actually have a website that you can use to see who's responded to an event and change your own response. So let's get started.

Securing Your Application with Azure AD B2C
In this module, we're going to talk about how we can secure our serverless applications running in Azure, and I'll be introducing Azure Active Directory Business to Consumer as a way that we can achieve this. Now in most serverless applications, we need to know who the user of our application is, and so we need some kind of authentication, a way to allow them to login, so we can discover their identity. And then we can use their identity to make authorization decisions, what is this user actually allowed to do. And so in this module, we're going to discuss what a serverless approach to authentication might look like. We'll look at the concept of using third-party identity providers, and we'll focus in particular on Azure Active Directory Business to Consumer, which will be a good fit for our Who's Playing demo application. And we'll see how AD B2C, as it's often abbreviated to, can issue secure access tokens that the client application can pass through to our backend code that's running in Azure Functions. And then we can verify whether the action being requested is authorized or not by using information contained within that token. And so in this module, we'll be updating our Who's Playing demo application, and I'm going to show a very quick and easy way to enable AD B2C for our demo application without us needing to write a large amount of custom code, and that's by taking advantage of a capability of Azure Functions called Easy Auth. So let's get started.

Automating Deployment with Azure Resource Manager
Hi, Mark Heath here, and in this module, we're going to learn about how we can use the power of Azure Resource Manager to automate the deployment of our serverless applications. Now so far in this course, we've been using the Azure portal directly to manually create the resources we need for our serverless applications, and we've created storage accounts, Azure Function apps, and Active Directory B2C tenants. We've even used the portal to write our Azure Functions code. Now this approach is all well good for prototyping, but in a real-world application, we want to automate deployment, we want to repeatedly and reliably set up all the resources we need for our application, and if we can automate deployment, it not only simplifies releasing to production, but it also allows us to create test deployments of our application. Also we need to be able to automate upgrading to new versions of our application. So for example, we might have new versions of our Azure Functions, or want to change the contents of our static web assets, and that too should be automatable. So in this module, I'm going to introduce you to a powerful technology called Azure Resource Manager templates, which allows us to programmatically define the resources that our serverless application needs to make use of, and it uses JSON to do that. And then we can use PowerShell to automate the deployment of our resource template. And we'll also see how we can set up automatic deployment of our Azure Functions code from the Git repository, and we'll use a tool called AzCopy to automate updating the contents of our static website in Blob storage.