Saturday, Dec 28, 2013
Recently I’ve used Windows Azure as a back-end for a Windows Phone app. Here are some of the experiences that I’d like to share.
Our local Microsoft office had an app competition held this year for a Windows Phone or Windows 8 applications. Anyone could sign up, so I gave it a shot. I didn’t have much time for development, but I had an idea and I spent some time figuring out how would I do it. When the time came to start coding, I ran into some issues, and I’d like to share my experiences.
I’ve built a Windows Phone 7.5 app that uses Windows Azure mobile services. Windows Azure provides a great backend for mobile apps. I choose to use Azure SQL for database storage, and mobile scheduling for scheduled notifications. I also used Live SDK for user authentication.
Documentation and code samples
I’d like to start with Live SDK sample landing page for Windows Phone. There is a link to download it, and it says it’s working on WP7. There is also a code sample. Great! Except, um, that’s the code sample for WP8. Even though async and await are working on WP7, Live SDK isn’t working with it. Why?! I was stuck until I found that it isn’t suppose to work that way - you should use the event pattern instead.
Azure SQL storage
I know that foreign key relationships are not supported in mobile services database storage. Fine. But GUID as a database data type is. And you can’t save it from your app. JSON serializer can serialize only int, string and date types when you are sending your model to Azure. There is a solution for both this and saving a model that relates to other models. Simple and clean, right?
Supported query operators
If I’m supposed to use LINQ for running queries against my Azure SQL database, I would like it to have as much features as possible. This is a list of what’s supported and what’s not supported. At least there is something to work on in the future.
I have mixed feelings about these new services. I cannot wait for the moment when Azure and Windows Phone will provide a feature-rich and stable foundation on top of which great apps can be built. Right now, it’s cool to use many of the new services, but there is a lot of room for improvement.