The end of an era?
As of today, we are deprecating Windows Phone 7 as a target platform for Apache Cordova, and therefore PhoneGap as well. A lot has changed in the last 2 years, with both Windows Phone 8, and Windows 8 coming along, and also getting consumed as Apache Cordova target platforms along the way, it is time for the changing of the guard. While still available, Windows Phone 7 device use is on the decline. The low cost Nokia 520 has done a great job, offering an affordable entry into Windows Phone 8 land. We have seen less and less demand for WP7 features and PhoneGap Build has locked down support for WP7 at version 2.9.0. Here are some interesting stats on worldwide use of Windows Phone devices and versions.
The road to here
In the last 2 years, the Windows Phone 7 UI, then called Metro, has taken over Windows land and is now everywhere from the xbone to the desktop.
The Mango release for Windows Phone 7 brought Internet Explorer 9 to the phone. Up until Mango, hybrid apps were extremely limited by the fact that the WebBrowser control was IE7 under the hood, and did not support any of the standards that we had come to expect in a predominantly WebKit based device browser landscape.
Along the way, there were obstacles, and in many cases, solutions:
Isolated Storage Wars
The way that Windows Phone 7 packages assets as .dll resources means that html/js/css files are not navigable unless they are unpacked to the local file system. This meant that all WP7 PhoneGap apps had to have an additional initialize step to unpack everything. Also, since the dll does not list it’s packaged resources, there was an additional build step to run against the project and create a list of everything that needed to be unpacked at runtime.
Touch events, and even mouse events were not supported in WP7. I implemented a workaround which converted native touch events to mouse events which were injected into the browser control and accessible to PhoneGap apps.
More info here: Adding Touch Support to WP7
IE9 supported the Web-Storage API out of the gate, however there were issues with pages loaded from the file:// protocol, because they did not have a domain that IE9 used to sandbox pages.
More details here: Implementing WebStorage for PhoneGap
The future, and beyond
I am proud to say that most of the above hybrid app issues that we had to work around in Windows Phone 7, were addressed in Windows Phone 8, and Microsoft has taken great strides in supporting hybrid app development with WinJS for building Windows Store Apps and many more browser improvements in IE10 ( webbrowser control in Windows Phone 8, and Windows 8 ) and IE11 ( webbrowser control in Windows 8.1 and presumably the next version of Windows Phone ). This is the power of working closely with Microsoft who have done a great job in supporting PhoneGap, and Apache Cordova. This also fits the original goal of PhoneGap; to ‘cease to exist’, because the features you need are built into the platform.
Officially we will continue to support developing for Windows Phone 7 until version 3.7.0, which is expected to happen in May 2014. Greater attention will be given to Windows Phone 8, and Windows 8, so if you were waiting for a reason to update to the new shiny features, it has arrived.
[update: fixed typo: mouse events were not supported in WP7 -jm]