Windows Azure SQL Database Marketplace
We built Windows Azure Mobile Services in order to make it quick and easy to build engaging mobile apps that scale. This week, Scott Guthrie announced two important updates to Mobile Services.
The first enables pure HTML5/JS clients (and PhoneGap apps). We added an HTML5/JS client library to our current suite of SDKs--the Android SDK we released two weeks ago as well as the SDKs for Windows Store, Windows Phone 8 and iOS.
The second is a preview drop of portable client libraries, which allows Windows Phone 7.5 apps to use Windows Azure Mobile Services as a backend.
Even though we didn’t announce plans to support HTML5 and Windows Phone 7.5 apps at launch, user feedback quickly showed that developers required support for these platforms. This week, we’re happy to deliver.
Many developers asked for HTML5 support in order to quickly build mobile apps that are available across every major platform. Even though HTML5 apps may not enjoy the same platform-specific benefits of native apps, they are a great way to quickly reach users across a myriad of platforms and devices without having to maintain multiple code bases. Adding support for HTML5 apps dovetailed with the overarching Mobile Services drive for simplicity.
With this week’s update, you can now use a Mobile Services backend for both pure HTML5 web clients and Apache Cordova/PhoneGap. An app falling into either of those categories can use Mobile Services for both data storage and authentication.
Two important updates allow HTML5 apps with a Mobile Services backend to store data in the cloud and authenticate users:
Getting Started with HTML5 apps
If you want to start building HTML5 apps with a scalable backend hosted in Windows Azure, navigate to the Windows Azure Management Portal, click New, then Compute à Mobile Service. On the Quickstart tab, you’ll now see HTML as one of the platform choices.
We recommend familiarizing yourself with Mobile Services by completing the Quickstart tutorial before either connecting an existing app to Mobile Services or starting to build an app slated for production.
In less than five minutes, you’ll get a simple todo list app that stores your data in the cloud.
We then recommend following tutorials for getting started with data and user authentication.
You’ll be able to validate and modify your HTML5 app’s data with server scripts very similarly to how you would when building a native app. You can follow the full tutorial here.
Getting Ready for Production
When you’re getting ready to move an HTML5 app into production, you need to make a special consideration. It’s important to add the hostname of the website you use to host your app to the Cross-Origin Resource Sharing (CORS) whitelist.
To do this, head to the Configure tab and type in the hostname for the site on which your app is hosted.
After you’ve added the relevant hostname, be sure to hit ‘Save.’ (You can always remove hostnames from which you’ll allow requests by clicking the ‘X’ on the right of the name and then hitting save.)
If you run into any issues, please let us know on our GitHub issue tracker and head to our forum to get help.
Last week, we published a preview of our next version of the Mobile Services C# client library on NuGet. Some of the great new features we are developing for the next update to the C# client SDK include:
Installing the NuGet Package
Before you get started, ensure you have NuGet 2.1 or later.
To install the package, run the following command in the Package Manager Console:
In order to see this package in Visual Studio, select ‘Include Prelease’ from the drop down menu.
For a more detailed overview of the prerelease package available on NuGet, visit Johan Laanstra’s blog.
Note: This drop is a pre-release and intended to provide an early look at new feature that will ship in a subsequent C# SDK update. For production apps we recommend continuing to use the “stable” Mobile Service client libraries for .NET available for download here.
Even though the move to portable libraries will result in significant improvements, reconciling differences between the Windows Phone 8 and Windows Store SDKs introduces some breaking changes. Please visit Carlos Figueira’s blog for a detailed overview of these changes.
We are really excited to ship these updates since they’re the direct result of your feedback. Please continue to visit our uservoice page to let us know what you’d like to see next, email us to show off your app, and ask questions in our forum whenever you run into a problem.
Developers across the globe have already impressed us with Windows Store, Windows Phone 8, iOS, and Android apps. We can’t wait to see the apps you build for HTML5 and Windows Phone 7.5!