Chapter 2 Smart Clients

Source: Internet
Author: User
Chapter 2 Smart Clients

The transformation of software from the host system to the C/S structure not only brings about reasonable allocation of system resources, but also brings about a new client experience, in particular, the extensive use of graphic interface systems (mainly Windows operating systems) provides a high-quality, Responsive user experience, and has good support for developers and platforms. However, it is very difficult to deploy and maintain fat clients in the C/S structure. As the complexity of applications and client platforms increases, it is more difficult to deploy applications on customers' computers in a reliable and secure manner. If an incompatible shared component or software library is deployed, one application can easily destroy another application, which is called application vulnerability. New versions of applications are usually provided by re-deploying the entire application, which may cause more serious application vulnerabilities.

To solve this problem, along with the rapid development of the Internet, a Web-based B/S structure emerged, and the client became a "thin client ". This structure solves many problems associated with application deployment and maintenance. Thin client applications are deployed and updated on the central Web server. Therefore, they eliminate the need to explicitly deploy and manage any part of the application on the client's computer.

However, thin client applications also have some disadvantages. The first drawback is that the performance of thin client applications cannot be compared with that of fat clients. Although HTML can be used to make very beautiful pages, JavaScript can also be used on the client for some processing, however, a script language like JavaScript cannot be compared with the compilation language function after all. Theoretically, using C ++ and other compiled languages, you can make any form of client interface. Using thin clients, common application functions (such as drag-and-drop, undo-duplicate, and context-related help) may be unavailable, which may reduce the availability of applications.

Second, the use of Web-based thin clients means that there must always be network connections. Once the network fails, the entire application system will not be available. Because most of the logic and status of the application are on the server, the thin client will send data and process requests to the server frequently. The browser must wait for the response to arrive before the user can continue to use the application; therefore, the response speed of the application is usually much slower than that of the fat client application. This problem deteriorates with low bandwidth or high latency, and may result in a significant reduction in application availability and user efficiency. Applications that require a large amount of data input and/or frequent navigation in multiple windows are particularly affected by this issue.

Finally, because all Web-based thin clients use the HTTP protocol while the HTTP protocol is a stateless protocol, some special technologies must be used to keep the client status, for example, Session. In this way, it will bring additional burden to the server. At the same time, programmers have to deal with various problems caused by Session expiration.

With Java and. the emergence and gradual maturity of new-generation programming platforms such as Net, and because these programming languages and platforms have considered network applications since the very beginning, Smart Client technology has emerged, represented by Java Web Strart and Microsoft Smart Client respectively. Smart Client Applications can combine the advantages of fat client applications with the advantages of thin client application deployment and manageability.

The smart client has the following features:

Rich Performance

The Smart Client is written in languages such as Java and C # and can fully utilize the functions of the programming language (the premise is to pass the security check, of course ), the fact that code and data are deployed on the client and executed and accessed locally is maximized. It provides rich and Responsive user interfaces for applications and powerful client processing capabilities. For example, it may enable users to perform complex data operations, visualization, search, or sorting operations.

Smart Clients can use client hardware resources (such as telephone or bar code readers) and other software and applications, you can use local resources to the maximum extent and integrate local resources into your smart client applications, so that applications can better and more effectively use the hardware that has been provided to you. This makes them very suitable for solving problems that thin client applications cannot solve, and can use multi-document interfaces, so that users can work more effectively and reduce data input errors. This solution also allows your applications to be more closely integrated with your work environment (for example, by using custom or familiar user interfaces), reducing training costs. The use of resources on the customer's computer can also reduce the server-side resource requirements.

You can integrate or coordinate other client applications through smart client applications to provide consistent and efficient overall solutions. These applications should also understand the context of the application being used, and should adapt to the context to help users as much as possible; for example, cache appropriate and useful data first based on the user's usage mode or role.

Zero-touch deployment and Dynamic Loading

Like a thin client, the client can only be deployed on the server. When necessary, the corresponding modules can be downloaded from the server and dynamically loaded into the application system. When updating the application system, you only need to update the server. The client automatically downloads the latest program version from the server, which saves the trouble of updating the system on the fat client. A smart client application can automatically update itself when it is running or in the background. This feature enables it to be updated by role one by one; it is updated in a phased manner so that the application can be promoted to the pilot team or restricted user groups; or it can be updated according to the specified schedule.

The Smart Client can be deployed on the Web server, load and update programs through port 80, and use port 80 to access the Web Service to interact with the server. In this way, to solve the firewall problem and ensure the security of the system.

Offline client

The Smart Client application loads an Assembly over the network. Once loaded, the Assembly is cached locally. After the user starts the application at least once, the Assembly is downloaded and cached to the local memory, so the user can run the Smart Client Program offline, in addition, you can only communicate with the server when necessary to call resources on the server.

