Transitioning From Windows Phone 7 to Windows Phone 8

Thanks to the new Developer Movement, I’ve been motivated to do some work in the Windows 8 and Windows Phone 8 space. As part of that, I’ve started porting some of my existing Windows Phone 7 apps over to the Windows Phone 8, and have run into a few gotchas. I’m going to start documenting the process here in the hopes that someone else will be able to benefit from some of the things I’ve found.

The first app I’m porting over is my Poppycock! game. For those that weren’t part of the first 120 downloads I had, the idea of Poppycock! is kind of a MMO version of the board game Balderdash: you submit what you think a word, acronym, movie title, or other subject means, and then you have to try to pick the right answer from a list of 4 answers that have been supplied by other people playing the game. It’s kind of neat in that it relies on user-generated content, and also as a player you can gain points and rank from your definitions when you’re not even playing the game. Here’s a few screenshots for context:

So there’s two objectives I wanted to achieve while porting Poppycock to Windows Phone 8: the first obviously making it run in WP8, and the second is to use Azure Mobile Services as my online storage for user content and data. I’ve started a little bit of both of those goals, so I’ll jot down some of the stuff I’ve run into so far.

Porting from WP7 to WP8

I started by simply installing visual studio 2012 and opening my old 2010 project. This was a painless process and everything just appeared to work as far as the solution file and project were concerned. But then the errors showed up… First off was a change in controls. I was scared and confused at the lack of Panorama controls, thinking at first that maybe WP8 had dropped support for them for some reason – I knew they weren’t in Windows 8, even though the ui is very similar. But it was just a matter of changing assemblies, from




On top of that, two of the controls I was using from the “Silverlight for Windows Phone Toolkit” (Microsoft.Phone.Controls.Toolkit) were nowhere to be found. Luckily, there’s a Windows Phone 8 update of the toolkit, so just swapping that out should be fine. I actually ended up trying to use the Rad Controls for Windows Phone from Telerik, which is a fine toolset with lots of cool controls, but also costs $99 to use in a published app. There’s a free trial if you’d like to check it out. I’m probably just going to use the phone toolkit cause I don’t plan on making any money from Poppycock and I’m only using the ListPicker and ToggleSwitch controls, both of which are free in the phone toolkit.

Azure Mobile Services

Once I had that compiling and working, I started to play with Azure Mobile Services. The general concept there is that Azure provides you with easy access to cloud-based table storage, with a tightly integrated SDK. Mobile Services are targeted at mobile applications and are currently available for iOS, Windows 8, and Windows Phone 8.

I have to say, I really enjoy what the Azure team has done with their portal, especially in the last few months. They’ve addressed my two main concerns: the prohibitive cost for a casual developer to try it out, and the (perceived) complexity of working with cloud-based systems. The new Azure portal is really modern, and has a really strong focus on “come try it out” with lots of tutorials and a free trial account. My only complaint is if you’re just trying to get stuff done, the tutorial focus on the management portal seems to get in the way a little bit. You can turn it off, but it’s on and in the way by default.

Anywho, after installing the Azure SDK and including the reference in my project, it was a simple matter of creating some POCO classes with service attributes before I was talking to my Azure cloud storage. Here’s also a part where I was glad I had the foresight to break my data layer away from my app. Because I was using a M-V-VM pattern, I only have to rewrite my models to use Azure and I don’t have to touch any of the existing view model or view code, making the conversion a piece of cake.

One thing I have to get used to, mobile services is just a table store. My previous version used a web service that did a lot of processing on the server-side to return the results I want. Now, because I can really only do basic queries against the table in my code, a lot of that logic that was previously server side will be on my client, and I’ll probably have to pull more data to the mobile device than I’d necessarily want to. Not a big deal really, but it is a shift from traditional server-client models.

Windows Phone 8 Emulator

After all that was working, I have the WP8 emulator a shot. And it didn’t work. During my first launch, I got a timeout error from VS2012. I figured that was fine, the first launch probably takes a bit of time to get setup and everything. But the 2nd time I got a really strange error:

Turns out, after some googling, that you can’t have any vpn-based network adapters installed when trying to setup the Windows Phone 8 emulator. I uninstalled SonicWall VPN Client and that fixed the issue pretty quickly.

I’ll keep posting as I run into other quirks while porting my existing apps.