GWT can use Java code to develop AJAX-enabled application frameworks

Source: Internet
Author: User
Keywords Application framework AJAX features Gwt java code

This article combines GWT Designer with a small web http://www.aliyun.com/zixun/aggregation/14223.html "> Application System" for a complete introduction to GWT based Web application development. Including development environment, data communication and application deployment.

Ajax and Ajax-based WEB application development overview

Ajax, "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), is a web development technology that creates interactive Web applications. With this technology, software developers can develop smaller, faster, and more user-friendly Web applications in the shortest amount of time. In a traditional Web application, the user fills out and submits the form, sending a processing request to the Web server when the form is submitted. The server receives the user's request and processes the form, and returns the results to the user in a new page. This approach wastes a lot of bandwidth because most of the HTML code in the two pages is often the same. In addition, because each interaction needs to send a request to the server, the response time of the interaction depends on the response time of the server, which results in a much slower response from the user interface than the local application. With Ajax technology, JavaScript allows you to create XMLHttpRequest objects to communicate directly with the server and to exchange data with the WEB server without overloading the page. Because the data transmitted during the communication is useful data that can be controlled by the developer, the redundant HTML code is eliminated, the bandwidth consumption is reduced, and the response speed of the WEB application system is greatly improved. In addition, because using the XMLHttpRequest object as the background communication tool, the page does not need to refresh all, only the local changed data needs to be refreshed, so as to achieve the effect similar to desktop applications.

Advantages of using GWT for Ajax WEB application development

Google Web Toolkit (GWT) is a Java-based AJAX Web application Development framework launched by Google. In this framework, developers can easily create Ajax Web applications without having to focus on JavaScript authoring and debugging, and making it easy to build apps like desktop applications in a browser.

The use of object-oriented Java instead of JavaScript has greatly improved development efficiency.

JavaScript is a scripting language that can be used to make network-independent, user-interactive, complex software. It is an object-based (object Based) and event-driven programming language (Driver). But JavaScript does not implement a true inheritance relationship (note: Use in prototype objects, although you can implement data sharing in two instance objects, simulate inheritance, but this is not true inheritance, but also can not implement multi-level inheritance relationship). Therefore, the use of JavaScript to complete the development of Ajax, very time-consuming, code re-use rate is low, difficult to debug, the later maintenance of a huge workload.

In contrast, Java is a real object-oriented language. Based on Java, an object-oriented language, GWT brings real software engineering methods into the development of AJAX applications. GWT offers a wealth of infrastructure that frees developers from the complexity of repetitive Ajax builds and focuses more on business layer and program performance optimization. Developers can quickly build and maintain complex, high-performance JavaScript applications by using GWT.

GWT provides a friendly interface that reduces the landscaping of WEB applications

Because the generic components are not friendly enough to cause web development and have a lot of landscaping work to deal with, so the previous web development, all need professional art to help complete. GWT's rich component library makes it easy for users to develop a visually enjoyable UI interface. As shown in Figure 1.

Figure 1. GWT message box

The message box provided by Ext GWT above is the original message box below. By comparison you can see that the EXT GWT message box is significantly friendlier. The traditional way of Web development is to implement a message box with the EXT GWT style, with a considerable amount of additional landscaping work. And this is just a very simple example, and the components that GWT brings to the friendly interface experience are much more than that.

Related Article

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.