In-Depth

Device Development Makes a Move

Don''t be deterred by Microsoft''s recent changes to the mobile development space.

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.

About the Author

Dan Fergus is the chief architect at Forest Software Group, developing .NET applications, including Pocket PC sports team applications. He speaks at major conferences, does consulting, and teaches Compact Framework, VB.NET, and ASP.NET courses. He coauthored The Definitive Guide to the .NET Compact Framework (Apress). Reach him at danf@forestsoftwaregroup.com.

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.