Wednesday, November 10, 2010

GWT 2.1: data-binding and client-side JPA

GWT 2.1 was finally released. And as usual, it's brilliant. I am generally annoyed by technology fan-boys, but each time they do a release i am amazed by how smart these guys are. There is an amazing amount of new and useful stuff.

One of things i particularly admire is that they tend to focus on the GWT core, that is, the kind of things that would be difficult for 3rd parties or developers to do themselves. Everything that is added to GWT is extremely well thought out.

There are two productivity enhancements that I miss from the days of server-side MVC (i.e. Struts, Grails, JSF, Wicket, etc.) are:

  1. Data binding (i.e. bound controls)
  2. JPA's EntityManager. A client-side entity manager would really be useful. Much of Hibernates beauty (like lazy loading) is lost in client-heavy GWT apps. You sometime end up having a PersonEntity (for JPA) and a PersonDto (for sending to GWT client) - yuck!
GWT 2.1 addresses both of these. Data Binding is addressed with the new Editor Framework. And the client-side JPA-like thing is addressed with their new Request Factory.