- A tool for creating AJAX sites using Java
* Take advantage of all of the great Java tools to create AJAX applications
* Have the maintenance advantages of Java with the deployability of AJAX
* Build great AJAX sites without having to fill your code with special-cases to handle the different browsers - A debugging environment for AJAX sites
Debug your AJAX site on your desk using the Eclipse debugging environment, no more messagebox- debugging!
What Does GWT Do
- Compile Java into HTML, CSS, and Javascript
- Marshal and unmarshal RPC calls
* For this you do have to provide a server-side servlet to accept the call, but even there GWT provides some assistance. - Abstract the details of asynchronous calls
- Handle browser quirks so your code stays clean
- Handle I18n using translated message files
- ImageBundle!
- Handle browser history support
- Parses the original Java code
* Full parser, almost all Java constructs will be parsed correctly. - Generates a full Abstract Syntax Tree (AST) (see AST Article)
* GWT's compiler isn't a parlor trick, it's a real code parser and cross-language compiler - Performs optimization, dead-code elimination, dynamic analysis, and other code fixups
* The generated JS is fast and efficient, sometimes faster than what you might write yourself - Does not (yet) handle generics and erasure
- The AST represents each syntactic element of the Java code in a Java object
- Implemented in package com.google.gwt.dev.jjs.ast
- Each item is a JNode, the root is a JProgram
* Much like DOM and Node/Document. - The AST also supports JSON objects
* JSON is a first-class entity in GWT, not an afterthought - The AST makes extensive use of Visitor and
- Decorator patterns
- Optimization
* All code is optimized, including some unusual tricks (like turning some methods into wrapped statics) - Dead-Code Elimination
* Remove any code that cannot be reached, or always returns the same value(s) - Javascript Generation
* Generate Javascript, including all necessary browser-specific checks and workarounds - Javascript obfuscation and size reduction
* Javascript is (optionally) obfuscated to protect your trade-secrets, and to reduce it's size
- The native methods are objects in the AST much as other methods are
- When the code generation occurs, the content of the method is just copied into the Javascript
- From there the process is no different from your Java methods
- Much of the JDK and UI code is implemented using JSNI
- Small subset of the Java library
* This is growing, but not very quickly at the current time - Combination of Java and native Javascript
* Some methods are regular Java code, some are native methods that just contain the Javascript in a special comment
* It's easy to follow and understand, and it's relatively easy to add new classes
- A few commonly needed UI elements
* Panels, Buttons, Dialogs, FileUpload, Tables, Forms, Listboxes, Popups, Scrollbars, etc...
* There's also a History mechanism and a JSON client implementation - Created using the JSNI mechanism, just like the JDK classes
* Feel free to create your own You can even contribute them back to the community if you want to.
- You write a client class that implements RemoteService and AsyncCallback
* RemoteService is a Marker interface (like Serializable) used as an instruction to the compiler
* AsyncCallback enables the class to receive the response from the server - Write a servlet that extends RemoteServiceServlet
* This receives the RPC and sends back the response
* RemoveServiceServlet handles the RPC part, you handle the processing part
- The Google Web Toolkit can make it much easier to create interactive web applications
- GWT works by actually compiling your Java code into Javascript, with optimization and obfuscation.
- There are facilities for History, RPC, UI widgets, and native Javascript methods
- The code is available under an Open Source (Apache 2.0) license, you're welcome to explore.
- The team would love to hear what you think of GWT on the GWT forum
- http://code.google.com/webtoolkit/ - Main site for all things GWT
- http://googlewebtoolkit.blogspot.com/ - GWT team blog
- http://code.google.com/p/google-web-toolkit/ - GWT source code and issue tracker site
- http://tinyurl.com/3y8kmx - Slides from Presentation at TSSJS (PDF)
- http://tinyurl.com/2rkq29 - Video from Google Developer Day
- a comprehensive thread on groups.google.com
- Lombari Blueprint
- Contact Office
- Google Base
- Google Health
- GwtApps (it’s an awesome book on GWT)
- Xscetch
- Compiere (ERP + CRM)
- Yesmail
- Alenty
- Awdio
- Riflethru
- Nileguide
- GreatGroceryList
- http://www.triniforce.com/pk.html
- http://GoneVertical.com
- http://code.google.com/p/gwt-examples/
0 comments:
Post a Comment