Life outside .NET, or “How to check out your neighbours”

The hillbilly be all Java’d up these days. For coming on three weeks, I’ve been the lone developer on a project based on Google Web Toolkit. It’s a web framework (naturally) that allows developers to build applications in Java and compiles it down to JavaScript, CSS, and HTML. Scoff all you want, if it were any other company behind it, I’d probably be right there with you.

We considered quite a few technologies before landing on this one. We went through Ruby, Sharp Architecture, Open Rasta, Moo Tools, and probably several others. I can defend ending up Google Web Toolkit privately if you want but putting the thought process up in a public forum is going to lead to comments that I’m too tired to moderate these days. And yes, I’ve heard of Script #, too.

Coming at this from a .NET developer’s standpoint has been interesting. It’s surprising how much we take for granted in our IDE, for example. I’m still meandering my way through the keyboard shortcuts in Eclipse (after a brief fling with IntelliJ IDEA). One thing I’d really like is a keyboard shortcut for the GWT Compile button, which currently is available only via a toolbar button or a context menu, as far as I can tell. Was happy to find a VIM plugin for it too that works as advertised.

Not sure if this applies to Java in general but within the confines of the Google Web Toolkit, the ecosystem is freakin’ phenomenal. The documentation page alone encourages unit testing and the use of an MVP architecture. Once you start reading about it, you can’t help but stumble on a number of other projects:

  • gwt-presenter: A passive view implementation for GWT
  • gwt-dispatch: A command pattern implementation for GWT
  • Guice: Google’s dependency injection framework
  • Gin: A dependency injection framework for the client part of GWT

The shocking thing from a .NET perspective is that these concepts are just sort of assumed. There’s little debate on whether dependency injection is necessary or whether passive view is overkill. Someone watched a presentation from Google IO last year, whipped up a command pattern project based on it, and lo! the people said it was good. Between support for Hibernate and the App Engine data store, I think people would look at you bug-eyed if you even suggested writing your own data access layer.

The downside to all this as that the tooling seems to be several steps behind what I’m used to in the Microsoft world. It’s still too early to make a fair comparison but even after digging a little deeper into Eclipse, I can’t imagine being quite as productive as I currently am in Visual Studio. Yes, there’s also IntelliJ but our anecdotal evidence suggests that neither Java IDE is seen as a de facto standard. For the moment, I’m sticking with Eclipse simply because all the documentation refers to it and the GWT and App Engine plug-ins for it work out of the box.

Couple of final shout-outs to two blogs that have been invaluable during the learning curve phase. First is Hive Development (currently featuring two posts on how to unit test MVP applications in GWT). Second is TurboManage, whose sample code is more detailed than many apps I’ve written.

Anyway, it’s been an interesting couple of weeks.

Kyle the Decaffeinated

  • http://www.opgenorth.net Tom Opgenorth

    I too have been checking out the neighbour but from an Android/mobile perspective.

    Eclipse is okay, but I’m faster with IntelliJ because I can use my Resharper-ness to some degree. Personally, I think I’m going to pony up and pay for an IntelliJ license for my Android efforts.

    I like your "…these concepts are just sort assumed…" comment. It seems to me that our .NET community likes to have the same arguments and debates that the Java community had 5 ~ 10 years ago.

  • http://gwtpro.com Tony BenBrahim

    One thing I’d really like is a keyboard shortcut for the GWT Compile button

    Something must be wrong with your workflow, I go several days without compiling, it is too slow and rarely necessary. The GWT development mode gets better with every version, and since version 1.7, I have not found an example where code would work fine in development mode and later fail when compiled and run in a browser. Especially now with out of process hosted mode, where you can test in the browser of your choice (if a plugin for it is available), there is even less reason to compile. I let my build system do the compiling.
    As for being uncomfortable in Eclipse, I feel the same way towards Visual Studio when I have to use it :-) , I always feel it is inferior to Eclipse (especially VS without Resharper).