Azure includes web, mobile, logic, and API apps within the App Services or App Services set.
From the new Azure portal, when you click App Services, you can create a new web application or app that will be hosted and run on Microsoft’s cloud platform. How do web apps, mobile apps and API apps differ from the web applications we discussed in the previous article on Azure ( How to run an ASP.NET, PHP, Java or Python web application on Azure )?
In the web app properties, under the Mobile and API headings, you will find the tools to create mobile apps and API apps with Azure. The functions of a mobile app or an API app are, therefore, also available in the case of a web app. But what, then, is meant by mobile apps and app APIs, and how do they differ from web apps ? Microsoft has developed a complete client-server stack that aims to simplify the development of mobile device applications.
A typical mobile app is a thin client or an object whose operation largely depends on a server that handles the more demanding processing. The client application relies on some APIs to exchange data with the server-side application, performs an authentication operation and uses minimal client-side logic. Since the most frequent operations are data storage, the use of APIs and so on, Microsoft has seen fit to create an additional stack that the developer can use using Azure web apps.
In other words, after creating a simple web app with Azure by clicking on App services, the developer can create the backend of a mobile app using a very comfortable wizard . Even those programmers who do not have the skills for creating a database and for the subsequent lookup of data can use the wizard proposed by Azure, for example, to enable a data connection to be used within the mobile app you want to create.
Using the Data Connection “wizard”, Azure allows you to create the entire client-server stack to perform these operations automatically. Assuming you have created, added, or, in any case, imported a database in the same group of resources as the mobile app being created (as shown in the figure, we are using the Adventure Works example database), using the wizard, you can connect the application. After clicking on Data Connection and then on Add, the only steps are to select the database from the same group of resources and specify the access credentials (username and password).
By clicking on Simple tables, it will be possible to read and write operations on the database immediately, using special APIs that do not have to be developed by the user but are already available “free” on the Azure platform. With a click on Need to configure Easy tables/Easy APIs, Azure will show the screen reproduced in the figure: By ticking the I acknowledge that this will overwrite all site contents box and then pressing the Initialize app button, Azure will write a real web application in the file system where the mobile app resides which will activate all the stack necessary to interact with the specified database and with the various APIs.
To check the progress of each request sent to Azure, click on the icon representing a small bell. Using the Add button, inserting a “simple table” will allow you to communicate with the database without writing a single line of code. With a click on Authentication/Authorization, it will then be possible to configure an authentication system by the client devices that connect to the web application or the backend of the mobile app being created.
As you can see, Azure also directly supports authentication with accounts activated on multiple services such as Facebook, Google, Twitter and so on. Thanks to the Azure “wizard” and the software components the platform connects to the mobile application, it can drastically speed up development activities. By initializing a web application as an API app, Azure will create the backend of an example app that will supervise the reading and writing of a contact list. It is a demonstration app highlighting what can be done with the Azure apps API.
Using any programming language, the developer who creates a REST API and documents it, for example, using Swagger (a sort of de facto standard for REST API definitions), can enter the definition in Azure by clicking on API Definition . By specifying an address containing REST API definitions, Azure – drawing on Swagger metadata and, therefore, the description of the REST API – can immediately understand what operations to manage.
Once Azure has understood which services the API provides, the platform will allow access to them from any other application, creating workflows that pass parameters to the API and obtaining new integration scenarios The last piece of the App Services puzzle is called logic apps. Logic apps do not explicitly create a website: it is an interactive way to define workflows loaded based on triggers (conditions that occur) or on a scheduled basis.
Logic apps can thus be exploited to compose special services. Who knows the recipes of IFTTT or the “flows” of the new Microsoft Flow ( Connect cloud services with Flow, a rival of IFTTT ) can immediately understand the functioning of the logic apps. By configuring a logic app, for example, you can ensure that once a new file is uploaded to certain stores, a post is automatically published on Facebook or an email is sent, or – again – the same file is copied to another cloud storage service.
Instead of independently writing the code to manage the operation, the Azure portal interface allows you to set up this workflow completely visually. Once you’ve chosen the Logic app from the Web & Mobile section of the New button, you’ll give the logic app you’re creating a name and, as usual, choose the resource group and app service plan. Azure will then show the “connectors” that will allow you to automate the workflow.
Could you send us your questions about Azure?
Please send us your questions about the Azure platform by posting a comment at the bottom of this article or by emailing to the editorial address email@example.com You can submit any questions, requests for further information, clarifications on the topics covered and proposals for topics to be addressed.