Topic: GWT

GWT 2.0 RC1 Released

gwtWell, GWT 2.0 RC1 (yes!) is out. I was going to wait for a while with some of my new projects until switching them over to GWT 2.0, but given the pace of the GWT 2.0 project, I may just switch them over now rather than going through a painful migration.

I'm especially eager to use UiBinder to do declarative UI creation. Just specify how your interface should look in XML:
Continue reading »

Topics: ,

Released: QxWT-0.8.2-RC1 – GWT Wrapper for qooxdoo

I used to scratch my head at the name for the JavaScript library qooxdoo. That's until I ran into the developers of the library at an Ajax Experience event in Boston a few years ago and they pronounced it "Kucks Du" as in "Was kucks du" or German for "what are you looking at?" :-) Beyond the basics, qooxdoo is a mature collection of JavaScript widgets, despite the authors' conservative versioning policy (they're still only at 0.8.3).

It's taken them long enough, but they've finally released a wrapper for GWT, named QxWT. Best of all, they have a commercial-friendly open source license. If you're put off by GXT and it's license, you owe yourself a look.

Topics: ,

GWT and the Static Versus Dynamic Religious War

Never get involved in a land war in Asia.

-- Vizzini, The Princess Bride

.

gwt
Also, never get involved in a religious war about statically versus dynamically typed languages. Well, maybe just this once. :-)

Periodically, an angry Javascript developer will let loose and flame GWT as a misbegotten spawn of evil. Then all the GWT developers point and chuckle and move on to developing more cool applications. Every so often, though, someone will make a thoughtful comment about GWT, and then we have a fruitful discussion that helps clarify what GWT is and what it does and doesn't do well.

William Shields has either posted such a thoughtful comment or a very high end version of a flame, entitled Lost in Translation or Why GWT Isn’t the Future of Web Development. It is well worth reading, along with Google's Joel's somewhat heated response.

Continue reading »

GWT 2 Milestone 2

gwtIt's been out a few weeks, but I thought I'd point out that's it's been pushed. Mostly some changes to the LayoutPanel.

Topics:

Making Vaadin, PureMVC and Grails Work Together

On seeing that someone had developed a Grails Plugin for Vaadin (the former ITMill Toolkit, based on GWT as a front end technology), I immediately grabbed it and started exploring. One of the first things I do when developing things that look like GUI's is apply PureMVC to it. It's sort of like a big MVC switchboard that lets you hook together the smaller MVC's of whatever framework you're using. Overkill for really simple applications. Crucial for big ones.

Building a PureMVC app was pretty quick, but I ran into a small problem. Since PureMVC Multicore uses a Multiton pattern (essentially a map of Singletons), when Grails recompiles and restarts on code changes, the application barfs with a "Facade already constructed" runtime error. The solution is simple. In your subclassed org.puremvc.java.multicore.patterns.facade.Facade, change the following:

  public static ApplicationFacade getInstance() {
    if (instance == null) {
      instance = new ApplicationFacade(CORE)
    }
    return instance
  }

to this:

  public static ApplicationFacade getInstance() {
    if (instance == null) {
      // nuke the multiton so we can do the grails recompile
      if (ApplicationFacade.hasCore(CORE)) {
        ApplicationFacade.removeCore(CORE)
      }
      instance = new ApplicationFacade(CORE)
    }
    return instance
  }

And voila, your app now recompiles and runs without a hitch, just like a Grails app should. (CORE is a string constant to name your core.)

Related Services: Java Application Development, Custom Software Development

GWTUML – Just Enough UML for Wikis

r243screenshotFlorian Mounier has spent the last six months developing GWT UML, a slick little UML diagramming tool written in, obviously, GWT. It's smooth, good looking, supports class, object and sequence diagrams. You can save your diagram as a url or export it to an SVG. You wouldn't try to do model driven development with it, but for embedding in a development wiki, this thing could rock.

You can find more information at the google code project and check out a demo here.

Topics: ,

Week in Review

Some interesting posts from around the blogosphere:

  • The GWT Plugin for Grails has been stuck in version 1.4.x of GWT for forever. Michael Galping has published a two part (one and two) series at IBM Developerworks on integrating Grails and GWT 1.5.3. Extensive, well illustrated with full source code available for download.
  • InfoQ has published an interesting conversation about Ajax and COMET versus HTML Web Sockets, i.e. hacky COMET versus real bi-directional communication mechanisms between the server and browser.
  • UXDesign.com has a concise summary of an Alan Cooper Interview video from 2008. User Experience Design, baby!
  • David Hamill has some provocative musing on the difference between usability and user experience design. Not sure I agree with everything he has to say, but it's a question that comes up often and is worth thinking about.
  • A bit older, but I just came across it: the original ScrumMaster, Jeff Sutherland, has an interesting article about ROI and incremental development. The conclusion? Incremental is better. :-) But seriously, we don't have enough rigorous thinking and writing about how good design and process reduces the cost of software in the long term (while perhaps increasing it in the short term).

These were some of the posts that I found valuable over the last week. Please share yours in the comments.

IT Mill Toolkit 5 out of Beta

itmill_logoWith the release of IT Mill Toolkit 5.3.0, the server-side RIA framework is now ready for production. I announced the initial release of 5.0 back in December of 2007. Since that time, IT Mill 5 has gone through several revisions and the release of GWT 1.5 (which means you can use Java 5 now on both the client and the server). As a reminder, server-side RIA frameworks let you write your app completely in the server and uses a client-side Ajax engine to render the interface. The nice wrinkle with IT Mill is that both the server side and the client side are written in Java, so if you want to add a component, you don't have to break out the JavaScript (see the extensive and high quality reference manual for details on how to develop your own custom components in GWT). If you're a Java shop, that's got to be a good thing.

