Tuesday, January 6th, 2009
Category: GWT
, Showcase
SendMeHome lets you to assign a unique code, called a SendMeHome ID, to any physical item. We are launching our newest feature, Stories, which connects a group of people through an item as it travels the globe. Social networks such as Facebook mainly involve users communicating with their ‘friends’, SendMeHome is unique because it uses a real-world object to tell a story that enables interaction between new and like-minded people who may otherwise have never known of each other’s existence.
Our beta users have already created stories to write a collaborative novel, share cooking tips, discuss political events, and even transport a statue to Easter Island.
The site uses GWT components and integrates with services such as good ole Google Maps. You can check out a story. Having a code associated to items is a lot of fun (read: Webkinz) and seems to be something that can be useful.

Wednesday, December 3rd, 2008
Category: GWT
, JavaScript
, Toolkit
You may remember Sanjiv Jivan as the GWT-Ext developer that changed over the debacle. He then went on to start work on a GWT version of SmartClient libraries and has now released SmartGWT 1.0.
It is a tour de force of not only a huge widget library, but he explains how it is much more:
So what’s so smart about SmartGWT? Let me try to explain. SmartGWT is not just another Widget library. While most Ajax frameworks focus primarily on presentation and displaying mostly read-only data, either local or via XML / JSON, SmartClient was built with server side integration in mind. Most enterprise applications are not just about about data presentation, but about being able to propagate data changes made by the user to the backend. So while its tempting to use library X that has a cool tree widget, it’s not until you actually try to use it your application that you encounter the real world hard problems. For example, how do you take data from your business objects on the server to not only display in a tree widget, but also be able to update your data model when, say, the user reorders the tree nodes or make edits / deletes in the UI. How do you display hierarchical data where nodes may have hundreds of children? And so on..
Most Ajax frameworks stop short and leave it up to the user to manage state on the client side and propagating the changes to the server. This is not a trivial problem! Over the past few years UI widget libraries have improved significantly and there are now various options available to users. Simply put, having good looking widgets is not the hard problem today. In addition to having good looking widgets, having end-to-end integration of the UI components with the backend is the hard problem. It’s this 20% of the functionality that takes 80% of the time in building most enterprise applications.
The showcase will give you a good feel for what is out there, and it contains some interesting items including:
- Miller Columns: The ColumnTree provides an alternate navigation paradigm for Tree data, sometimes called “Miller Columns” and seen in iTunes
- Nested Grid: A convenient way to display 1-n relationships
- Printable Views: SmartGWT supports printable views of its components.
- Advanced Filter Builder: a databound filter builder.
- Tile View: Representation of data as “tiles”. Again, TileGrid supports data binding so sort / filter and edits can be easily performed.
- Calendars : A Google Calendar like widget that supports databinding so edits and drag drop changes can easily be propgated to the server for persisting.
- TreeGrid : Supports multiple columns, editing, column locking, lazy loading and more.
- Live Grid / Tree: Grid / Tree virtual scrolling or live grid

Really amazing work. Sanjiv recently had a Q&A session with InfoQ where he talks about the approach taken in developing SmartGWT and the his thoughts on the differences between SmartClient and Ext.
Monday, December 1st, 2008
Category: Canvas
, GWT
, Java

Rodrigo Reyes has announced a new project called AbstractCanvas, a GWT project that sits on top of HTML Canvas and Java2D.
The same code can thus run in the browser, or on the server.
You can then write code such as:
JAVA:
-
-
VerticalPanel vPanel = new VerticalPanel();
-
-
CanvasPanelExt canvas1 = new CanvasPanelExt(300,150);
-
-
canvas1.
setFillStyle(Color.
WHITE);
-
canvas1.setGlobalAlpha(1.0);
-
canvas1.fillRect(0, 0, canvas1.getCoordWidth(), canvas1.getCoordHeight());
-
-
canvas1.addCanvasPainter(new ColorTest()); // <- Note the use of CanvasPainter here
-
canvas1.addCanvasPainter(new PathTest()); <- and here
-
-
vPanel.add(canvas1);
-
Monday, November 3rd, 2008
Category: GWT
, Mapping
Alexander (aka Sasha) Maryanovsky has been hacking away with GWT, and has some come up with a couple of interesting project.
The first, is a fun chess diagram builder that lets you build out a chess diagram and export it out:

