Using Windows Azure Mobile Services from C++ Windows Store apps
Most good apps these days provide some kind of connected experience whether it is the ability to connect to existing popular web services (like Facebook, Twitter, SkyDrive etc.) or building their own custom backend based somewhere in the cloud. Visual Studio 2013 provides support for both these scenarios for C++ developers. For the former, it contains the C++ REST SDK which ships in the box now in addition to being an open source project. This post however, is focused on the latter scenario – allowing Windows Store app developers to connect to Windows Azure Mobile Services using a set of IDE tools and C++ libraries in Visual Studio 2013.
Why Mobile Services?
Windows Azure Mobile Services take away the pain associated with setting up and maintaining your own custom cloud service. It allows you as an app developer to focus on your client-side app scenarios and provides a quick way to access a cloud service that you can use for scenarios like storing your app’s data in the cloud or for sending push notifications. It’s a great way to build social experiences like a leaderboard in an online game or creating an online shared calendar system.
What does Visual Studio provide?
Visual Studio 2013 provides the following features to simplify the experience of a client app developer who wants to use Windows Azure Mobile Services:
- IDE tooling to easily connect your app with a mobile service
- Ability to manage certain aspects of your mobile service from within Visual Studio
- IDE tooling to easily enable the functionality in your app to send/receive push notifications using a mobile service
The above features as well as the programming experience for C++ developers who want to interact with mobile services programmatically has been enabled using a library called the C++ azure mobile library. This library, which is a simple header/lib/DLL combo, has itself been implemented using the C++ REST SDK since Azure Mobile Services provides a simple REST API.
How do I do it myself?
- This walkthrough on MSDN provides an example of building a simple C++ ToDo Store app using Visual Studio 2013. This is a classic example of using a mobile service as a cloud backend to store data.
- Once you have walked through that and grasped some of the concepts related to “talking to azure mobile service”, you would also want to look at this walkthrough. This demonstrates how to add the push notification functionality to your app and mobile service.
- Since authentication is an important aspect when your app running on your user’s machine is talking to online services, this walkthrough demonstrates how to perform user authentication using the C++ azure mobile library.
We are really excited about this new functionality that lets C++ developers build connected Windows Store apps and accelerates the speed of development by providing a low-friction access to a cloud based backend. We hope you will like these features. As always, we look forward to your feedback.