Windows Phone 7's next update, code-named Mango, offers a number of improvements worthy of developers giving WP7 a second look. Here's an overview of what's new in Mango.
One of the biggest knocks against Windows Phone 7 (WP7) is that its development APIs were too restricted to allow developers to write a number of applications. Indeed, I have leveled this charge against WP7.
The next big update to WP7, "Mango," will not only bring the OS very near Android and iOS in feature parity, it also gives WP7 developers a lot to love too. The second beta of the Windows Phone SDK is available, and App Hub members can get a beta of the Mango SDK to load onto their phones. WP7 is now much closer to being a full-fledged mobile development environment, while still retaining the security and functional limitations that make WP7 such a stable, pleasant phone to use.
I don't think Mango should be "WP7.1" -- it should be "WP8" because of the large number of improvements. Here's a cheat sheet in terms of what is new in WP7 for developers.
Silverlight is being upgraded to version 4, and with that comes a few breaking changes. Outside of that, there is nothing but upside here. In addition, the phone now supports true multitasking in addition to the original tombstoning model. When your task is deactivated, it is now frozen in the background if memory permits, and when memory gets low, then it goes through the tombstoning process.
I think the best part of Mango for developers is that so many parts of the OS are now open for use in applications, including:
- Access to the camera and microphone in a real-time fashion from within the application
- Read-only access to the contacts, appointments, and other similar items
- Background audio (for example, a soundtrack or a music player)
- Sockets for network communications
- Web browser control (using the new IE9 engine, which means HTML5 capabilities)
- Querying device capabilities and status, including network connection information
- Significant enhancements to the application's titles, so they can act more like the OS's built-in "Live Titles"
New and expanded APIs
- Scheduling periodic tasks to run in the background; these can be short, regular tasks, or resource intense, infrequent tasks. "Toast" popups can be sent to the OS from these tasks.
- Reflection.Emit and compiler services
- Real-time reading of sensors such as the compass and accelerometer, instead of having to rely upon the event-based model.
- Background HTTP file transfers, with the OS queuing requests. You no longer need to rely upon the event model like you previously did.
- Numerous expansions to LINQ
There are three overarching themes to the improvements. First, all of the hardware and OS layers that dev said they wanted access to are now exposed. Second, they are exposed in a read-only fashion whenever it could ruin an OS setting or data stored outside the application. For example, contacts are read-only, but your application can interact with the camera. Along the same lines, you can control the relative volume of a track playing in the new player system, but you cannot control the overall system volume. I see this is a needed compromise; as someone who lived with an Android phone for a year, I know the chaos that can be caused when any application has nearly unlimited read/write access to the OS (nothing like having a game wreck your ability to receive text messages, which I experienced). At the same time, you need this access as a developer to write innovative, useful applications. Third, many of the things that were previously only available via an event model, whether it was popping up a control to do something and getting the data back (like the camera), or not being able to easily get a value from the system (such as the accelerometer) now have a traditional imperative interface to them, which is welcome. Not every app needs to be written in an event-driven manner for its I/O.
For the developer, WP7 is now worth a second look, because the expanded SDK enables dozens of new applications that you never could do before. Some examples off the top of my head are:
- Apps with reminders
- Video chat
- Workout helpers that play music
- Trip trackers
As a result, people who may have been sitting on the fence due to lack of applications will soon have good reason to check out WP7 again as the applications get a lot more like what you see on Android and iOS devices.