What is GWT?


• Java software development framework that makes writing AJAX applications easy
• Let you develop and debug AJAX applications in the Java language using the Java development tools of your choice
> NetBeans or Eclipse
• Provides Java-to-JavaScript compiler and a special web browser that helps you debug your GWT applications
> When you deploy your application to production, the compiler translates your Java application to browser-compliant JavaScript and HTML


Two Modes of Running GWT App
• 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
• 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


Why Use Java Programming Language for AJAX Development?


• Static type checking in the Java language boosts productivity while reducing errors.
• Common JavaScript errors (typos, type mismatches) are easily caught at compile time rather than by users at runtime.
• Code prompting/completion is widely available
• Automated Java refactoring is pretty snazzy these days.
• Java-based OO designs are easier to communicate and understand, thus making your AJAX code base more comprehensible with less documentation.


Why GWT?


• No need to learn/use JavaScript language
> Leverage Java programming knowledge you already have
• No need to handle browser incompatibilities and quirks
> GWT handles them for you
• No need to learn/use DOM APIs
> Use Java APIs
• No need to handle forward/backward buttons browser-history
> GWT handles it for you
• No need to build commonly used Widgets
> Most of them come with GWT
• Leverage various tools of Java programming language for writing/debugging/testing
> For example, NetBeans or Eclipse
• JUnit integration
> GWT's direct integration with JUnit lets you unit test both in a debugger and in a browser and you can even unit test asynchronous RPCs
• Internationalization
> GWT includes a flexible set of tools to help you internationalize your applications and libraries
> GWT internationalization support provides a variety of techniques to internationalize strings, typed values, and classes


GWT Architecture





GWT Architectural Components
• GWT Java-to-JavaScript Compiler
> translates the Java programming language to the JavaScript programming language
• GWT Hosted Web Browser
> lets you run and execute your GWT applications in hosted mode, where your code runs as Java in the Java Virtual Machine without compiling to JavaScript
• JRE emulation library
> GWT contains JavaScript implementations of the most widely used classes in the Java standard class library
• GWT Web UI class library


Building User Interface: Built-in GWT Widgets


GWT User Interface Classes


• Similar to those in existing UI frameworks such as Swing except that the widgets are rendered using dynamically-created HTML rather than pixel-oriented graphics
• While it is possible to manipulate the browser's DOM directly using the DOM interface, it is far easier to use Java classes from the Widget hierarchy
• Using widgets makes it much easier to quickly build interfaces that will work correctly on all browsers

Leave a Reply

Subscribe to Posts | Subscribe to Comments

About This Site

Howdy! My name is Suersh Rohan and I am the developer and maintainer of this blog. It mainly consists of my thoughts and opinions on the technologies I learn,use and develop with.

Blog Archive

Powered by Blogger.

- Copyright © My Code Snapshots -Metrominimalist- Powered by Blogger - Designed by Suresh Rohan -