Windows Phone 7 Development

windowsphoneseries7.gifThe details on how to develop for Windows Phone 7 were unveiled at MIX ’10 yesterday. Developers have a choice of using Silverlight or XNA Frameworks. MSDN already contains some preliminary documentation.

Silverlight allows creation of markup-based, event-driven applications and XNA allows for loop-based programs, such as games. These two frameworks sit on top of .NET (compact framework in this case). There’s no native development and there’s no PInvoke to call native code from .NET. Everything runs in an isolated sandbox without any direct access to the underlying operating file system.
 

wp7runtimes.gif
 

Microsoft have totally distanced themselves away from Windows Mobile and the underlying Windows CE OS. Nevertheless, the ‘Windows Phone’ part of the above diagram sits on top of Windows CE.

Microsoft haven’t ruled out native coding and have said that mobile operators and hardware makers may get some access to write native applications. There are obviously some cases, for example codecs, where native coding will be needed to achieve the required level of performance.

Looking through the MSDN there’s no support for background applications. However, there’s a push notification mechanism similar to Apple’s. There’s also ‘Reactive Extensions for .NET’ that allows you to observe things like location. The documentation is preliminary so it’s not yet clear whether this can be used to wake your application or whether it’s just for when your application is run by the user. It’s also not yet clear whether the push notification can wake an application without the user confirming the notification (as sadly isn’t the case with the iPhone).

The preliminary MSDN documentation shows there’s a wide support for things like telephony, the accelerometer, vibration, networking, threading and location.

Developers must submit application packages for certification. This is the only way to make an application available to consumers. The certification process verifies that the application is well behaved, works for the languages and markets indicated and does not adversely affect the overall health of the phone. Developers can register test phones so they can run them on real devices prior to submission.

I am disappointed there’s no support for native coding. This rules out porting existing (Window Mobile Win32 and general c/c++) apps for many people. The lack of background applications also rules out any applications that monitor the phone state, for example sending the phone’s location periodically to a server. That is unless the ‘Reactive Extensions for .NET’ or push notifications end up being more sophisticated than I anticipate. The tight ‘Apple-esque’ control of what applications get released might also become a cause for concern.

Despite the hype and lots of people being positive about Windows Phone 7, I must admit I still don’t ‘get’ WP7. The push notification system, no background apps and heavily controlled distribution have all been taken from the iPhone. If the rumours are true and iPhone OS 4 ships with background apps then Microsoft are going to look a bit dumb. It’s all about timing and it might be that WP7 becomes out of date and it’s competitors make significant advances (technically and in market share) before WP7 phones can arrive in significant numbers.

UPDATE: It appears Microsoft is behind because it re-booted WP7 a year ago.