PureMVC, Spanning the Platform Spectrum?

PureMVCAt Pathfinder we do a fair amount of desktop style development -- iPhone/Cocoa, WebForms, Swing -- and web application development -- Grails, Rails, JSP, ASP.NET, etc., etc.. In the last two years we, like a lot of other software development shops, have experienced a convergence in our efforts. The web is coming to the desktop in the form of Air and the Desktop is coming to the web in the form of RIA's. Now web MVC, which used to be a pretty benign pattern mostly concerned with app flow and validation, is starting to resemble desktop MVC, which has to deal with document-centric models and long lived views and all of the plumbing that requires.

So we recently had a powwow between all the different parties to talk about MVC and this convergence. With the exception of the insufferable Mac and iPhone developers and their disgustingly mature Cocoa framework, we all agreed it would be nice to have an application level MVC framework for each platform. We also agreed that Swing is a great example of what happens when the vendor doesn't provide such a thing -- spaghetti code that relies on component level MVC and hard wiring at the application level. There are a few MVC frameworks for Swing, such as TikeSwing and Spring Rich Client (soon to be superseded by Spring Desktop), but for every Swing app that has this sort of design, there are hundreds that are just a mess.
Continue reading »

GWT and the Discipline of MVC

When you're developing a desktop or GWT application you're going to go through a bunch of iterations, tweaking the UI, adding components, etc. Sometimes in all of that work it is very tempting to take a shortcut and update a view directly from a controller (label.setText(model.messsageString)). That way lies madness. Before long you've got your view code strewn across the length and breadth of your application. Change the view or some aspect of the model and you're on a refactoring of biblical proportions.

In fact there's never a good time to break out of MVC, but sometimes you just don't know what sort of Observable your model should be. Will you be using a table, a tree, some custom component? In those situations I try to preserve MVC while punting the hard decision until later. To this end, I've written a little set of utility classes called SimpleModel. How do you use SimpleModel?
Continue reading »

Topics: , ,

GWTQuery – JQuery-like Syntax in GWT

Many times open source projects are mute -- they have insufficient documentation. Good technical blogs can function as a sort of ad-hoc documentation. That's what I've tried to do, most recently with my series of posts on GWT and OpenSocial. Vinay, over at Web Technology I/O, often does the same. He's got a great post about Ray Cromwell's GwtQuery (JQuery-like syntax in GWT) and how to make it work.

I've been tinkering with this tool as well and am going to do my own writeup, but thought I'd give you all the heads up. BTW, according to Vinay, the compiled GWT JavaScript for GwtQuery clocks in at 712 bytes!! So much for GWT bloat.

Topics: , ,

GWT, Gadgets and OpenSocial, Part 2

Note: It is assumed that you know your way around GWT and Eclipse for purposes of this tutorial.

While developing OpenSocial applications can be a bit tricky, getting set up to develop can be a real pain in the neck. For this installment of OpenSocial and GWT, I'm going to go through the basics of setting up a simple Hello World gadget with iGoogle. We'll get into the details of signing up for other OpenSocial containers, testing, and so on, later. Right now we're just going to do the basics.

So, what do you need to build a Google Gadget with GWT for iGoogle? You need the following:

  1. The Google Web Toolkit
  2. The GWT Google Gadget API
  3. An account on iGoogle
  4. Access to the iGoogle sandbox
  5. Some public server space so you can serve up your gadget to iGoogle

Continue reading »

Chess Game Viewer in GWT

It's not quite done (the game notation looks like crap in IE), but I thought I'd give a taste of my latest labor of love, a chess game viewer in GWT. This is the sort of thing that is usually implemented as a Java Applet. A few others have already built chess viewers in GWT, but as they say in Full Metal Jacket, "this one is mine." :-)

As I blogged a few weeks ago, I ported the Java chess library ChessPresso into GWT, which was a blast and an example of how you can leverage existing Java libraries to write browser-based apps.

In the example, I've pulled the eleven games of the recently completed world championship between Anand and Kramnik in a single page. The GWT app identifies all of the relevant tags, reads the PGN (Portable Game Notation) in those tags, then inserts a game viewer widget into the page.

What isn't working yet:

  • Doesn't look so good in IE (a little CSS work)
  • The notation pane isn't hooked in so you can click on a move and jump to the position

Anyhow, have a look and let me know what you think.

Update: OK, the notation panel is hooked up to allow clicking on moves to navigate aroung the game. Still looks like crap in IE, though.

Update: for those interested in some of my very few games that make me look good, see here.

Update: Another set of tweaks to display a collection of games, one 41 games PGN chunk and a 250 or so chunk. See here.

Topics: , , ,

GWT, Gadgets and OpenSocial

I've been developing with GWT, OpenSocial and Orkut, using the gwt-google-apis project on Google Code (specifically the gadgets subproject). It's a nice enough api that makes it relatively painless to build gadgets in GWT.

This is a bit different from Didier's gOpenSocial library, which was an early success at building OpenSocial gadgets with GWT. But the google gadget library isn't really quite ready for OpenSocial. I've skinned my knee here and there, so I thought I'd give others the benefit of my experience.

So, first thing, how the heck do I get GWT to generate the

line into my manifest?

Continue reading »

JSONWrapper now on Google Code

The JSON utility library for GWT that I blogged about last week is now up on google code.

To recap, the idea is that you can write code like this

JSONValue root = JSONParser.parse(json);
JSONWrapper obj = new JSONWrapper(root);
String result = obj.get("map").get(1).stringValue();

when dealing with JSONValue objects.

As it's only one class, you could just include it in your source tree as code instead of using the jar.

Topics: ,

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com