The client application is normally built simultaneously with the server application. Once the server interfaces are defined, server-side development can proceed in isolation. Client developers usually use “fake servers,” which implement the remote interface in trivial ways and run in the client process when developing the client application. This allows server developers a little more freedom to design and develop their part of the application; it avoids forcing them to commit to a total architecture early in the development cycle.
Another reason why clients and servers are often built simultaneously is that the skills required to build them are fairly distinct. Developers building the client application have to know how to build a good user interface (e.g., have mastered a substantial portion of the Swing toolkit) and don’t really need to read anything in this book past this chapter. People building servers can make do with far less knowledge of the user interface components, but should definitely read the entire book.
In order for this to work, however, client-side developers must take care to heed one simple rule of thumb:
Consume as few server resources as possible, for as short a time as is reasonable.
This rule of thumb has two main consequences: don’t hold connections to a server you’re not using, and validate arguments on the client-side whenever reasonable.
The client has to connect ...