Our Blog

where we write about the things we love

21

Aug

Azure Mobile Services: A Backend for Apps

At this year's Build conference the Microsoft Azure team announced the general availability of Mobile Services, a set of services specifically designed for apps. In this post we'll explore the motivation and capabilities of Azure Mobile Services, and when they may or may not be a good fit. 

Windows Azure Mobile Services

 

Motivation

The most impressive aspects of Mobile Services, in my opinion, are its appreciation for the multi-platform nature of the app ecosystem. Mobile Services aims to be a viable backend choice for all platforms: iOS, Android, Windows Phone, Windows Store, web, and others. The Mobile Services team clearly understands that to attract all these platforms, the services should coincide with trends common to the entire ecosystem. Not only is this evident in the documentation, starting points, and open source resources they provide, but in the frameworks, libraries, and tools they used to build Mobile Services. The lack of bias in Microsoft tools and technologies (from a team at Microsoft) is both obvious, refreshing, and appropriate. Which means that, while there is Visual Studio integration, some of the things you might expect from the first release won't be coming until later releases.

 

Windows Azure Mobile Services Confirmation

 

Capabilities

Mobile Services provides the most important capabilities needed by connected apps: data storage, authentication, notification, server-side logic, management and diagnostics, and scale.

Data storage in Mobile Services uses an Azure SQL Database. While you may use the typical SQL tools to manage the database, the schema, data, and permissions can be managed through the Azure Portal. If you prefer not to use SQL, many of the other Azure services, such as Table Storage, can also be used. The data is provided to the app via a REST API and a single database can support multiple apps.

Mobile Services is built on top of Node.js. As a result, the facilities for creating and maintaining server-side logic are accomplished using Node.js. Your server-side logic may be in the form of a custom API, a scheduler task, and an action associated with a database operation. You may also use other Node modules as needed. All of this server-side code may be edited directly in the browser, although because it resides in a Git repository, you may clone it, make your edits locally, and push them back to the server.

If your app needs to push notifications to users’ devices, Mobile Services can be configured to push messages to the platform-specific notification provider. While this can certainly be set up manually, Visual Studio 2013 (currently in preview) contains a wizard that will wire up everything in your app for you. If you have high volume notification requirements, you should consider the Notification Hubs feature of Azure Service Bus rather than Mobile Services notifications.

Other notable features include:

  • Client libraries. If you already have an existing app, just download the SDK for your target platforms, and add the references to your project. If you're starting from scratch, download the starter project and it will already have everything you need to consume the services. There are walkthroughs for both scenarios in the documentation.
  • Command line tools. This impressive array of tools work on both PowerShell and Bash. They allow you to perform the same tasks available with the Azure Portal but with the power and flexibility of the command line of your preferred desktop platform.
  • Logging and diagnostics. Errors are automatically logged and it's easy to add server-side messages to the log. The diagnostics available are the same available through Azure Web Sites: alerts and site metrics such as CPU time, request counts, data in/out, and HTTP errors.
  • Authentication. Configuring OAuth providers for Facebook, Twitter, Google, and Microsoft are straightforward right from the Azure Portal.

 

Windows Azure Mobile Services Assessment

 

A good fit

Certainly, there are a lot of choices when choosing a backend for your apps. If your app needs to integrate with other backend services not hosted on Azure, or if you have requirements on your backend code, you should either look elsewhere or wait. There are likely other reasons to choose a different service provider, but it's clear the Mobile Services team aims to provide an array of services that are compelling to all of the major mobile platforms. We were fortunate enough to be in Seattle the week after Build and spent some quality time with the Mobile Services team. It's clear they are genuinely interested in feedback and will continue to make additions and improvements to the service.

So far, our experience evaluating and using it has been positive. If you're interested in taking it for a spin, you might consider starting with the Mobile Services sessions presented at Build. You can try it for free with 500K messages per month and a 20MB database. You can even use their sample Todo app if you need an app to play with. If/when you do, I'd be interested to hear about your experiences in the comments below. Have fun.

 

Posted by: Don Smith, Solution Architect, Enterprise Applications | 21 August 2013

Tags: Azure, Mobile, Windows 8, Android, iOS


Top Rated Posts

Blog archive

Stay up to date with all insights from the Intergen blog