The Google Web Toolkit (GWT) is a nifty framework that Java programmers can use to create Ajax applications. The GWT allows you to create an Ajax application in your favorite IDE, such as IntelliJ IDEA or Eclipse, using paradigms and mechanisms similar to programming a Java Swing application. After you code the application in Java, the GWT's tools generate the JavaScript code the application needs.
You can also use typical Java project tools such as JUnit and Ant when creating GWT applications. The GWT is a free download, and you can freely distribute the client- and server-side code you create with the framework. This shortcut explains how to get started with the GWT, and then demonstrates how to create a simple Ajax application.
Bruce W. Perry is an independent software developer and writer, and the author of O'Reilly's Java Servlet & JSP Cookbook and Ajax Hacks. Since 1996, he has developed web applications and databases for various nonprofits, design and marketing firms, as well as publishers. In his spare time, Perry is an active age-group triathlete and has cycled extensively in the Swiss Alps. He lives in the Newburyport, Massachusetts area with his wife and two children.
Comments about oreilly Google Web Toolkit for Ajax:
This 40-page O'Reilly shortcut serves as an introduction to the Google Web Toolkit (GWT), a new release from Google allowing developers to generate JavaScript (and, therefore, AJAX stuff) from Java-code. The GWT is a noble effort. JavaScript is often difficult to debug and make cross-browser compatible. Using Java, you can use your favorite development tools, such as Eclipse, to code the application, and the GWT will generate the JavaScript for you. This book is definitely not a GWT reference manual. After a concise but much appreciated introduction to the file structure and basic features of the GWT, the bulk of the content is the demo application. It is a sad, wretched little thing; click a button to fill in text boxes with the time of the Http request and the software type of browser and server. I assume the demo was kept simple to keep the focus on the client side ongoings, and not at the server-side processing (in this case handled by a 10-line PHP script). However, it is a shame as this demo does not really spark much interest. AJAX is all about fanciful interaction, so it would have been nice to be presented with something more involved. It does contain a nice side-step, showing you how to implement multi-language support using the GWT.The book is also squarely aimed at the experienced (Java-) programmer, as the author is not holding your hand when breezing through the code. All code is presented in one big, albeit amply commented, wad. Not many words are wasted on explaining the ins-and-outs of Ajax either. This book is definitely not for beginner programmers, or a good place to learn about your first Ajax application. I have found the book not an ideal entry point to the GWT. It is fairly dense, and while the demo is very well documented, it does not provide much peripheral information about the GWT interfaces, how to setup your IDE, or how to take full advantage of the GWT host mode (a GWT feature that allows you to test your application as if it were in a browser window, before converting the Java to JavaScript). Google provides some introductory documentation as well on [@]. These pages do a good job of getting you started, using some simple examples. The GWT also comes with some sample applications you can tweak and adjust. I find them very helpful as this break-and-fix approach is a good way of getting into new technologies. The book is best regarded as a fine addition to Google's pages. Get your feet wet first with the documentation and tutorials on the Google website, and then, if you want to take the plunge, get this book. Table of Contents of Google Web Toolkit for Ajax ;The Google Web Toolkit's Approach to AjaxGetting Started Creating An Application Using the CLI ToolsThe GWT's Directory StructureModules GWT Compiler and Web ModeHost ModeDemo Application Conclusion