3.2 Client
There are many mobile device types, including RIM devices, cellular telephones, PDAs, Tablet PCs, and Laptop PCs. These mobile devices can typically operate as thin clients or fat clients, or they can be developed so that they can host web pages (see Figure 3-4). In the following sections, we describe these client types in more detail.
Figure 3-4 Client types
3.2.1 Thin Clients
Thin clients have no custom application code and completely rely on the server for their functionality (see Figure 3-5). Thus, they do not depend as heavily on the mobile device's operating system or the mobile device type as fat clients.
Figure 3-5 Thin clientZero layers
Thin clients typically use widely available web and Wireless Application Protocol (WAP) browsers to display the following types of application content pages:
-
Web (e.g., HTML, XML)
-
WAP (e.g., WML)
For example, if web pages are to be displayed, a Pocket PC can display them through Microsoft Pocket Internet Explorer, while a Tablet PC and Laptop PC can also display them through Microsoft Internet Explorer or Netscape Navigator. Similarly, a WAP browser on a cellular telephone can display WML pages.
Thin clients have several advantages over fat clients. For example, they are much easier to maintain and support since there is no application code or data on them. As a result, there is no need to consider application code release and distribution mechanisms to the client.
The problem with thin clients, however, is that they essentially must be in constant communication with the server, since that is their source for updating and obtaining data. If communications are not reliable, you may need to consider standalone fat client applications instead.
3.2.2 Fat Clients
Fat clients typically have one to three layers of application code on them and can operate independently from a server for some period of time.
Typically, fat clients are most useful in situations where communication between a client and server cannot be guaranteed. For example, a fat client application may be able to accept user input and store data in a local database until connectivity with the server is re-established and the data can be moved to the server. This allows a user to continue working even if he/she is out of contact with the server.
However, fat clients depend heavily on the operating system and mobile device type and the code can be difficult to release and distribute. You may also have to support multiple code versions over multiple devices.
Fat clients can be implemented using one, two, or three layers of application code. However, if you only use one layer it is extremely difficult to isolate the individual areas of functionality and reuse and distribute the code over multiple device types. Thus, it is generally better to use two or, preferably, three layers so that you can reuse as much of the application code as possible (see Figure 3-6, Figure 3-7, and Figure 3-8).
Figure 3-6 Fat clientOne layer
Figure 3-7 Fat clientTwo layers
Figure 3-8 Fat clientThree layers
3.2.3 Web Page Hosting
It is also possible to display and service web pages on the mobile device even when the mobile client is only periodically connected to the network and back-end systems. In order to do so, we need the equivalent of a "mini" web server on the mobile device.
Microsoft has released an HTTP server that runs on a Pocket PC for just such a purpose. Data entered by a user on a web page is serviced by the HTTP server and stored in a local database until it can be uploaded to a server when connectivity has been restored.
Clients that utilize web page hosting can also have one to three layers (see Figure 3-9, Figure 3-10, and Figure 3-11). The main difference between web page hosting and the Windows Forms fat client is that the Presentation Layer displays and utilizes web pages instead of Windows Forms.
Figure 3-9 Web page hostingOne layer
Figure 3-10 Web page hostingTwo layers
Figure 3-11 Web page hostingThree layers