Quantcast
Channel: TechNet Technology News
Viewing all articles
Browse latest Browse all 13502

Mobile Services Updates: New HTML5/JS SDK and Windows Phone 7.5 support

$
0
0

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.

HTML5/JS Clients

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:

  • New Web Client Library that supports IE8+, current versions of Chrome, Firefox, and Safari, and PhoneGap 2.3.0+.  This library offers the same data querying and storage APIs presents in our native SDKs and enables developers to authenticate users through their Facebook, Twitter, Microsoft or Google Account credentials.
  • Cross Origin Resource Sharing (CORS) support: With this update, your Mobile Service can accept cross-domain Ajax requests and you can configure a whitelist of permitted domains using the Windows Azure management portal. 

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.

Portable Client Libraries: New C# Client Library on NuGet and Windows Phone 7.5 support

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:

  • Portable Library Support: Using Portable Libraries, we’ve consolidated our Windows Store and Windows Phone 8 Libraries on top of a single codebase. By moving to Portable Libraries, developers can use Mobile Services with variety of new client platforms as well as call Mobile Services from an ASP.NET or .NET server backend. 
  • Windows Phone 7.5 support: By transitioning to Portable Libraries, we are able to add Windows Phone 7.5 support.  Perhaps not so coincidentally, this was the third most-requested feature on the Mobile Services UserVoice page.
  • Json.NET and HttpClient: We updated our implementation to use the most modern and flexible HTTP component.  This includes support for enum types that are automatically serialized into strings by the client, nullable types, contains queries on lists, a new MobileServicesCollection, HttpMessageHandlers, and improved unit-testing.

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.

Summary

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!

Miranda


Viewing all articles
Browse latest Browse all 13502

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>