Also, he has created Sasha Maps, an API that abstracts mapping implementations allowing you to plugin your own system (but Google Maps and WMS are implemented).
The appropriate Hello World could look something like this:
JAVA:
-
-
package com.maryanovsky.mapdemo.client;
-
-
import java.util.Arrays;
-
import java.util.List;
-
import com.google.gwt.core.client.EntryPoint;
-
import com.google.gwt.user.client.ui.RootPanel;
-
import com.maryanovsky.gwtutils.client.UiUtils;
-
import com.maryanovsky.gwtutils.client.UserEventManager;
-
import com.maryanovsky.map.client.*;
-
import com.maryanovsky.map.client.impl.Google;
-
-
/**
-
* The entry point of the Map demo.
-
*/
-
public class TutorialDemo implements EntryPoint {
-
/**
-
* Starts the map demo.
-
*/
-
public void onModuleLoad() {
-
List tileLayers =
Arrays.
asList(new TileLayer
[]{Google.
NORMAL_TILE_LAYER});
-
-
Map map =
new Map(Google.
MERCATOR_PROJECTION, tileLayers,
0,
17);
-
LatLng initialLocation = new LatLng(60.050317, 30.350161);
-
int initialZoom = 13;
-
-
MapWidget mapWidget = new MapWidget(
-
new MapLocationModel(0, 17, initialLocation, initialZoom));
-
mapWidget.setMap(map);
-
-
UserEventManager eventManager = mapWidget.getUserEventManager();
-
eventManager.setDragAction(MapWidget.DRAG_MAP_ACTION);
-
eventManager.setDoubleClickAction(MapWidget.ANIMATED_ZOOM_IN_ACTION);
-
eventManager.setWheelAction(MapWidget.ANIMATED_ZOOM_ACTION);
-
eventManager.setRightClickAction(MapWidget.ANIMATED_PAN_MAP_ACTION);
-
-
UiUtils.disableContextMenu(mapWidget.getElement());
-
UiUtils.addFullSize(RootPanel.get(), mapWidget);
-
}
-
}
-
The API gives you interfaces to setup custom maps, actions, overlays, map widgets, and more.
Tuesday, October 7th, 2008
Category: GWT
, Python
Last week, we posted a story about deploying GWT to PHP back-ends. We've got another GWT-ish post this week: Pyjamas, a sort of GWT for Python.

The SourceForge project page has a brief overview and pointers to a tutorial, a widget showcase, and more.
Friday, October 3rd, 2008
Category: GWT
, PHP
, Showcase
Here's an interesting link for a Friday. Viktor Zeman on Quality Unit sent us a link to "PostAffiliateXpress", some boring IT application with an interesting interface and an even more intriguing back-end.

