A detailed explanation of GWT engineering architecture

Source: Internet
Author: User

A, GWT technology introduction

1.AJAX Technology Introduction

Ajax is the abbreviation for asynchronous JavaScript and XML (and DHTML, etc.), and is composed of XHTML, CSS, JavaScript, XMLHttpRequest, XML and other technologies, and is the current web A popular technology in the field of application development to create more dynamic and interactive Web applications that enhance the user's browsing experience.

The core of Ajax is the JavaScript object XMLHttpRequest. XMLHttpRequest is an object that handles all server communications and is a technology that supports asynchronous requests. In short, XMLHttpRequest allows you to use JavaScript to make requests to the server and process the response without blocking the user.

2, GWT Technology Introduction

Google Web Toolkit (GWT) is Google's launch of the AJAX application development package, GWT support developers use the Java language to develop AJAX applications. GWT provides a set of Java-language-based development packages that are designed to refer to the Java AWT Package design, class naming rules, interface design, event monitoring, and so on, which are very similar to AWT.

Developing your GWT application using eclipse requires preparing your environment. 1) Eclipse3.3 or above (2) need JDK1.4 or above version; 3 need GWT's Webtoolkit current version is 1.6.1;4) need the latest version of GWT SDK currently is 2.4.

Second, GWT engineering structure detailed

A new GWT project will have the following structure:

1.SRU directory storage source code;

2.client directory is the UI code, that is, interface code, will be compiled into JavaScript code embedded page to invoke;

The 3.server directory stores the server-side code;

The 4.shared directory is a page checksum code that is compiled into JavaScript code;

The 5.test directory is stored in the test code;

6.war stores the release information.

Below the root of the package name is a file that ends with Gwt.xml, which is the configuration file for the GWT project, as shown in the following details:

<?xml version= "1.0" encoding= "UTF-8"?> <module rename-to= ' mygwtdemoprj ' > <!--
	 Rename-to rename: Using rename-to= ' mygwtdemoprj ' compiled GWT information will be stored in the Mygwtdemoprj folder if rename-to= ' Mygwtdemoprj ' is not used The compiled GWT information is stored under a package-named file, such as COM.LANP.MYGWTDEMOPRJ below.

  --> <!--every GWT project must inherit Com.google.gwt.user.User, which is the core--> <inherits name= ' Com.google.gwt.user.User '/> <!--for this GWT application of the specified style, there are standard and Chrome browser. --> <inherits name= ' Com.google.gwt.user.theme.clean.Clean '/> <!--<inherits Name= ' Com.google.gwt.user.theme.standard.Standard '/>--> <!--<inherits Name= ' Com.google.gwt.user.theme.chrome.Chrome '/>--> <!--<inherits Name= ' Com.google.gwt.user.theme.dark.Dark '/>--> <!--If you want to inherit another module, add it here, such as adding Gwtext--> <!--specifying this GWT application The entry point class, to write the full path of the class name--> <entry-point class= ' com.lanp.client.MyGwtDemoPrj '/> <!-- Specify which directories below the content to be GWT compiled into JavaScript--> <source path= ' client '/> <source ' shared ' path=

</module> 

The GWT application foreground interacts with a back-end interaction in the form of GWT RPC.

third, recommended books

Foreign is "manning.gwt.in.practice.apr.2008.pdf", the domestic is "the Secret of GWT."



Ok,tks.

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.