HTML, SWING is also XML, Java client tool selection? (two)

zhaozj2021-02-17  60

How many people today is using Java Applet as a client today? Maybe HTML-based UI is safer, but is this the best choice? A business unit TELECORP PCS of AT & T has developed an application that allows its store to collect information that wants to purchase mobile phones, check their credit card, and then immediately open mobile phone, in addition to confirming the user input, the application must also pass Use sort, selection, and other standard database function to process the submitted report. In addition, the application needs to display a notification when a new mobile phone is turned on. Can you use HTML to accomplish this? Perhaps it may, but it will be very annoying, and the speed is very slow, and the network connection needs to be used without interworking. Telecorp PCS decides to use Java in an action of the Adventure, then what is the result? Fully successful, this application uses SWING during development, and is available on an Internet website that uses Java plug-ins. By using the Swing UI class, it is simply completed the functions required by the application. I believe that many developers have used Applets when using Java early, and spend a lot of time in solving the incompatibility between various browsers, APPLET download time, performance. For client Java's largest criticism comes from its objectivity, now there is a big change. Sun has spent a lot of time to improve its code quality. Here I will explain why Swing UI is worth trying. Swing and its departments I don't need to describe how much new ideas are more designed for Swing's internal architecture and the design of classes and interfaces, design templates. Swing is almost the most thorough form system I have ever seen, and its relationship between containers, components, and UI elements is very clear. Swing architecture is based on Model-View-Controller (MVC) design template, and its data is independent of each other and processing. Most SWING models are shared by various UI elements. For example, JTable uses Jlist, JTree, which makes learning and use Swing very simple, and TemMAND, OBSERVABLE, and LISTENER, etc. provide good flexibility and good object-oriented features. Perhaps the only deficiencies in the Swing architecture is that all events are delivered to the same EVENTDISPATCH thread, making the entire GUI client application only one thread. However, we can simply overcome Swing this shortcomings by using different threads to respond to user commands without passing all operations through the EventDispatch thread. Each JDK version released by Sun has improved the performance of Java and Swing. The improved performance related to SWING in JDK 1.3 is in performance, memory consumption, and an input confirmation framework. Improvements in performance and memory consumption are considerable. Our company upgrades the client's application from JDK 1.2.2 to 1.3, memory consumption is reduced by 30%, and some application memory is reduced. Since the internal initialization process in Swing is optimized, our client application runs faster. Briefly, the maximum impact on speed is a large number of classes that automatically generated when loading other interface components, and this program contains only one class. Another major change is the default JVM is a HotSpot Client VM, which is specifically optimized for GUI drawing and client applications, and can get the default JVM by running the Java command in the command line mode. The Enter the confirmation box allows us to easily implement command fields or enter confirmation by programming. Before this, if you want to process the previous user input before processing the next field, you must add a listener on that part. Whenever the part is no longer a focus, it needs to be confirmed. Very monotonous and bored.

转载请注明原文地址:https://www.9cbs.com/read-29489.html

New Post(0)