Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

Why Java?, or “How to describe a decision process”

Executive Summary: With all of our experience in Microsoft technologies, why did we choose Google Web Toolkit over other technologies for our start-up?

Almost six months ago, I described my initial reaction to Java coming from ten years in the Microsoft world. At the time, I tastefully glossed over the reason we ended up using Java, or more specifically, Google Web Toolkit saving the discussion for a time when all I really wanted to do was make sure there were no gaps in the list of months in my Archive. Plus the original post inspired would-be blog-reviewer, Dinesh Gajjar, to comment on the lack of content, a position that leads me to believe he’d only recently started reading my blog. In any case, one of his concerns was that I didn’t explain “why I chose what” which I will assume means “why I chose GWT” (and apologies, Dinesh, if by “what”, you really meant “to waste time that could be spent writing comments on other people’s blogs”).

When first deciding on how to proceed, our default was .NET, which led to some obvious options. MVC seemed a no-brainer and since I was involved in Sharp Architecture, my first reaction before we even finished the conversation was to run the Sharp project template. “But,” says we, “we’re pragmatic programmers. Why do we automatically reach for .NET? This is *our* project!”

Thus explains why my resume says I have two days of experience with Ruby. I played with it for (almost) that long before we changed our minds again. As we discussed the nature of the application, we discovered it would rely *very* heavily on JavaScript. So we wanted something that would facilitate that.

At the time, we were also a little apprehensive about the learning curve with Ruby. Not that we wanted to shy away from it. But this wasn’t some fictitious client’s money we were playing with. It was hours. “Learning on the client’s dime” had a more ominous effect when the client’s dime was my dime.

So we ventured back to .NET being familiar territory and telling ourselves “it’ll help us get this out the door faster.” We also looked seriously at OpenRasta because it seemed to facilitate our view of having the server serve up resources rather than the default view of serving up pages. Our intent was to have a single page and dynamically modify the various pieces view JavaScript. We weren’t looking forward to managing history support for something like that but we felt it offered the best user experience, which is more important than our nagging little technical problems.

One nagging aspect to this approach was testing the JavaScript, something I had little experience with. I did some smoke tests with WatiN and was encouraged a little but it always felt a little uncomfortable, especially trying to run the tests on a CI server. And both my partner and I (admittedly, he more than I) were concerned about the costs of long-term maintainability and were pretty adamant on making the app testable and following a strong focus on quality while we built it. WatiN didn’t give us that warm fuzzy feeling and I don’t believe we looked at Selenium at the time.

Around this time, my partner discovered Google Web Toolkit which looked tailor-made for the type of application we wanted to build: A single page with various pieces updated based on user clicks. And you could write it all in Java, which was easily testable. And better yet, it had history support built in.

So we both did smoke tests and decided it was the way to go. To summarize, it gave us (in order of importance):

  • an AJAX application with a good user experience
  • history support (also important for user experience)
  • easily tested
  • strong community and many resources

In retrospect, it seems there is a fine line between “pragmatic” and “indecisive”. There’s a good chance that not all of our decisions were the right ones, just the ones we made at the time with the information available to us. As I reflect on it, maybe we dismissed Ruby too soon. Or maybe we could have built the app faster in .NET and still made it maintainable. Or maybe or maybe or maybe…

Truth be told, writing this post is about all the reflecting I’ve done on it. Because I have no regrets using GWT whatsoever. It’s lived up to its promise. Yes, we’ve run into issues but none that have been insurmountable and certainly no more than we would with .NET (can’t speak for Ruby).

More importantly, it’s because we use Java/GWT that we have the team that we do and, with all due respect to the awesome team I worked with on my first Livelink project a couple of years ago, it is by far the best team I’ve been in in my twelve years of consulting. And this from a guy who gets along with everyone (almost).

Kyle the Indefinite

This entry was posted in GWT, Java. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Augusto Herrmann

    Instead of switching to Java just because of GWT, why not just use RubyJS, a port of GWT to Ruby?

    http://rubyforge.org/projects/rubyjs/

  • http://beletsky.net/ Alexander Beletsky

    Nice post, Kyle.

    Please share all other findings that might be interested for once who all the time “sitting” on .NET. I was also very interested on WTF is GWT.. but just had no time for this :)

    Please also share ideas your are working on, as soon as you think it is possible :)

  • Nordes

    Good article, I might get a look at GWT. I already tested it when it was at its beginning. I am pretty sure that today they have a bigger community.

  • NC

    Smells like fail.

  • Shrike

    Very interesting! And so similar to my process of descovering Ajax.
    I wonder did you consider using jsc (jsc-solutions.com) ? It’s IL converter to JS (and not only).
    Also did you look at SmartClient? Or SmartGRW. Why did choose pure GWT?

  • http://codebetter.com/members/kylebaley/default.aspx Kyle Baley

    Oh yeah, we did consider Script# as well. It’s gotten much more love lately but last year when we looked, it was not active in many months. Plus it’s still, in my opinion, not ready for primetime enough to base an entire application on it. The top item in their roadmap is “Unit test support” which suggests they don’t have it yet.

    That said, if we had waited a year, we would have given it a closer look.

  • http://www.pcmasmas.com Enrique Allegretta

    Have you tried Script# ?

  • http://codebetter.com/members/kylebaley/default.aspx Kyle Baley

    Yes actually. We both had a nice hearty laugh when Silverlight was brought up.

    I’m not actually kidding but I should explain why we laughed. As cool as Silverlight is, we are building a public facing application. And even now, market penetration is still only at about 2/3 (http://riastats.com), possibly less than that (http://www.statowl.com/custom_ria_market_penetration.php).

    Also, our target market is small businesses who may not necessarily be technically savvy so this was considered a fairly big barrier to entry for us.

    Even if it were higher, I still think a public web app should look and feel like a web app. Any technical issues you have to make it work the way your users expect are your problem, not the users’.

  • Kevin McDonnell

    Did you not think of using Silverlight? Dynamic web-based UI and all in MS tech that you know and occasionally love