1
votes

I installed VS2015 and the latest Azure SDK. I'm somewhat confused by the addition of new project templates compared to VS2013 and the previous Azure SDK. I'm trying to get my head around the new Azure App Service.

I used to create a Web API project and publish it as an Azure Cloud Service. Now, I'm offered more options:

1) Azure Cloud Service -> ASP.NET Web Role -> Web API

I'm familiar with this one.

2) Azure Cloud Service -> ASP.NET Web Role -> Azure API App

Why would anyone create an Azure API App and publish it as a cloud service?

3) ASP.NET Web Application -> Web API
4) ASP.NET Web Application -> Azure API App

These two are essentially the same as the first two without the cloud service template. However, the way they are published confuse me even more. You could publish each as a Microsoft Azure Web App or Microsoft Azure API App.

How do the following compare and contrast:

  • Web API -> Published as a Web App
  • Web API -> Published as an API APP
  • API App -> Published as a Web App
  • API App -> Published as an API APP
1

1 Answers

0
votes

I agree, the tooling has confused this a little. Here is how I am dealing with it:

  • "Cloud Services" seem to be a thing of the past, any new project I am doing I am going with AppService and scripting the set-up of that app service with an ARM (Azure Resource Manager) template. You will find a template for this under Cloud->Azure Resource Group in VS 2015. This is entirely optional, but is a great best practise.

  • As you point out above, all 4 combinations are valid. In fact an Azure API App uses the same technology under the surface as the website does (it is a little buried away in the portal, but you can navigate down from the API app to the underlying website by opening the API App in the preview portal, and under the label for "API App Host" double click).

  • Using the API App template in VS2015 you will just get a standard asp.net website like you do with the web app templates, but the main difference is that the API App is slimmed down by default unlike the website template that will have lots of libraries that are of no use to an API app (no jquery, bootstrap RazorViews etc). The smaller footprint should mean that there is less to load when asp.net starts-up, hence faster start-up times.

  • API apps have easy integration points for use in Logic Apps (think a workflow from Salesforce defined in the Logic app that requires to call your API to update data to your database). You could do this with a web app, but there will be more plumbing to do.

  • I believe the plan in the near future is a marketplace of API apps (app store style) that will allow us devs to sell APIs.

  • Swagger out the box. The API app template has Swashbuckle pre-installed for generating the Swagger documentation for you API (arguably you could just install this via nuget into your web app template).

On the whole API apps have the exact same functionality as web apps, but slimmed down with extra bits in places.