Getting Started with Windows Mobile Development In today’s world of fast food, fast cars, and instant gratification, people expect to be in touch at all times. We have become conditioned to staying in touch with businesses, friends, and families. Because of this desire for instant data, we have the Internet, cell phones, Wi-Fi, MP3 players, and DVD players. As the equipment needed to drive this thirst has become smaller and smaller, we find ourselves looking for portable replacements for our bulky desktop computers. This article will guide you into the exciting world of mobile development so you can take advantage of an expanding opportunity to supply software to this burgeoning market. Getting Started There are currently two choices for producing mobile software using a Windows operating system: XP using ActiveSync and Vista using a new interface built upon ActiveSync technology called the Windows Mobile Device Center (WMDC). In the recent CoDe Focus issue on Mobile PC Development (2007, Volume 4, Issue 2), Nick Landry’s article entitled “Windows Vista Mobility: Why Should You Care?” provides a good review and tutorial on using WMDC with Vista. If you’re going to use WMDC, you’ll definitely want to read this article. If you are using Vista, download the WMDC from the Microsoft site; otherwise, download ActiveSync for use with XP. The remaining software requirements are not operating system dependent. When you install Visual Studio 2008, the .NET Compact Framework and SQL Server Mobile Edition are also installed. Visual Studio 2008 is required to use the latest version of the different frameworks. If you plan to develop for earlier versions of the Compact Framework, you can use either Visual Studio 2008 or 2005. The Compact Framework The Compact Framework is the vehicle for mobile development. How does the Compact Framework differ from the full version? For starters, Microsoft removed most of the nice-to-have method overloads and non-essential functionality. As a result, the Compact Framework has a much smaller footprint. Distilling the regular framework to a size easily installed onto a device with limited memory and disk capacity must have been no easy task. The Compact Framework provides nearly everything you need to develop for Smartphones and Pocket PCs. However, the Compact Framework does not provide support for: - Click once deployment
- Remoting
- Printing
- Web Forms
- Configuration files
- Binary serialization
You can easily replace most of the missing functionality with your custom code or solutions available from third-party solution providers. SQL Server Mobile Edition (SQLme) Although SQLme is a subset of regular SQL Server, which works with both SQL Server 2005/2008 and the Express versions of each product, the majority of necessary functionality is there. You can use the SQL Server Management console to manage your SQL Server mobile database on the desktop or on the PPC through a direct connection. There are a few limitations to using SQLme: - No stored procedures
- No batch queries
- Limited table design
The lack of stored procedures is not a big problem to overcome. It is easy to simulate stored procedures using TableAdapters. Create as many methods on the TableAdapter as needed. When I need to make a data call, I can refer to the method name instead of a stored procedure. If I choose not to use TableAdapters, I can simply add methods to my data layer to accomplish the same task Missing batch query capability is again not much of a hassle with disconnected data. You are not doing massive amounts of data munging or extraction on the mobile platform. Most basic data operations on a mobile platform are data retrieval for display and updating. Since these retrieval requests are through a data layer, it makes no difference if the commands are processed together or one at a time. Limited table design is not a real problem either. The most frustrating thing about using the table editor in the management studio is that you cannot move columns around in your design without deleting them and redoing them in order. Make sure your design is what you want before you create a number of tables. Other than the easy manipulation of table design, the rest is like the regular version so you have a wide range of data types to support your requirements. | & | | 
By: John Baird
John Baird is the founder of Quay, Inc., a professional consulting firm specializing in software development using Microsoft technologies. John has 28 years of experience designing, coding, and implementing software solutions.
John co-founded the Northern Delaware .NET Users group, is heavily involved in the local .NET communities, and travels extensively presenting to user groups, code camps, and special interest groups.
jbaird@quayinc.com | Fast Facts | | Although the Compact Framework is roughly 30% the size of the regular .NET Framework, it provides all of the requisite functionality to create powerful mobile applications. | |
|