ASP.NET Web API vs Azure Mobile Services

I-Have-No-Idea-What-Im-Doing-1

When it comes to any sort of technology, I’m similar to the pooch in the picture above. Fortunately, I work on a team with lots of smart people who can answer my questions.

As of late, I’ve been touring the snow covered eastern seaboard as I teach ASP.NET web camps. A common question that comes up is “What are the differences between ASP.NET Web API and Mobile Services?”  I wrote about how I use mobile services in the past, in my prime[31] tutorial for Unity leaderboards, but I haven’t touched on Web API just yet.

If you want to know more about what’s happening in ASP.NET, the team often does a community standup on Google Hangouts with Jon Galloway, Scott Hanselman, and Damien Edwards.

I’ve spoken with some of the folks on my team about the key differences between the two back ends, and here is what they had to say. Thanks to Steve Maier, Nick Landry, Jeremy Foster, and Adam Tuliper. 

 Mobile Services vs Web API

Mobile Services supports two types of backend: Javascript (Node) and WebAPI.

For node.js developers

For any non .NET developer, I encourage them to use Node since it’s quite popular and many devs are already familiar with it. The Node backend is also much simpler to work with.

For .NET developers

WebAPI requires an ASP.NET solution. Mobile Services will build the project for you but from there you have more work to do and you need to be familiar with .NET.

My understanding is that you’ll get a lot more control over your solution with WebAPI compared to Node. If you’re actually building your own API for your service instead of just accepting HTTP Verbs over REST. In that case, WebAPI is a better solution since Azure provides facilities for API management.

Offline support

The WebAPI (.NET) approach offers offline as well. You’re basically getting all of Mobile Services in a local project, so you can debug. There’s not a full offline story for the JavaScript (Node.js) version, though you can download the scripts via the git endpoint, edit in VS, and then deploy easily. In other words, you don’t have to go to the browser to edit all of your JavaScript.

 

Service Level Agreement (SLA)

Basic and Standard Mobile Services : 99.9%
Websites : 99.9% is only when using multiple instances (Need basic or Standard plans)
This means mobile services gets an SLA of 99.9% with the lowest price of $15/month.
Websites minimum is $112 / month because of needing 2 of the smallest instances.
So anyone that needs / wants the SLA could save money with Mobile Services.

 

Identity

Mobile Services has setups for the major social networking as well as AAD.
Websites (Web API) can be coded and setup to use identity from AAD and tie that into other services as well.
This means that for many developers, Mobile Services will be easier to setup.

 

Push Notifications

Mobile Services has a basic push notifications built in as well as notification hub.
Website can use notification hub.

 

Backup

Websites (Web API) have a backup feature.
Mobile Services (JS) use an automatically created Git repo in Azure and for .NET, you should be using source control anyways.

 

Scheduled Jobs

Mobile Services has Scheduler (can only be run on a schedule or on demand.).
Websites (Web API) havs WebJobs (can be run continuously, on demand or on a schedule).

ASP.NET 5

If you want to see how things are changing in the new version of ASP.NET 5, this video on Channel 9 from Scott Hanselman will give you a better picture.

-----------------------


subscribe-to-youtube

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.