Archive for the ‘ Web ’ Category

Windows 8, Windows Phone 8, and Windows Azure mobile services


Today’s software architects and engineers want to rapidly develop and deploy cross-platform applications that provide useful, real-time services. The more the applications feel connected, interactive, and social, the better.

The project

Given the youthfulness of the platform, I wanted some experience building what I’ll call a “living app” for the Windows 8 + Windows Phone ecosystem. What follows is a high-level account of what it was like to attempt this.

Why Windows 8 / Windows Phone?

I’m not going to descend to the punditry of discussing a “post PC era” and what it means for Microsoft. However:

I mention the Xbox One because it uses an extremely similar interface to Windows 8 (consider the excellent “app snapping” used on both systems) and I consider it firmly a part of Microsoft’s user-friendly device ecosystem.

Therefore, working with some of the most recent smartphone / desktop / tablet / gaming technology is a plus. And Microsoft insists that it is startlingly easy to develop for Windows 8 + Windows Phone using a shared code base.

Enough said.

What’s this app going to do?!?

Well, OK. What was I going to build? Clearly, I wanted a simple challenge which still utilized some interesting “living” features.

So, I decided to attack the issue of being in the middle of viewing a website or web video and wanting to continue reading or viewing from another device. If you’re familiar with the Windows 8 OS already, let’s ignore the fact that Windows 8 has shared favorites across your personal Windows 8 devices.

Also, I want to make it clear at this point that I didn’t check at all to see if someone else had an app like this already, and I built the app on Windows 8 + Window Phone from scratch.

I wanted the user experience of being able to “throw” a website from a Windows 8 desktop to a Windows 8 tablet, or a Windows 8 phone…any modern Windows device. Therefore, we’d use these “living,” real-time features:

  • sharing (“throwing”) the website from a Windows 8 PC/tablet to others with one click
  • notifying the other devices of the thrown website in real-time and allowing users to respond to the notification with a click
  • displaying the latest list of thrown websites on any modern Windows device

If I could accomplish all three of these tasks easily and with a clean user interface, I’d have succeeded in this particular project.

Building the Windows App

I wanted to build the Windows program in the modern app format that runs directly from the default, live tile-based front screen of Windows 8. Some folks may know this as the “metro” interface, even though Microsoft had to drop that name.

As I said, this is a high-level overview, but I used Visual Studio 2012 in C#/XAML to build the app. I have just a small head-start on some others in this arena because I attended an official Microsoft Windows 8 development camp and successfully built two prior Windows 8 apps.

So, our Windows 8 app goals:

  • very simple, clean UI, “snappable” in Windows 8, usable in any orientation on tablets
  • up-to-date display of shared websites…of course, enabling clicking on any website entry to visit that site
  • instant sharing capabilities from any Internet-connected application
  • send “push” notifications to other devices using the app

RESULT: I built, tested, and “released” the above features to multiple Windows 8 devices in less than 8 hours using the aforementioned development tools and Windows Azure Mobile Services.

Below is one screenshot of the results. Here we’re showing our app filling the left side of the screen, while another app is “snapped” on the right side. Both are of course fully usable:


And here is a screenshot of how easy it is to share from another internet-connected app, Internet Explorer 10, in this case:


Building the Windows Phone App

For the Windows Phone app, I again wanted the following:

  • very simple, clean UI
  • up-to-date display of shared websites…of course, allowing a tap of the website entry to open the site
  • receipt of notifications from “thrown” websites

To accomplish this, I again used Visual Studio 2012 in C#/XAML. In this case, all I did was add an additional Windows Phone project to my existing “solution” which contained the Windows 8 app.

I expected the work of sharing the logic between the Windows 8 and Windows Phone app to be much more difficult than it actually was. The surprising majority of my code worked perfectly in the Windows Phone app without changes.

The difficulties I had were in using different “controls” (i.e., user interface presentation tools) to display the list of websites on the phone (named differently and with different behavior than Windows 8). What held me up most was trying to determine how to activate the website after tapping its entry. I personally got stuck in a loop of programming workarounds to get the dynamic data stored in each row of the ListBox control. I found a tutorial on this eventually which was much easier than I had made it.

RESULT: I built, tested, and “released” the above features to a Windows Phone device in less than 3 hours. However, it’s important to note that it took me only 40 minutes or so to design the Windows Phone app, and migrate my code from Windows 8 to Windows Phone, allowing for changes in naming conventions. That effort was far more minimal than expected. The remaining 2+ hours was spent on my own hacky workarounds and research with the issue I described above.

I apologize for the quality of the Windows Phone pictures (an issue with my on-device screenshot generator meant I had to take these by hand with a less-than-adequate camera). But, below is one screenshot of the results:


And here is a screenshot of the Windows Phone “live tile” notification of a new website on the list (note the “The New Xbox” on the w! tile):



Windows Azure Mobile Services

As I already mentioned, I used Windows Azure Mobile Services during the development process. Although I’ve used Azure before, this was my first experience with the mobile-specific “cloud back-end” which it offers.

It’s almost miraculous how easy it was for me to use Azure Mobile Services to:

  • implement cloud storage (like my app’s list of websites)
  • implement push notifications (the notification to other modern Windows devices of the “thrown” website)

I’d say it took me 15 minutes to get the cloud database set up and displaying results in my Windows 8 app and Windows Phone app with no hitches whatsoever.

It took maybe 20 minutes to get the push notifications working on Windows 8 and Windows Phone.

I’ve got to tell you: to me, that’s phenomenally efficient. After this project, I wholeheartedly recommend Azure Mobile Services.

Well, is this app released to the world?

Good question.

I really debated the type of authentication and safety needs of maintaining a real-time list of websites that folks are “throwing” from all their devices. Should it be similar to Stumbleupon or Twitter, acknowledging that anyone who downloads the app knows they’re viewing potentially NSFW/dangerous/phishing websites? Should it only allow folks to “throw” websites to their own personal devices? Their friends’ devices? Should there be a password-protected option?

Honestly, I did actually scope the app a bit for some of these concerns. For example, the data model allows for password-protected confirmation before viewing websites protected by the initiating user. But I acknowledged that it needs a lot more thought, and I didn’t want to go with an authenticated model out of the box.

Therefore, though I have successfully released prior apps to the world, I decided not to even attempt releasing this app with such an open model. Regardless of whether Microsoft’s Windows Store and Windows Phone Marketplace would have accepted it.


Windows Azure Mobile Services was the biggest revelation of this project. The simplicity of using services themselves, combined with the documentation and tutorials, make Azure an undeniably valuable asset.

The second revelation was the ease of re-designing specifically for Windows Phone, when the visual concept — admittedly very basic in my case! — was created for desktop/tablet screens. And the migration of logic was the biggest issue, but still far less of a challenge than I expected.

I’m very pleased that I was able to implement a Windows 8 + Windows Phone app, on desktops/laptops/tablets/smartphones, with all the “living” features I envisioned at the start of the project, in less than 11 hours. I walked away very pleased. And I get a lot of use out of my new app already on all my devices.

%d bloggers like this: