Friday, November 5, 2010
Posted by Don Sorcinelli in "Windows Phone Developer" @ 06:00 AM
If you've seen any of the incredible dearth of Windows Phone 7 pre- and post-launch coverage and press releases, you heard about them or seen them. They are those wonderful things on the Windows Phone 7 home screen that provide you with easy access to information - your email, Xbox Live games and other applications. Any application on your phone can have one. They are Tiles. The early demonstrations showed all of the amazing things they could do - provide animations to inform and entertain and update dynamically as new information becomes available. And they were referred to on a regular basis as Live Tiles. They made us all very excited about the Windows Phone 7 platform - well, almost all of us. For another audience, the concept of Live Tiles made us a bit nervous.
For those of us who have been involved with the Windows Phone 7 platform from the initial announcement back at Mobile World Congress and the launch of the development tools at MIX, there typically came a point of realization regarding Windows Phone 7 tiles. For myself, that realization made me look to the future and the launch of the platform to the public. There would be questions from users, and perhaps a bit of disappointment. There might even be some anger.
When Windows Phone 7 was launched in Europe and the Asia/Pacific region on October 21st, 2010, those questions started coming. They came in emails and in forums. The names might have changed, but the question was always quite consistent:
"Why isn't the Live Tile for [Fill in the application name here] doing anything?"
While my answers may have been slightly different in each case, they all always boil down to the same simple fact - Not all Windows Phone 7 Tiles are created equal. In many cases, the reason why they are not is based on very good reasons. Recently, a discussion with Jason Dunn made me realize that it might be a good time to explain some of the reasons to the community-at-large.
What Really Makes A Tile "Live"?
When I first saw Windows Phone 7 demonstrated, I was (like most) very excited about the Tiles concept. When I first heard that third-party developers could tap into this functionality and make the tile for my own application have a live aspect, I was thrilled. Further research into what it would take to get to that point, however, made me realize that there were some "catches" to this. To start, it only takes a moment of thought and some common sense to come to some early conclusions.
In order to be "live", a tile would need to receive some information from somewhere. For the purposes of our discussion, let's suppose that I am creating a reminders application for Windows Phone 7. As a developer, I would love to have my application's tile change when it is time for the user to be reminded. The first thing I realize as a developer is that Windows Phone 7 applications cannot run in the background. Most users as well as developers are aware of this fact. As a developer, the next logical question to ask is "If my application cannot run in the background and tell the tile to update, what can tell the tile to update?" A bit of research provides an answer.
Microsoft has developed and provided an application model that allows for a centralized and Microsoft-maintained environment known as the Microsoft Push Notification Service, or PNS. Because Apple provides a similar service for iPhone and iPad development knows as APNS, I tend to refer to Microsoft's version as MSPNS. The idea is quite simple - a central (and always running) server sends a message to MSPNS which, in turn, locates the device that is supposed to receive the message and passes the message along. The concept may be "simple", but as a developer it creates a new and potentially major level of complexity to my application - I must build my application to include a centralized server component.
Looking back on my original idea of a reminders application, what would this new requirement mean? Well, I would need to do the following:
- I would need to develop a web-based server application to store reminders. My simple client application would now need to be complemented by a Web-based service. This service would likely need to include a database element. When a user creates a new reminder on the phone, the client application would need to connect to the Internet, authenticate (there could be thousands of users of my application; I would need to identify each user correctly), and then store the information.
- I would need a service to send reminders to the MSPNS. My application would need to have a service that constantly monitors the database, looking for reminders that are due. The service would then send the proper message to the MSPNS.
Of course, this is just a a simple overview of what would need to be put in place in order to have a successful Live Tile implementation. When presented to a developer, there is a lot here to consider - and not all of it is technical.
Live Tile and the "Business Impact"
The first time I presented on the subject of push notifications (earlier this summer), I first thought I would spend a great deal of time in the presentation on the lower-level programming details. After some consideration, however, decided on a different approach. I would talk about the architecture of push notifications, the processes involved for creating such a solution and the business impacts. I was glad that I did.
When the developers I presented to saw what was involved with using MSPNS, they were not necessarily concerned about the technical aspects of implementation. Instead, it was the concerns about the "cost of doing business" related to using push notifications that immediately raised issues. They included -
- The obvious additional cost of creating and maintaining all of this newly-needed code. The audience I spoke to consisted primarily of independent developers and hobbyists - a large target audience for Microsoft and Windows Phone 7. While creating a client application is definitely "on their radar", creating something far more complex would likely take more time and effort than is desired.
- The cost of maintaining a web-based solution.There is far more than development costs when dealing with a web-based solution. The cost of hosting a solution (especially when a database is involved) can become quite large rather quickly.
- The cost of providing the proper Quality of Service. This is a HUGE consideration. The user expectation is 24/7/365 for any solution, regardless of where the application or pieces of the application reside. Anyone who has run a large and successful website with a worldwide audience can usually attest to this - just ask Jason. ;-) For a small independent or hobbyist developer, this is a major commitment - often far more than they had bargained for and want to deal with.
Not surprisingly, quite a few of the developers in the audience for my presentation simply said "No way". They would build their applications, but Live Tile functionality was not going to be a part of the solution. It is important to note that there is no requirement for making a tile "live"; there are simply some requirements and guidelines on making your tile "fit in" with the overall Windows Phone 7 experience.
I walked away from that presentation realizing that Live Tiles could very well be the exception rather than the rule on any given Windows Phone 7 device. I also wondered "What could Microsoft do to help here?"