Executive Summary

In the previous chapters we've looked at the first three architectural concepts of local data handling, RDA, and robust data caching; however, applications require not only that data be accessible and transferred to a device, but that the transfer be intelligent and move data in both directions. This is the essence of the last architectural concept covered in this and the following chapter on synchronization.

More robust forms of synchronization using SQL Server 2000 Windows CE Edition will be covered in the next chapter. In this chapter we'll focus on using the features of ActiveSync, Microsoft's desktop synchronization software, to transfer file-based data to and from the device.

ActiveSync has evolved over the last several years, and its latest version, 3.7, includes the ability to perform backup and to restore, install software on the device, interact with the device graphically, perform file conversion, remotely communicate from a desktop application programmatically, and notify an application when connections are made. Because of the breadth of functionality and how it is exposed to developers, solutions can utilize ActiveSync to create a custom ActiveSync provider that piggybacks on the file-synchronization provider that ships with ActiveSync, develop a custom application that uses the remote API (RAPI) from the desktop, and create a custom application that takes advantage of the network pass-through functionality of ActiveSync 3.5 and higher.

When considering these options, creating an ActiveSync provider is the most difficult for Compact Framework developers because the Compact Framework does not support the COM Interop functionality needed to build an ActiveSync provider. Using file synchronization, however, allows a managed application to provide synchronization support with a modicum of effort. Although ActiveSync provides most of the infrastructure, this chapter will discuss a few additional nuances, including avoiding file collisions and implementing automatic notification. RAPI applications provide a more customized mechanism and rely on ActiveSync only for connectivity. The uses for RAPI applications are virtually unlimited due to the breadth of RAPI functions that allow remote activities, such as retrieving device system information, accessing the device registry, controlling processes, communicating with device windows with Windows messages, and performing directory and file manipulation, including the copying of files in either direction. Finally, pass-through applications can be written when using ActiveSync 3.5 and higher, coupled with Pocket PC 2002. In this scenario the PC acts as the hub to the network for the device and has the advantage of allowing synchronization directly with server software, allowing for more flexibility and scalability.

Regardless of which option is chosen, primitive synchronization like that discussed in this chapter typically works at the file level, and so, more granular requirements can be satisfied using SQL CE synchronization, as discussed in the next chapter.