What changes did Windows Mobile 6 introduce, and how will they affect your application development?
Back in May 2007, Microsoft announced Windows Mobile 6—the latest update to the operating system that's used in hundreds of different models of PDAs and smartphones. Now that devices based on Windows Mobile 6 are hitting the shelves, here's a look at the new features from the perspective of the developer.
Most of the improvements made to Windows Mobile 6 were focused on improving the "end user experience." In other words, a lot of time and effort was spent refining the built-in applications, tweaking the user interface, and adding prettier themes and new functionality. As a result, Windows Mobile 6 devices certainly look a lot better, and applications perform new tricks (the e-mail client displays HTML, for example), but overall the goal was to minimize the impact to developers.
For that reason, you still use Visual Studio 2005 to develop applications in Visual C++, Visual C# or Visual Basic .NET—you simply need to download the new version of the SDK. The new SDK gives you access to the latest features and some new emulators, but your older projects will all re-compile cleanly.
Overall, this is good news for anyone writing software for Windows Mobile. Making sure that existing Windows Mobile 5.0 applications would run on Windows Mobile 6 was a top priority for the development team. As an insider, I've seen firsthand how seriously this issue was taken, and the result—I hope—is that almost all applications should work seamlessly on Windows Mobile 6 devices.
What is new for developers
Although the goal of Windows Mobile 6 was to ensure compatibility, the development team couldn't help adding a few goodies.
New features in ROM
As a developer, your heart will probably skip a beat when you learn that both the .NET Compact Framework version 2 SP2 and SQL Server 2005 Compact Edition are present in ROM in every Windows Mobile 6-powered device. Although both could optionally (and in fact, often had to) be installed on a Windows Mobile 5.0 system, they consumed extra storage space and introduced complications into the installation process. With Windows Mobile 6, the default state is that both are present and ready for action.
For the uninitiated, the .NET Compact Framework is the library of extremely useful classes for use with the managed programming languages Visual C# and Visual Basic .NET. As well as useful programming aids, such as classes for everything from implementing stacks to file handling, there are some classes specific to Windows Mobile, like accessing important features such as taking pictures. For more information on using managed code and the Compact Framework, see this section on Microsoft's MSDN site (msdn2.microsoft.com/en-us/library/bb158547.aspx).
Having SQL Server 2005 in ROM is also very useful. If you hear the word "database" and immediately start falling asleep, this may just rouse you from your slumbers. Here's why: Imagine you are writing an application that stores data in some shape or form—and it doesn't have to be something you would consider a "database" per se. For example, let's say you wanted to keep track of a list of URLs, or file names, or text strings, or even images. Sure, you could create C# objects to store all this stuff, and then write methods to search and return the ones you wanted, but that's what SQL Server already does. You can easily create a database to store the information, and then use SQL queries to get back just the objects you want. There's plenty of documentation available on MSDN that'll walk you through creating a database in C# (msdn2.microsoft.com/en-us/library/bb158551.aspx).
New APIs