The UI combines a Vista-like "Start" menu along with an OS X-like dock (using everyone's favorite fish-eye widget). It also has a built-in widget system that leverages Google Widgets. Overall, it's a pretty nice implementation of a desktop and windowing in Ajax.
The framework itself is "GwtPHP" which attempts to take all the advantages of GWT and deploy them to PHP backends in an attempt to solve the problem of limited Java-friendly hosting services. Unfortunately, the framework isn't available for use until sometime in early November.
Dual-License
The developers intend to use the familiar "free for hobbyists, pay up for commercial use" licensing model (what their licensing page calls a "what for what" model).
Give some feedback
Viktor says that they are quite keen to get feedback from folks on the project, so interested folks should get in touch, let them know what you think about the licensing model, and perhaps get early access, etc.
Thursday, September 18th, 2008
Category: Ext
, GWT

Darrell Meyer has announced the release of Ext GWT 1.1 which is said to "shortens the feature set gap between Ext JS."
New Features
The Grid component wraps the Ext JS grid, and it includes support for grid plugins which fit into component lifecycles. You can also use a subclass, EditableGrid which.... allows you to edit content on the fly.
Auto complete has been added to the combo boxes a la Google Suggest.
Portal is a custom layout container that uses a multi-column layout on contains Portlets. Each Porlet can be drag and dropped to change order or move to another column. Each Portlet can contain any content and supports icons to expand / collapse, close, etc.
The desktop mimics the behavior of the operating system look at feel. It is now possible to create multi-window applications with support for a task bar and start menu. Windows support normal, maximize, and minimize states. The start menu is a custom menu that allows new menu items. In addition, there is support for a “task” area for adding additional items.
Java Bean Support with BeanModel
The Ext GWT Store and Binder API work with ModelData instances. The primary goal of ModelData is to provide a type of “introspection” as GWT does not allow runtime inspection of Java objects. You can query ModelData for a list of properties it contains, and these properties can be retrieved and set using the parameter name with the get and set methods.
Although this approach works, it forces you to either implement the ModelData interface in your Java Beans or extend the Ext GWT base classes that implement the ModelData interface. What is missing is a way to use your Java Beans as is, without having to extend the Ext GWT base classes or implement an “invasive” interface.
There are also new examples:
- Forum search is an example of a combo box, using a custom XTemplate, and remote data. The data can be paged with built-in support for a paging toolbar.
- Image Chooser shows loading a ListView in a Window. Each item has a linked details view, and the ListView supports custom sorting and filtering.
- This example shows a Dialog using an AnchorLayout to “anchor” the form fields to the dialog dimensions. When resized, the fields will adjust their size to match the dimensions of the dialog.
Friday, August 29th, 2008
Category: GWT
, Google
, Java
, Library

I have seen the GWT team working very hard indeed on GWT 1.5, and they must be very happy to see the final release shipped and complete:
GWT 1.5 delivers what we think are an impressive number of improvements, about four hundred issues if you're counting. We're also happy that one of those is issue 168, our most-requested feature, Support for Java 5.
The high level new feature sets are:
- Java 5 language support and enhanced JRE emulation
- Performance optimizations and easier JavaScript interop
- Prettier widgets, better DOM, accessibility, and bi-di
You can see a lot of this at work in the showcase area. There you will see all of the widgets and examples that come out of the box, and the community has developed even more for you. In particular, Ray Cromwell has some great real world examples that he shares in his book and talk.
Download GWT and take a look.
Thursday, August 28th, 2008
Category: GWT
, Gears
, Google
GWT has long had a project that aimed to give rich support for Google APIs called GALGWT, or "Google API Libraries for Google Web Toolkit".
This project has stepped up to higher gear recently, and we have seen the GALGWT 1.0 release candidate appear.
What is in GALGWT?
The project is a collection of libraries that provide Java language bindings
and API specific 'plumbing' for some Google JavaScript APIs. The goal is to
make it easy for developers to use these JavaScript APIs with GWT. Libraries
available at this time include a new version of Gears, as well as new
libraries for Gadgets and the Google AJAX Search API.
Gears 1.1 Library
A new version of the Gears library is available. In addition to the earlier
version's support for the Gears LocalServer, Database, and WorkerPool, 1.1
adds integrated support for offline applications and updated sample
applications. The bindings have also been refactored to use GWT 1.5
JavaScript overlay types and a new package hierarchy.
Gadgets 1.0 Library
The Gadgets library simplifies gadget development with GWT by automatically
generating a Gadget specification from Java source and inserting a selection
script in the specification much like a regular GWT project. After compiling
your gadget with GWT, all files are in place to publish your gadget. This
version currently supports the legacy Gadgets API based on the _IG_...
namespace.
Google AJAX Search 1.0 Library
The Google AJAX Search API lets you put Google Search in your web pages,
including Web, Local, and Multimedia searches. This library allows you to
access the API from Java code compiled with the GWT compiler without having
to write additional JavaScript code.
Tuesday, August 19th, 2008
Category: GWT

Sanjiv Jivan, original creator of GWT-Ext, posted on SmartGWT, a new wrapper on top of SmartClient.
Charles Kendrick of Isomorphic, creator of SmartClient, announced the new project as well as the approach they have taken:
we’ve taken an approach of generating GWT code from SmartClient’s documentation, combined with hand-coding portions that can’t feasibly be generated. By tweaking our documentation set to contain additional metadata (some of it GWT-specific), we’ve been able to generate code you might not otherwise expect, including things like enumerated constants and convenience constructors.
What this means is that the first release of SmartGWT will provide the complete SmartClient API, fully documented.
You can now write code such as:
JAVASCRIPT:
-
-
import org.smartgwt;
-
import org.smartgwt.client.widgets.Button;
-
-
...
-
-
Button button = new Button("myButton", "Click me");
-
button.addClickListener(new ClickListener() {
-
public void onClick(ClickEvent event) {
-
ISC.say("Hello World!");
-
}
-
});
-
Sanjiv Jivan joined the project under the terms that Isomorphic sign a document that said:
The founders of Isomorphic Software are committed to keeping a complete, up-to-date version of SmartClient available under an LGPL license.
We continue to invest heavily in building new features, skins, tutorials, and tools for SmartClient LGPL.
We think it's normal and expected that some people receive great benefit from LGPL software and do not pay. The spirit of open source, in a nutshell, is that releasing free software creates so much wealth that the portion that flows back to you is more than enough.
Sincerely,
Charles Kendrick
Alex Shvedoff
Tuesday, August 5th, 2008
Category: GWT
Bruce Johnson of the GWT team has continued the deep dive into GWT with a posting on a new GWT 1.5 feature: JavaScript overlay types. This feature goes beyond the JNSI technique to "make it easy to integrate entire families of JavaScript objects into your GWT project. There are many benefits of this technique, including the ability to use your Java IDE's code completion and refactoring capabilities even as you're working with untyped JavaScript objects."
The first example that Bruce gives is to mix JSON objects with Java:
JAVASCRIPT:
-
-
var jsonData = [
-
{ "FirstName" : "Jimmy", "LastName" : "Webber" },
-
{ "FirstName" : "Alan", "LastName" : "Dayal" },
-
{ "FirstName" : "Keanu", "LastName" : "Spoon" },
-
{ "FirstName" : "Emily", "LastName" : "Rudnick" }
-
];
-
JAVA:
-
-
// An overlay type
-
class Customer extends JavaScriptObject {
-
-
// Overlay types always have protected, zero-arg ctors
-
protected Customer() { }
-
-
// Typically, methods on overlay types are JSNI
-
public final native String getFirstName
() /*-{ return this.FirstName; }-*/;
-
public final native String getLastName
() /*-{ return this.LastName; }-*/;
-
-
// Note, though, that methods aren't required to be JSNI
-
public final String getFullName
() {
-
return getFirstName() + " " + getLastName();
-
}
-
}
-
JAVA:
-
-
// the glue
-
-
class MyModuleEntryPoint implements EntryPoint {
-
public void onModuleLoad() {
-
Customer c = getFirstCustomer();
-
// Yay! Now I have a JS object that appears to be a Customer
-
Window.
alert("Hello, " + c.
getFirstName());
-
}
-
-
// Use JSNI to grab the JSON object we care about
-
// The JSON object gets its Java type implicitly based on the method's return type
-
private native Customer getFirstCustomer() {
-
// Get a reference to the first customer in the JSON array from earlier
-
return $wnd.jsonData[0];
-
}
-
}
-
Bruce then shows us some performance wins that you get, as GWT gets to do a lot of inlining:
A quick digression for compiler geeks. Another neat thing about overlay types is that you can augment the Java type without disturbing the underlying JavaScript object. In the example above, notice that we added the getFullName() method. It's purely Java code — it doesn't exist on the underlying JavaScript object — and yet the method is written in terms of the underlying JavaScript object. In other words, the Java view of the JavaScript object can be richer in functionality than the JavaScript view of the same object but without having to modify the underlying JS object, neither the instance nor its prototype.
(This is still part of the digression.) This cool wackiness of adding new methods to overlay types is possible because the rules for overlay types by design disallow polymorphic calls; all methods must be final and/or private. Consequently, every method on an overlay type is statically resolvable by the compiler, so there is never a need for dynamic dispatch at runtime. That's why we don't have to muck about with an object's function pointers; the compiler can generate a direct call to the method as if it were a global function, external to the object itself. It's easy to see that a direct function call is faster than an indirect one. Better still, since calls to methods on overlay types can be statically resolved, they are all candidates for automatic inlining, which is a Very Good Thing when you're fighting for performance in a scripting language.
From this Java code: