Share this Page URL
Help

Part VIII: Appendixes > Programming Considerations - Pg. 777

Transporting Files with Briefcase 777 Synchronizing Laptop Computers and Desktop Computers--The reality is that not everyone is con- nected to the network all the time. Some employees, such as sales staff, may only connect once a day, or less. Others may connect during the day, and then take their portable computers home at night. Another group may work on a desktop computer at the office, then go home and fire up another computer so that they can continue working on the data. In each case, the challenge is the same-- to ensure that changes made on one computer appear on the other. A second requirement is that when changes are made on both computers, the user is aware of the potential conflict, and can either reconcile the changes or select the correct version of the file. Briefcase is a good way to meet the requirements of these users, especially in the situation where a desktop computer and a portable computer must be synchronized. When the same person uses both computers, the assumption is that changes are made on only one computer at a time. There- fore, any changed files can be copied to the other computer without any concerns about reconcili- ation. Newer portable computers that have Plug and Play docking stations can automatically start Briefcase when they are reconnected, so that file synchronization immediately takes place. The Briefcase feature was introduced in Windows 95, so it makes sense to have the desk- top computer running Windows NT 4.0, and the portable computer running Windows 95. The Briefcase works with no problems between these two operating systems, but it is not backward-compatible with Windows NT 3.51 or Windows 3.1. Of course, you will have an even better solution if the portable computer is also running Windows NT 4.0. Replicating Simple Databases--Contact and sales databases are exactly the type of database people like to have on their portable computers. But for corporate productivity, the information in these databases should be available to all. You can do this by building a central database on a server, using an application such as Access 95. Then copies of the database are kept in Briefcases on each portable computer. When the mobile users connect in, they update the server database with the changes. Access supports briefcase replication, so that only records that have been changed are updated--the entire database file is not replaced. The result is that several users can make changes to the same master copy of the database. Access also supports reconciliation, so that the database administrator or the user can decide what record should be kept or discarded when there is a conflict. Database replication with Briefcase works best when each user is responsible for a set of data, and there is no overlap. For example, members of a sales force may each cover a differ-ent territory with different customers. There will be little risk of conflicting changes, and the corporate server will contain a master copy of the data for use by accounting, marketing, and so on. This master copy could also be useful if something happens to the copy on the portable computer. The preferred design for these replicable databases is to split the data from the application, which is easy to do in Access 95. The application resides on the portable computer, and works with a replica of the data file. When the portable computer connects to the network, the data records are compared for changes. Programming Considerations In order to allow the Briefcase replication to work, some changes have been made to the OLE specification, and several new APIs have been introduced to allow programmers to take advantage of the Briefcase functionality. OLE 2.1 Changes Windows NT 4.0 and Windows 95 incorporate an updated version of the OLE specification, version 2.1. There are some additional features used by OLE 2.1 that are used in Briefcase replication. These include: