1 / 12

GWT Google Web Toolkit

GWT Google Web Toolkit. Build AJAX apps in the Java language. www.web2pointo.wordpress.com. Google Web Toolkit. What is GWT?. Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications.

Download Presentation

GWT Google Web Toolkit

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GWTGoogle Web Toolkit Build AJAX apps in the Java language www.web2pointo.wordpress.com

  2. Google Web Toolkit What is GWT? • Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications. • The Google Web Toolkit (GWT) lets you create Ajax applications by writing Java code and generating JavaScript automatically. • GWT takes Java code written against a special API and converts it into browser-runnable Ajax code.

  3. Google Web Toolkit Features • Open Source • Readymade, Dynamic, reusable UI components • RPC • Browser history management, debugging • Browser compatible • JUnit integration • Internationalization • Interoperability • Fine-grained control

  4. GWT development cycle: • Write and debug an application in the Java language using as many GWT libraries using any Java IDE. • GWT's Java-to-JavaScript compiler to distill our application into a set of JavaScript and HTML files. • We can serve the files with any web server Like Tomcat, Web Logic, etc)

  5. Why Translate Java Code to JavaScript? Java technologies offer a productive development platform, and with GWT, they can instantly become the basis of your AJAX • Java-based OO designs • Common JavaScript errors (typos, type mismatches) are easily caught at compile time rather than by users at runtime. • Static type checking in the Java language boosts productivity while reducing errors.

  6. Using Google Web Toolkit • You can use GWT's set of UI components (called Widgets) to construct the UI elements that make up your AJAX application. • Like traditional UI frameworks, Widgets are combined in Panels that determine the layout of the widgets contained within them. • GWT supports a variety of built-in Widgets that are useful for AJAX applications, including hierarchical trees, tab bars, menu bars, and modal dialog boxes. • GWT also has built-in support for remote procedure calls and other more sophisticated web application features.

  7. This is a complete GWT application that displays a button with a click handler: • public class Hello implements EntryPoint {    public void onModuleLoad() {     Button b = new Button("Click me", new ClickListener() {       public void onClick(Widget sender) {           Window.alert("Hello,AJAX");         }      });    RootPanel.get().add(b);   } }

  8. Debugging and Deploying GWT Applications GWT applications can be run in two modes: • Hosted mode : • In hosted mode, your application is run as Java bytecode within the Java Virtual Machine (JVM). • You will typically spend most of your development time in hosted mode because running in the JVM means you can take advantage of Java's debugging facilities and remain within an IDE like Eclipse. • Web mode : • In web mode, your application is run as pure JavaScript and HTML, compiled from your original Java source code with the GWT Java-to-JavaScript compiler. • When you deploy your GWT applications to production, you deploy this JavaScript and HTML to your web servers, so end users will only see the web mode version of your application.

  9. Google Web Toolkit Architecture GWT has four major components: • A Java-to-JavaScript compiler. • A "hosted" web browser • Two Java class libraries.

  10. Google Web Toolkit Architecture • GWT Java-to-JavaScript Compiler • The GWT Java-to-JavaScript compiler translates the Java programming language to the JavaScript programming language. • GWT Hosted Web Browser • To accomplish this, the GWT browser embeds a special browser control (an Internet Explorer control on Windows or a Gecko/Mozilla control on Linux) with hooks into the JVM. • JRE emulation library • GWT contains JavaScript implementations of the most widely used classes in the Java standard class library, including most of the java.lang package classes and a subset of the java.util package classes. • GWT Web UI class library • The GWT web UI class library is a set of custom interfaces and classes that let your create web browser "widgets," like buttons, text boxes, images, and text.

  11. GWT IDEs • Instantiations GWT Designer • JetBrains GWT Studio • GWT Widget Library • Wirelexsoft VistaFei for GWT Developer Tools

  12. Thank YOU www.web2pointo.wordpress.com

More Related