Ops / IT Pro
The course is part of these learning paths
There's a lot of effort that goes into keeping our applications available, and secure. That's why so many cloud vendors offer platforms for hosting web-based applications. If you're building web apps, APIs, mobile backends, or business processes then you should consider looking into App Service! App Service has a lot of functionality. It meets compliance standards from around the world, it's highly scalable, it supports multiple languages and makes it easy to get your code deployed.
This Getting Started with Azure App Service course it's basically an intro, but for developers and IT Pros. In this course, you'll learn about the features of App Service at a high level as well as for each component. Then you'll learn about each of the 4 components of App Service through some demos. If you're a developer or IT Pro working with Azure, but new to App Service, this course is for you.
This course will help get you up-to-speed on App Service so that you can start developing / managing apps.
Getting Started With Azure App Service: What You'll Learn
|Lecture||What you'll learn|
|Course Intro||What to expect from this course|
|App Service Overview||A high-level overview of App Service|
|Web, Mobile, API App Overview||A high-level overview of Web, Mobile, API Apps|
|Logic App Overview||A high-level overview of Logic Apps|
|Mobile Apps: Easy Tables||How to use Easy Tables as a "no-code" option|
|Mobile Apps: Client||Running the client code from an iOS simulator|
|Mobile Apps: .NET Backend||Using a .NET backend|
|Mobile Apps: Auth||Using authentication with App Service|
|API Apps||Creating API Apps|
|Logic Apps||Automating business processes|
|Web Apps||Authentication and remote debugging|
|Deployments||Deployment slots and GitHub based deployments|
|Monitoring and Logging||Monitoring and logging options|
|Scaling||Scaling up and out|
|Next Steps||What's next|
Welcome back! In this lesson we’re going to see how mobile apps work by using the todo list mobile app and the Node.js backend with Easy Tables.
Remember, Mobile Apps in App Service are really about the back-end database and API. So consider mobile apps as a shared mobile backend for all of your client applications.
When it comes to code, this is the type of the thing that you’ll learn best by doing, so I recommend that try implementing this for yourself.
Let’s start out in the portal and click on App Services, then click add, and search for “Mobile Apps Quickstart.”
If you wrote out “Mobile Apps Quickstart” fully, then you should only see one result; so click that and then click the create button.
Once the creation blade opens we’ll have to supply a name, and it’ll need to be globally unique. Then you’ll need a resource group, and I’ll just add “rg” to the end of the name, and that’ll be my resource group’s name.
And you can see that there’s an App Service Plan here that’s already defined. If you want yours to be part of another App Service plan, then you could change that here. When you have multiple Apps in the same App Service plan, then they’ll share resources. So if you have an App Service Plan that is using 3 S1 instances, and both your web and mobile apps are using the same Service Plan, then they’ll use the same 3 S1 instances. This tends to save money since most apps aren’t using all of their resources at any given moment.
When you do this for yourself I recommend enabling Application Insights, even if you’re not going to use this app in production. It’ll help you understand how the application is performing, and help to show how you could improve your code.
Alright, time to create this by clicking create at the bottom. This can take a minute or two, so I’m going to jump forward to when it’s complete.
Welcome back! Notice all of these tiles on the side here, this is because we selected the “Quickstart” option. The reason I wanted to use this is so that if you’re new to Mobile Apps in App Services, you’d have this nice at-a-glance view, which includes this link to documentation.
So, feel free to explore these tiles for yourself. I’m going to click on the Mobile App tile to get us started.
Skimming down the side here you can see that this is the same set of options that we covered in the Web App overview. Again, that’s because Web, Mobile and API apps are the same thing behind the scene.
The main difference between them from the perspective of the portal is the “Quickstart” blade, which is contextual to the type of App you’re currently using. This one shows us some options for getting started with different mobile devices, and platforms. As you can see, the coverage is pretty high, so if you’re developing a mobile app for one of these platforms, you’re in luck.
For this demo, I’ll use Xamarin iOS -- There are requirements that need to be met in order to try these different options. For example, for iOS dev you’ll need a Mac and the latest version of Xcode installed. For Android you’ll need the Android SDKs. For Xamarin you can develop on Mac or Windows. So you’ll want to select an option that’ll work for you.
Okay, I’ll select Xamarin.iOS, it’ll display the list of steps required to get started. Using these quick start links will help us to create a basic todo list app.
Here it lists off 3 steps, the first being that we need a database in order to persist any data. By default the Mobile App Quickstart has provided us with a SQLite database, which isn’t something that’s well suited for production; however it’s useful for development.
Let’s setup a production ready database, so that this app behaves like it would in the real world. To do that, we can click on this link that says “Click here to create an Azure SQL data connection.”
This will open up the data connections blade, which you could also get to under the Mobile Settings on the main mobile app blade. Next, click “+Add” and it’ll open up a window to add the data connection. It has a drop down for the type, which has options for SQL and Azure Storage. For this demo we’ll use Azure SQL.
Since we’re using the SQL type, we need to configure a SQL database. If you already have a SQL database you want to use, then you can select it here. I don’t, so I have to create one. It needs a name, like everything else.
And then it needs a target server, again, I don’t already have one, so I’ll select create new. The server info needs to be filled out, starting with the...you guessed it...the server name.
Then the login info, so I’ll use my first name, and then I’ll give it a password. It needs a password confirmation, so retype the password….and they match, so that’s good.
Then you need to set the location, I’m going to use South Central US.
Now that the target server is setup, let’s look at the pricing tier. If you’re not going to put this into production then you don’t need to be running this on anything too high powered. So if you want to change your setup, you can do that here. I’ll leave this to an S0, since it’ll be more than enough for this demo.
Alright, now it’s time to go back through the blades clicking OK, until we’re back to the data connection. Because this is starting up a database it could take a little while to complete, so let’s fast forward to once it’s done.
Okay, there it is, and now to click out of the data connections blade. Notice the message on step 1 has changed. That’s because we now have a production ready database.
The next step is to create a table API. Let me explain what that means. Table APIs allow you to have an API in front of your database. That allows you to add your business logic into the API and have requests processed by your logic, and not just dumped as is into a database.
The database that we setup a moment ago will store the table for this demo, and then we’ll have the API serve as that business logic tier. For this you can use Node.js or .NET, and I’ll use node for this demo so that you can see the no-code option.
So I’m going to select this check box and then click create table. This will make sure that a table is created which can be seen under “Easy Tables” and then it’ll deploy a Node.js API template. Using the Easy Tables option is a great way to get a simple database table with API up-and-running quickly. If you’re going to do anything complex, then I recommend you ignore Easy Tables and manage the database for yourself. Complex in this case means data with a lot of joins.
With that complete, step 3 is to either download a sample project, or to show the code needed to add to an existing application. Let’s use the complete project for this demo. It’ll have all the code needed for the todo list.
So, click download, and it’ll download a zip file containing the solution. Okay, for this lesson, let’s stop here. We have a database running, a table automatically created for us to store our TodoList items, and an Node.js based API deployed that’ll handle the CRUD functionality for the todo items. The next thing to do is try out the solution that we just downloaded.
And that’s what we’ll do in the next lesson. So, if you’re ready to fire up a mobile device simulator and try this out, then let’s get started in the next lesson!
About the Author
Ben Lambert is a software engineer and was previously the lead author for DevOps and Microsoft Azure training content at Cloud Academy. His courses and learning paths covered Cloud Ecosystem technologies such as DC/OS, configuration management tools, and containers. As a software engineer, Ben’s experience includes building highly available web and mobile apps. When he’s not building software, he’s hiking, camping, or creating video games.