GWT Overview and the benefits of GWT's WEB application development
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 front and back 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 in the process of 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 improved to a great extent. 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 in the figure above for Ext GWT, below is the original message box. By comparison you can see that the EXT GWT message box is significantly more friendly. 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 to do. And this is just a very simple example, and the components that GWT brings to the friendly interface experience are much more than that.
Introduction to GWT Designer
The GWT Designer is the latest Google launch to help developers quickly build GUI and Gwt/java applications in Eclipse with an efficient open vision tool. With GWT Designer, developers can add components without cumbersome duplication by simply dragging and dropping visual components, while using GWT Designer to maximize the work of interface design such as layout management.
Build a GWT development environment based on Eclipse
Eclipse is a Java-developed Open-source IDE supported by several major technology companies, including IBM. Using Eclipse allows developers to write, organize, test, and debug software in an efficient way. Eclipse integrates support for GWT scripts to develop Ajax Web applications using GWT in an Eclipse environment, both code authoring, organization, testing, and debugging, to achieve higher productivity. The GWT development environment based on Eclipse is recognized as the best GWT development environment in the industry.
Build the Eclipse development environment
Building an ECLIPSE development environment is simple. Only need to download from the http://www.eclipse.org/downloads/after the use of decompression. There are many versions of Eclipse, and this article will be illustrated with an example of the Eclipse Java EE IDE for WEB Developers (Version:helios release).