Executive Summary

Truly mobile applications go anywhere. While several factors go into the recipe for mobile applications, the ability to access remote data while disconnected or away from the office is an important ingredient. Windows CE provides several mechanisms for accessing data. With the .NET Compact Framework running atop of this Win32 operating system, a developer has additional runtime supports that make various types of communications possible for remote applications.

In the design of mobile applications, several areas should be investigated that include application characteristics, the distance of the device from a network connection, throughput of the available network-connectivity options, communication hardware, and costs. Each of these has multiple considerations that influence how the application should be designed and what Compact Framework technologies are used.

Once these factors are addressed and the project is a "go," the Compact Framework is ready for action. The framework provides different functionalities in the System.Net namespace that give a disconnected application the ability to push and/or pull data programmatically from the back end.

At the highest level, the Compact Framework allows an application to be an XML Web Service client (or consumer). This works the same as for desktop Framework clients because VS .NET provides the same experience in the IDE to connect to the Web Service.

Another alternative at a higher level is using the System.Data.SqlClient namespace to access SQL Server 7 and 2000 databases. Although easily understood by developers today, this option has several limitations when used from the Compact Framework, including synchronization and scalability.

Yet another mechanism for network communication in the desktop and Compact Frameworks is the availability of Pluggable Protocols. This architecture provides an application a way to work with different protocols without having to code for each one. The only provided class in this scheme for the Compact Framework allows HTTP-based communication. However, the architecture is extensible so that applications can add other protocol support classes as needed.

If lower levels of communication are needed, the Compact Framework includes classes that reside in the System.Net.Sockets namespace and are based on Socket Win32 implementation. This list includes the Socket class and the socket implementations of TCP and UDP protocols (TcpClient and TcpListener and UdpClient, respectively). Additionally, support for infrared communication exists in the IrDA namespace, allowing a developer to communicate easily with other infrared-based devices.

When dealing with occasionally connected devices, the application on the device usually stores data collected from tasks and later synchronizes to a back-end system. A professional feature of such applications is automatic synchronization when connectivity occurs. The Compact Framework does not provide a method to do this, although it can be accomplished programmatically.

Finally, with the myriad ways of accessing remote data, it is important that the UI remain responsive as the application connects and synchronizes data. The Compact Framework gives the developer asynchronous support in System.Net so that Compact Framework applications can maintain a responsive UI.