Develop Multi-Platform And Connected Apps And Deploy Them On Azure

Intro

PaaS allows companies and developers to focus only on applications and services and not the infrastructure. PaaS provides all the services needed to create, code, deploy and run the websites, mobile services, and more.

The real challenge of the Cloud is no longer infrastructure but services and mobile applications. It is now a question of conforming to a new paradigm of application, that of the "3rd platform" defined by IDC, the foundations of a modern application must be based on the Cloud, the mobility, exploit the Big Data, and consist of social mechanics.

The Azure PaaS has evolved a lot since the first services. It meets the challenges of Apps. It offers integration and openness that is unique in the market. This offers Azure App Service based on 4 essential pillars detailed below: Web Apps, Mobile Apps, Logic Apps, and API Apps; not to mention the developer dimension: SDKs, APIs, openness to multiple languages, connection with all major SaaS market, etc.

And, we will never forget that it includes,

  • Functions that offer you the possibility to run a code-on-demand without managing any related infrastructure, it's a "Serverless Compute Service".
  • Containerized Apps where you can deploy an open source container like Kubernetes and Docker.
  • Service Fabric dedicated to the distributed systems where you can package, deploy even manage them.

Now, the IDE of Visual Studio 2017 includes all that you need so as to start and deploy any application on Azure.

Let's say that we have Cloud Pattern and Architecture that lets you build cloud application to ensure the scalability of your apps and especially, the resistant to failure.

Building the Sample

In our sample, we will upload a simple project ASP.NET Web API Core 2.0 where we integrated the EF Core 2.0 on Azure Apps. The sample that we will deploy, is in the Marketplace.

https://marketplace.visualstudio.com/items?temName=RebaiHamidaTrabelsi.BlogVSIX

Azure

Azure

Our sample is a simple ASP.NET Web API Core 2.0 that manages Blogs. It integrates EF Core 2.0 and Swagger to display the REST APIs.

From Visual Studio 2017

We compile in release mode, we right-click on the project in Solution Explorer and after, we select Publish....

Azure

Now, we need to select "Create new profile" if we didn't initialize any settings.

Azure

In the "Publish" dialog, we select Microsoft Azure App Service >> Create New >> OK.

Azure

In this part,
  • Type the name of the App that should be a unique name.
  • Select a subscription.
  • Select "New" for the resource group and enter a name for the new resource group.
  • Select App Service Plan or we can create a new plan.
  • Finally, Click on "Create" button for the app service plan and select a location near you.

We have to select the Services tab to create a new database. After this, select the green + icon to create a new SQL Database.

Azure

Now, configure the database by defining the Server Name, the Administrator Username, the Administrator Password.

When we confirm, we get this interface again.

Azure

Click on "Settings" to continue configuring the deployment.

Azure

Click on "Validate Connection" to test your communication if it's established or not. After this, we will choose "Settings" to be able to check if the connection string of the database is selected or not.

Azure

Finally, click on Publish.

Azure

Note that we have to do this on Azure to link our web application with the database.

Azure

If we don't have a ConnectionString, we have to add it.

Up Next
    Ebook Download
    View all
    Learn
    View all