Device Development Makes a Move
Don't be deterred by Microsoft's recent changes to the mobile development space.
by Dan Fergus
April 24, 2007
Change is usually good. However, sometimes too much change too quickly can be bewildering and confusing. That's how I feel about the device development space. I've always been a big advocate of Microsoft doing more to help its developer community tackle mobile development. The company is starting to respond — the folks in Redmond are now offering new products for device application developers.
Over the last few months, we've seen a lot of activity at Microsoft, from the release of SQL Server 2005 Mobile Edition to the even more recent release of Windows Mobile 6. As the hardware becomes more appealing, users will demand more from the software that is available for their mobile devices. And those of us who develop that software will have a lot to keep up with.
Take a look at databases. Way back when, if you wanted a database on a device, you used Access. But with the release of the .NET Framework, you could no longer support the Access data layer in managed code. Instead, Microsoft released a version of SQL Server 2005 for devices, a product that has been revised several times over the years.
Microsoft's most recent rev of this product is the SQL Server 2005 Compact Edition. It is truly mobile database nirvana. (Okay, maybe I exaggerate a bit, but it's an extremely useful tool.) For example, you need portability between the databases on a device and data on the desktop. Previous versions restricted your database to devices and tablets. SQL Server Compact lets you copy a database from a device to the desktop and access it as a desktop file. For those of you who still use Access, you will find an Access database synchronizer that allows you to sync data from Access to the SQL Server Compact database.
Just this month, Microsoft released another tool for device applications developers: the Service Pack 2 (SP2) of the .NET Compact Framework version 1.0 and 2.0. A big feature in SP2 is the Remote Performance Monitor. This feature helps you find those pesky memory leaks in the managed heap. You are able to take snapshots of the heap at any point in the execution of your application. With these snapshots, you can compare the allocation trends of your application across multiple executions and the live instances of objects on the heap. Plus, Microsoft fixed a long list of bugs in SP2.
But the biggest news came with the recent release of Windows Mobile 6 — a release that some may say is premature. Those of you who are just getting into device development and only beginning to adjust to Windows Mobile 5 may be concerned with compatibility problems. However, Microsoft provides an easy upgrade, and almost all types of applications written for Windows Mobile 5 will run on Windows Mobile 6 devices. Conversely, applications written after you've installed the SDK for Windows Mobile 6 are also portable back to Windows Mobile 5, provided that you do not use calls exclusive to the Windows Mobile 6 API set.
Additionally, Windows Mobile 6 introduces the Device Emulator 2.0. I often suggest using a device on the network whenever possible to debug applications in Windows Mobile 5. While that advice is still valid, your debugging experience is greatly improved if you use emulator functionality. The Device Emulator 2.0 has better performance than the previous release and many useful features, including more emulator skins, power state emulation and phone emulation.
Another new, and fun, feature in Windows Mobile 6 is FakeGPS. This utility lets you test your global positioning system (GPS) applications without actually accessing GPS feeds or a device with GPS.
In this column for Visual Studio Magazine's Web site, I'll explore these topics in more detail, helping you tackle the steep learning curve associated with Microsoft's recent contributions and rapid changes to the mobile development space..
About the Author
Dan Fergus is the principal technologist at Forest Software Group, which provides consulting and contracting services to companies throughout the U.S. He is a Device Application Development MVP, a trainer, and the co-author of The Definitive Guide to the .NET Compact Framework. Fergus has also written many articles, is a frequent speaker at conferences and user groups, and is a contributing editor for Visual Studio Magazine. Contact him at email@example.com.
Back to top