Comparison of applets and HTML as clients in Java EE

Source: Internet
Author: User
Tags comparison interface client firewall
j2ee| Comparison | client

Preface

In Java EE, the client commonly used in two ways is HTML, and based on the application applet, because the use of different technologies, both methods have their advantages and disadvantages, in considering what technology (or both), need to be based on the characteristics of two technologies, and the scope of application of this project to consider comprehensively. The following are "ease of use", "performance", "Maintenance, extension", "interaction", "security" five parts to illustrate their characteristics, and for the customer, the developer role to clarify the personal point of view.

Ease of use

Customer requirements for ease of use are very high, often because of the lack of usability, developers to rewrite the code, some usability deficiencies, and even lead designers to the project part of the structure of the redesign. The following describes the features of the technology in terms of ease of use:

1 Web Way has been recognized, compared to C/s mode, you can reduce the user's grasp of the software time

2 The Web interface is rich, can get the user's favorite;

The web interface can be supported by a variety of technical support, such as applet,flash, binary images, JavaScript, and so on, and in the aesthetically pleasing interface, the web approach never lacks the relevant resources. Beautiful interface, can get the user's favorite;

3 Because the client has a strong interaction, in some customer's special requirements, the client has an absolute advantage, bringing a very good ease of use

The client approach is based on the build, it is difficult to compare with the web, but, because the use of application client side has a good interaction (see below), can complete the HTML can not complete the interface, such as in the network management software, the most commonly used graphics management, that is, through the map to look at the network, pipe network. This is almost impossible to accomplish on a web-style basis.

Performance

Performance is also a focus of user concern, it depends on a number of aspects, such as system design, access mode, or even the quality of coding, only consider the client use, the key is two points:

1) Web Way

The classic Java EE mode is as follows:

HTML-----servlet-----EJB----Database, because of the use of HTML, every page update needs to refresh the page, it is obvious that the server end of the user response slowed. In addition, the servlet is also used in the middle, which also slows down the response.

2 keep static data in client, improve speed

Using application client to access data directly (database or bean) can improve the response speed, it does not need to refresh the page, a load on it. In addition, in the project, there are often static data (Staticdata) can be retained in the client memory or the local database, greatly improve the performance of the system, but the Web method is not possible.

Maintenance, extension

For the use of swing to develop a client is the pain, 1 is a bad integration environment, 2 is often developers do not understand, not familiar with swing, leading to frequent errors in development, 3 is swing available resources are too few. This is a system in my deep experience, it is self-evident that the result is that the code is difficult to maintain, expansion, very inconvenient. And the Web way is different, interface customization can easily according to customer needs to make the right interface, if you need a certain resources (such as source code), it is easy to find.

Interacting

The interaction here refers to the interaction between applications rather than the user's interaction with the application. Both have a large number of similar keys and techniques to complete the interaction between programs, but the following 2.2 are significantly different:

1) Synchronization

In order to dynamically respond to other client modifications to the resource, or to respond to messages sent to the client by the server, the most common use of web-based clients is to refresh the page without a certain amount of time. New messages from server-side Message Queuing or database to the modified resources, this is a dynamic, timely strategy. This is undesirable in projects with high synchronization requirements, and using application in Java makes it clear that the desired synchronization requirements can be achieved entirely with JMS.

2) Graphical interface

Many network management systems are beginning to use graphics to look at the network, pipe network. The use of the web, the maximum can only static projection graphics, can not carry out the event response, it is difficult to have interactive function, and the use of application is different, users can drag on the graphics, click, and trigger the corresponding operation, etc.

Safety

This is only to consider security from the point of view of system integration, since remote application usually access the bean directly through the RMI/IIOP to obtain information, and the bean is on the firewall-protected application server, which inevitably causes the firewall to develop certain ports, allowing certain information to enter the firewall, This leads to the system's insecurity, in addition, in the client, to use the applet, must give it certain permissions, such as the use of local database technology, you need to give the applet access to local data, in order to use JMS to obtain synchronization, you need to develop its port permissions to accept messages. If the applet access policy is not configured correctly, it will cause the client to be unsafe using the HTTP protocol based Web approach while avoiding both of these scenarios.



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.