Wednesday, May 25, 2011

What's new for Developers in Mango (and RIP .NET CF)

TechEd 2011 made me reminisce about my old frienemy the .NET Compact Framework. I will eulogize: Friends and fellow developers, we are here today to pay tribute to our friend of almost 10 years. We were coached, pushed, begged, and commanded to embrace you as you made life so much better for us. Yes, we had to be convinced of that, and we hated you at first. You could not go out without a healthy dose of p/invokes, work-arounds, and patches, but we managed to somehow embrace you as your capabilities grew. Now, you are gone. Plucked from us without notice.

I feel almost as sorry for CF as I did for myself after Microsoft threw its mobile developers under the bus last year when we were told there was no upgrade path from Windows Mobile to Windows Phone 7 (WP7). After stewing on this new direction last year, I have finally come to the conclusion that the abandonment of Window Mobile was actually a good thing. No, I have not embraced WP7. I had never seen another Windows Phone in the wild until I when to TechEd 2011 in Atlanta (and I have had my Samsung Focus since November 2010). Needless to say, the popularity of WP7 is so low it would be risky to venture off in that direction at this time. I am sure others feel the same way. One session at the conference said the ComScores for March 2011 placed Windows Mobile 6 together with WP7 at a 7.5% share of the smartphones in the US (and that is a total of 72.5 million smartphone users). Just for comparison, Android was 34.7%, RIM was 27.1%, and Apple was 25.5%. Since probably half of Microsoft’s 7.5% share is Windows Mobile, that leaves a paltry base of users to target (close to the Palm share of 2.8%). How many palm apps are people writing today? Now, you may ask why I think Microsoft’s throwing its mobile developers under the bus is a good thing. Well, it forced me to go develop for Android, BlackBerry, and iOS. I have traded my less than 7.5% Microsoft base for a 87.3% base. I may one day consider WP7 for my applications, but not today. The moral of the story for Microsoft is that if you tell your developers that they are going to have to rewrite their applications from scratch to run on the new version of the platform, they might spend those resources rewriting their apps for another platform (like Android). This business pattern is unfortunately pretty common (look at Intergraph’s upgrade from FRAMME to G/Technology).

Compiled from various sessions at TechEd, I will run down the list of the major new features Windows Phone will include for developers in its next released (called Mango):

  • Currently, the development platform is a subset of Silverlight 3 or a subset of XNA. The Silverlight 3 subset is being upgraded to a Silverlight 4 subset. There was also talk of blending Silverlight and XNA together to overcome problems in each. This blending will be at a page level (mixing Silverlight and XNA pages together in the same app) and at an element level (putting Silverlight elements on a XNA page, such as text). Regardless, it seems like a crazy mash up on many different levels.
  • From the Silverlight 4 upgrade, new features will include: implicit styles, data binding enhancements, and ICommand support.
  • New interfaces will be available for the camera. This feature should finally overcome one of my biggest complaints with WP7, my QR Code scanner app is pretty much useless when you have to take a picture instead of just “scanning”. Why wasn’t this in the first version?
  • A new Read-only Rich Text Box.
  • Clipboard API.
  • Tap, Double Tap, and Hold Events for Text Box.
  • Red Squiqqlies for misspelled words in a Text Box.
  • Support for Sockets which fills another big hole in the current version.
  • Video Brush so you can draw video on a page.
  • Live Tiles get a new API that allows them to be more accessible and provides new features like text on the Back of a Tile (these tiles flip over periodically to show what is on the back). Single apps can now have multiple tiles and the tiles can deep link to a specific page in the app. App can also control the pinning and unpinning of the tiles from the start page. Also, push notification can happen every 15 minutes instead of an hour, and there can now be 30 push notification endpoints instead of 15. There is supposed to be support for animation like the Xbox Live and People tiles too.
  • Push Notification Toast can Deep Link to pages in an app too.
  • There is supposed to be some multitasking and background processing too, but I wasn’t too clear on what this would be. Not having apps like Twitter or IM clients running in the background in the current version really kills the phone’s usefulness for most people.

Beyond the new features for Developers, Mango will also have the following enhancements:
  • Windows Phone 7 apps will run in a special mode to keep them compatible with the new version.
  • 32 BPP support for images, but defaults to 16 BPP. This feature can be used to fix banding problems with gradient shading (at the expense of performance).
  • Improved battery usage for Video Player which will now draw at ¾ size and scales up (with restrictions like must be right aligned)
  • Input thread introduced in ListBox to improve scrolling.
  • Improvements to memory management that will reduce memory usage in an app by 20 to 30%.
  • Off-thread Image decoding will allow ListBoxes with images to display and then fill in the images without hanging up.
  • Internet Explorer will be upgraded to IE9.
  • Rendering and Input for all languages will be supported.

Personally, I really like my Windows Phone as a phone. I find it unfortunate that it is too unpopular to invest any resources into developing apps for it. I think the Mango update will certainly help overcome its faults and maybe Nokia will eventually disseminate enough of these phones that their share of the market will be worthwhile. However, realigning development efforts to match the smartphone marketshare is unfortunately more urgent than waiting for Microsoft’s platform to come up to speed.

No comments: