Summary

Accessing data across a network is slow relative to moving data across the computer’s bus, or reading it from a local CD-ROM drive. This is especially true on a dial-up network connection such as or wireless network. And if you are writing a Palm OS networking application, there’s a good chance you’ll be using dial-up or wireless. The Zen of Palm requires a sophisticated event-driven application to support slow network operations and still appear responsive.

Of course, a scripted architecture had the virtue of simplicity. In Chapter 9, a single function, PnpFtpLogin, manages the entire login process. Every operation flowed directly into the next, there was no need to keep track of any state information. If an error occurred at any step in the process, we simply stopped and returned the error. For all its unresponsiveness, it provides an excellent example of exchanging data across a network.

Changing from a script-oriented model to a state-driven one required a lot of code changes to our FTP implementation, but only one new networking function. The vast majority of FTP changes were to maintain of the session state. This is the truth of network programming; most of your time will be spent managing the data that is sent or received on the network, not on sending and receiving that data.

Get Palm OS Network Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.