Although the network has become an indispensable environment for most applications, we still cannot provide continuous connections to enterprise applications. In some cases, we also need to work in a disconnected network, for example, in some cases when Xia uses a handheld terminal. Offline work methods can cache data first and then store it locally. Then, when you are online again, data and applications are automatically updated. This feature is very desirable, however, before using smart terminals, this is very difficult to implement.

Like a fat client, a smart client distributes a large amount of processing data to the client, which frees the server from the load it needs to bear in a Web-based application. The smart client uses a method that the user wants the application to do-allowing quick data access and management without unnecessary screen updates.

Provides client device flexibility

A smart client can also provide a flexible and customizable client environment, allowing you to configure your applications to support their or her favorite ways of working. Smart Client applications are not restricted to desktop or laptop computers. As the connectivity and capabilities of small-scale devices increase, more and more client applications are needed to provide access to important data and services on multiple devices.

Smart Clients can be designed to adapt to the host environment and provide appropriate functions for the devices where they are running. For example, a smart client application suitable for running on a Pocket PC should provide a corresponding user interface, which is adjusted to use a pen in a small area of the screen.

In many cases, you need to design multiple versions of the Smart Client application. Each version is oriented to a specific device type to take full advantage of the specific features supported by the device. Because small-scale devices are usually limited in providing a full range of Smart Client applications, therefore, they may only provide mobile access to the data and service subsets provided by fully functional Smart Client applications, or they can be used to collect and integrate data when users move. Finally, the data can be analyzed or processed by smart client applications or server applications with better functions.

Ability to perceive the features and use environment of the target device (whether it is a desktop, laptop, tablet or mobile device), and the ability to customize applications to provide the most appropriate features, these are the basic features of many smart client applications.

Two types of Smart Client Solutions

When considering the interaction between the smart client and the server, there are two types of Methods: data-centric and service-oriented. Using a data-centric approach, the client can use local databases and replication mechanisms to manage changes to data in offline mode. With the service-oriented method, the client can interact with many services through service requests. If the application is in offline mode, it can postpone the service request until it reconnects to the Web service. Each method has its own advantages and disadvantages and is applicable to different types of applications. The following figure shows the structure of the two methods:

Microsoft Smart Client

Microsoft provides intelligent Client technology through Offline Application Block. Offline Application Block is a class library developed on the Microsoft. Net platform for Smart Clients. It can be downloaded from Microsoft's website.

Offline Application Block provides the following capabilities to build Offline mode functions into applications:

? Checks whether a network connection exists so that the application can be executed based on its online or offline status.

? Cache necessary data so that the application can continue to run even if the network connection is unavailable.

? When the network connection is available, synchronize the status and/or data of the client application with the server

It can also use other block components. For example, it can use the Caching Application Block to use the cache and use the Caching Application Block as the basis for its reference data cache.

Because Offline Application Block uses a service-oriented method, its functions (or classes) correspond to the functions shown in. The following figure shows the subsystems of the Offline Application Block, which are loosely coupled components.

The following table describes each subsystem shown in the figure.

Subsystem

Description

Connection status management

"Connection status management" checks whether an application is online or offline. There are two ways to determine the connection status: manual or automatic process. If Automatic judgment is selected, the connection status indicates multi-layer connectivity including network layer and application connection (note that application connection detection is not implemented in this application block ). The behavior of the application changes according to the connection status.

Service proxy Management

"Service proxy management" interacts with these elements of the Offline Application Block ("message data management", "Reference Data Management") and the server. It coordinates to return the task completion notification to the application.

Reference Data Management

"Reference Data Management" works with "Service proxy management" and "message data management" to download reference data stored on a local computer. In most cases, the reference data is read-only data used to complete the workflow. "Reference Data Management" can make the reference data consistent with the data on the server. It stores messages in "queues" to download reference data. Then, the "execution program" will connect the message service request to the service to download the reference data.

Message Data Management

Message data is the data created during the workflow. When the application is offline, the data is stored in a local queue. When an application comes online, the "executor" deletes the message from the "queue", sends a "service request" to synchronize data with the server, and then synchronizes the data with the server.

In terms of security, Offline Application Block does not provide a security architecture. However, it supports encryption and signature of all data stored in the cache and queue. Encryption and signature are not mandatory, but we strongly recommend that you use them. By using these security measures, applications can protect data when temporarily storing data on a hard disk.

Summary

No matter what development mode or framework is used to build our interface system, we must make it clear that at the interface layer, there are three main tasks: first, interface performance, the second is the page migration mode, and the third is the interaction with the application service layer. The rational division of these three functions and the organic combination are the basis for building an excellent interface system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.