Google Web Toolkit Blog
Google Plugin for Eclipse (GPE) is Now Open Source
Posted by Eric Clayberg - Wednesday, November 16, 2011 at 9:58:00 AM
GWT and Dart
Posted by Bruce Johnson - Thursday, November 10, 2011 at 7:39:00 AM
The Google Web Toolkit team has been asked recently about our plans following the announcement of the Dart programming language a few weeks ago.
Dart and GWT both share the goal of enabling structured web programming. In fact, many of the same engineers who brought you GWT are working on Dart. We view Dart as an ambitious evolution of GWT’s mission to make web apps better for end users, and we’re optimistic about its potential. As Dart evolves and becomes ready for prime time, we anticipate working closely with the GWT developer community to explore Dart.
Meanwhile, rest assured that GWT will continue to be a productive and reliable way to build the most ambitious web apps — and even games like Angry Birds. Key projects within Google rely on GWT every day, and we plan to continue improving (and open-sourcing) GWT based on their real-world needs.
Pictarine: pictures in the cloud
Posted by Chris Ramsdale - Monday, September 19, 2011 at 11:32:00 AM
Cross posted from the Google App Engine blog.
Pictarine is a photo management web application, launched in 2010, that allows people to easily manage and share all of their photos from Flickr, Picasa, Facebook, Twitter and other sites. Pictarine developers Guillaume Martin and Maxime Rafalimanana have contributed the following post discussing their experiences using Google App Engine and Google Web Toolkit.
From the start, we used Google technologies in developing Pictarine and we wanted to share our experience with them so far. In this post, we will shed some light on the weaknesses and strengths we found in Google Web Toolkit (GWT) and Google App Engine. We will also discuss how we leveraged GWT to build a new technology that allows Pictarine to seamlessly display photos from the computer directly into the browser. The following diagram is an overview of how our application works.
Building a mashup in the cloud with Google App Engine
The Pictarine team is made of a web designer and two developers who previously worked mainly with Java based enterprise technologies and had a little experience with web technologies. When we started the project in early 2009, we were quite open on learning new languages like Python or Ruby, but when App Engine announced that Java would be supported, we were really excited to give Google App Engine a try.
The first few months, learning about the App Engine environment was quite easy and dare I say fun. Testing our code on Google’s servers from Eclipse IDE was only one click away. So we built our first prototype fast and we quickly decided to adopt App Engine. Then we started to build the core of our application: the engine that uses the API from Flickr, Picasa, Facebook to fetch the users’ photos. This is where we hit the first limitations of App Engine. Most users have a lot of photos on these services and retrieving them can take some time. But App Engine has strict limits on how long a request should last: an outgoing HTTP request cannot last more than 10 seconds and cannot process a request for more than 30 seconds. So while building our architecture we found ourselves writing approximately one third of our code dealing with these limitations: paginating our requests, creating background tasks to store data in small batches, etc.
In early 2010, when we launched our alpha version, everything went smoothly. We had some good press coverage and App Engine met our expectations in handling our first users. During 2010, we worked on implementing new features requested by our users, and during this period of time we were really impressed by the way App Engine evolved. Many of the limitations were lifted and great new features were added. We are now able to use Task Queues for requests that last up to 10 minutes, which we fully use to sync our users’ photos and albums. One of the features we like the most is the Channel API, a push notification system that allows us to instantly show a photo in every connected browser as soon as it is uploaded. App Engine is still not perfect but has greatly improved and when we see its roadmap, we are quite confident it will continue to improve.
Building a fresh photo experience with Google Web Toolkit
When we started Pictarine, we wanted a fast, distraction free interface that would allow our users to focus on their photos. We wanted the interface to adapt to the screen resolution, displaying a lot of photos on large screens and fewer on small ones. We wanted it to be automatically updated when new comments or new photos are added. We wanted a web application. As we eliminated Flash quite quickly (based on our user experience...) we started to look at tools to build HTML/CSS/Javascript applications. We settled quickly on GWT: while coding in Java, with all the tools we are used to (even the debugger), we could produce optimized Javacript that would run in every browser! When we started with GWT, it was already 3 years old, so we had few complaints about it. The main issue was that we had to always keep in mind that the Java code we produced was ultimately translated to Javascript. So some Java methods, such as the Reflection API, are not allowed. Another thing that was not obvious to us when we started with GWT was that a java developer needs an intimate knowledge of HTML/CSS if he/she wants to go beyond the basic user interface provided by the GWT widgets.
What we really like about GWT in our architecture is the ability to share code between client and server: we can use the same Photo or Album class on the client and the server and the GWT RPC system allows us to automatically share the same Java object on both side. We can also have the same data validation code on both sides: we can alert the user immediately on errors and still validate the data on the server just in case.
Another great feature we like about GWT is its handling of internationalisation. From the beginning we wanted to build a website available for all Internet users, so supporting English as well as our native language (French) was almost obligatory. Fortunately, GWT makes it really easy to generate centralized localization files so that we just have to translate.
Finally, to illustrate how great Javascript generation is, when IE9 came out, we waited a few weeks for GWT to support it and our application was compatible after a recompile! Of course, the IE9 team also did a good job with their HTML5/CSS3 engine.
Building an universal uploader
After the launch of our alpha in 2010, our users were able to see and share their photos from Flickr, Picasa, Facebook. But they still had to put their photos on these websites first before coming to Pictarine. This limitation quickly became the first request on our feedback system. We needed to let our users do everything from Pictarine, including uploading photos. Uploading many photos from a website is still not a trivial process. Most websites choose Flash to allow users to upload multiple files at once, but our experience with it was that it often crashed after a while. Some use Java applets, but they are never well integrated and always look odd. At Pictarine we decided to tackle this problem by using Java Applet for their stability across all platforms but without using it to render photos or folders.
We have built a technology that uses the GWT RPC mechanism to talk to a Java Applet: photos, upload progression are rendered in HTML/CSS and the applet takes care of photos resizing and uploading. Sharing a photo from a camera is now a one-step process. This technology also allows users to browse their local files directly in their browser and it is fully integrated in our design.
We believe that this new use of Java applets can help blur the line between the Desktop and the Cloud by seamlessly integrating desktop files in any web application.
In conclusion, we can say that we are really happy with the choices we made with App Engine and GWT. App Engine is a great service that perfectly handled the spike in traffic we saw right after articles on Mashable and Lifehacker were published. So we recommend it to every lean startup out there who loves developing in Java, Python or Go.
Working with Maven and RequestFactory in GWT 2.4
Posted by David Chandler - Friday, September 16, 2011 at 4:28:00 PM
GWT 2.4 introduced changes to both Maven and RequestFactory, and we've recently updated the GWT wiki and sample apps with the latest and greatest:
- WorkingWithMaven (with instructions for Eclipse 3.5, 3.6, 3.7)
- RequestFactoryInterfaceValidation
RequestFactory now does compile-time validation to ensure that your service implementations match your client-side interfaces. This feature is implemented using an annotation processor which must be configured in Eclipse or in your Maven POM. When configured in Eclipse, you will now see warnings and errors in the IDE anywhere your client- and server-side RF code don't match.
In addition, the RequestFactory jars are now in Maven Central. Note that the Maven groupId for RF artifacts differs from the rest of the GWT artifacts since RF can be used in Android clients as well as GWT. If you're using RequestFactory instead of GWT-RPC, you no longer need gwt-servlet. Instead, you can use the much smaller requestfactory-server jar and requestfactory-apt (which contains the RF interface validation tool). You do not need requestfactory-client for GWT projects as the required classes are already included in gwt-user. The requestfactory-client jar is intended for non-GWT (Android) clients using RequestFactory.
<dependency> <groupId>com.google.web.bindery</groupId> <artifactId>requestfactory-server</artifactId> <version>2.4.0</version> </dependency> <!-- see sample projects for correct placement --> <dependency> <groupId>com.google.web.bindery</groupId> <artifactId>requestfactory-apt</artifactId> <version>2.4.0</version> </dependency>
The mobilewebapp and dynatablerf samples show everything working together and have been tested in Eclipse 3.6 and 3.7.
If you also have the Eclipse Subversive plugin installed (see http://www.shareyourwork.org/roller/ralphsjavablog/entry/eclipse_indigo_maven_and_svn), you should be able to try the mobilewebapp sample as easily as
- File > Import > Checkout Maven projects from SCM, point to https://google-web-toolkit.googlecode.com/svn/trunk/samples/mobilewebapp
- Run as > Web application
Special thanks to Jeff Larsen for the RequestFactory POM sauce that works in Eclipse Indigo!
Tools to help monetize and mobilize your development: Announcing the Google Plugin for Eclipse 2.4
Posted by Chris Ramsdale - Thursday, September 08, 2011 at 12:45:00 PM
At this year’s Google I/O conference, we announced a beta version of the Google Plugin for Eclipse that added App Engine Tools for Android developers. A release aimed at removing the friction associated with building installable Android apps that rely on App Engine for server-side support. Since then we’ve not only been working on bug fixes and polish, but we’ve also added a couple of new features and today we’re excited to announce the GA release of GPE and GWT 2.4.
To jump right in, you can download this release from our main GWT download page.
The new features and functionality added since the beta release including the following:
App Engine Tools for Android - Incremental RPC Tooling
For Android developers that want to take advantage of App Engine for their server-side code we’ve added incremental RPC tooling to GPE 2.4. Back at Google I/O we demoed the ability to easily create a connected App Engine and Android project, as well as an RPC layer between the two (using Eclipse-based wizards). In the GA release of GPE 2.4 developers can now add server-side methods to their App Engine code and GPE will generate the necessary serialization and Android code on the fly.
For example, say I have an EmployeeService that exposes typical CRUD methods, but I want to write a custom query that looks for Employees with a start date after some specified date. As a developer all I need to do is write the server-side code and GPE will prompt me to do the rest.
Apps Marketplace Support
In the GA release of GPE 2.4 we’ve also focused on making it easier to monetize apps by adding tooling that allows developers to deploy their apps to the Google Apps Marketplace in the same manner as we enable App Engine deployment. Below are some of the key aspects of this support.
First, GPE 2.4 now has the ability to create a default sample application that will help developers understand how to build an app that utilizes Google APIs (in this case Calendar), handles authentication, and is deployable to the Google Apps Marketplace. The sample is straightforward, prompts the user for the domain it is installed into, and fetches the user’s next 10 calendar entries.
Second, GPE 2.4 helps developers quickly get their applications listed (and updated) within the marketplace by offering an easy-to-use wizard to gather the necessary data, and communicate with the Apps Marketplace backend systems.
GWT Designer Enhancements
We have made lots of exciting GWT Designer enhancements over the last few months as well. In addition to substantial startup and editing speed improvements, we have added split-view editing support for UiBinder so you can now see your UiBinder XML code side-by-side with the rendered layout. Even if you aren't a fan of editing in the design view, you can write code in the source view and see the UI instantly rendered in the design view.
We have also added direct CSS editing from within the GWT Designer property view. This makes it very easy to add new CSS styles or edit existing CSS styles just like any other GWT property.
Want to get started? Download the GA release of GPE and GWT 2.4 here. Note, to try out the App Engine tools for Android you’ll need to install the Android Developer Tools (ADT) plugin as a prerequisite, which can be found here.
If you have any feedback, we’d love to hear it and the GWT/GPE Group is the right place to submit it. The App Engine and Android Developer Groups are also great sources of information.
Chris Ramsdale, Product Manager, Developer Tools cramsdale@google.com
GWT Spotlight: Buxus (Chile)
Posted by David Chandler - Wednesday, August 24, 2011 at 1:04:00 PM
Next on our tour of companies building with GWT we head to Latin America, where there has been a lot of recent interest. Based in Santiago, Chile, Buxus is a new personal finance Web app with 20k lines of GWT code and counting.

Chief engineer Andres Arellano cites five major reasons for choosing GWT:
App-oriented
At Buxus, we are building a web based personal finance manager. This kind of application has traditionally been desktop based, but GWT allows us to bring the same responsiveness and ease of use to a web application. GWT RPC allows us to write both front-end and back-end code in the same language and even allows us to code Buxus as if we were coding a desktop application. It also integrates well with standard components like Hibernate.
Optimized code
Every web designer knows that the world of Web browsers is a jungle. With GWT, we can be sure that for every browser, optimal JS code will be generated. Also, advanced features like code splitting and aggressive caching using ClientBundle allow us to ensure that users will enjoy both fast loading times and a snappy UI.
Templates
UI designers don’t want to write Java code to test new UI concepts. Thanks to UiBinder, designers can work with tools that are familiar to them, and programmers can easily bind design templates to their Java code.
Open source
Our workflow is based mostly on open source tools, and GWT’s Apache licensing is definitely a winner for us. Even more important than eliminating license fees, diagnosing bugs in GWT is easier, and providing fixes or adding new features is possible, greatly reducing the risk of getting stuck in our development because of a framework issue. It also means that if the documentation is not clear enough on a certain point, we can dive into the code and figure out what we want.
Active community
Since GWT is a widely used framework, it comes with a whole ecosystem of side projects. We’re happy users of GWTP, GWTQuery, and HighCharts-gxt. Reducing code duplication and getting the work done faster--what else could we hope for?
To learn more about Buxus, visit http://buxus.cl or meet in person at the upcoming StarTechConf in Santiago, Chile, where Buxus will be presenting on their experience with GWT.
To learn about more companies using GWT, also see the Developer Tools Sandbox from this year's Google I/O.
GWT Spotlight: Berger-Levrault
Posted by David Chandler - Wednesday, July 27, 2011 at 2:10:00 PM
GWT developers are always curious about who else is using GWT (besides Google), so I plan to post a few short articles spotlighting companies using GWT across various industries and countries. We'll start in Europe, where there is an especially large GWT community in Germany and France. French firm Berger-Levrault recently posted a short article on their use of GWT for HR and financial applications comprising almost 700k lines of code (can you imagine that in Javascript?). According to the article, Berger-Levrault's GWT applications are widely used in the French public sector. Like many GWT apps, these applications are presumably not publicly visible, but illustrate the scale of applications which can be built with GWT. To learn about more companies using GWT, also see the Developer Tools Sandbox from this year's Google I/O.








