Dion Hinchcliffe's Web 2.0 Blog
Web 2.0 University

Blog Feed

Subscribe By E-Mail

Enter your email address:

Delivered by FeedBurner



Web 2.0 Expo San Francisco 2008 Speaker

Enterprise 2.0 Conference 2008 Speaker

Web 2.0 Strategies 2008 Speaker

    follow me

    Dion's Facebook Status

    Recent Readers

    Web 2.0 Ajax SOA Power Panel

    Web 2.0, Ajax and SOA Power Panel with Dion Hinchcliffe and Jeremy Geelan
    Click above to watch a SYS-CON Power Panel discussion on Web 2.0, Ajax, and SOA with Dion Hinchcliffe, Jeremy Geelan, and other industry notables including SOA Web Services Journal Editor-in-Chief, Sean Rhody. Taped on Dec 7th, 2005 from the Reuter's TV studio in Times Square.

     

    Public Calendar

    Google's Innovative Yet Limited Ajax Environment: GWT

    posted Sunday, 21 May 2006
    Google's recent foray into delivering an Ajaxified Web application stack, the Google Web Toolkit, says much about Google's pragmatic method of delivering innovation to the market.  I for one, would heartily recommend it for certain applications, while actively advising against it for others.  One major issue is that Google makes a lot of assumptions in GWT that are non-starters for certain uses.  Though making dramatic assumptions isn't a lot different than what Ruby on Rails does to make Web app development easy, the assumptions are different in interesting ways.  Also note that Google does not provide a complete application stack with GWT; it only goes a little bit into the server, past the serialization boundary, which actually leaves the developer free to use the server-side frameworks and libraries of their choice, as long as their Java compatible.  This is part of the pragmatism I was talking about and it turns out GWT is only high concept in a couple of places.

    One of the reasons I track Ruby on Rails so closely is that it's an almost perfect match for the Web 2.0 way of building software: radical simplicity, support for almost instant turnaround of fixes and new features, automatic support for a public API so that applications are turned into platforms on their very own, and incorporation of well-recognized open source Ajax libraries, etc..  Note that GWT isn't even open source, though it is available today for commercial and non-commercial uses.  As we shall see, GWT just does not seem as Web 2.0 friendly, and seems built for more traditional pure-play software as a service (Saas).


    The Google Web Toolkit for Ajax


    What's in GWT and Why Is It Special?

    By now you probably think I don't think much of GWT, and if so, that's doing it a disservice.  Rick Hightower recently did a wonderful job summarizing the key points of GWT, saying it was perhaps the biggest announcement at JavaOne, and so I won't repeat all his coverage here (indeed he just added a great interview with the GWT Product Manager, so please go read it.)  GWT is free, seems very high quality, and lets developers write entire Ajax applications in Java, so they can take advantage of excellent development, testing, and refactoring tools such as Eclipse that have formed around the Java development world for a decade.  Google claims that GWT results in Ajax software that is just as fast as hand-written Javascript, and it uses a lightweight servlet mechanism to provide data from the Web server.  GWT even prevents that classic Ajax antipattern, breakage of the browser's back button.  And of course, GWT masks the idiosyncracies of the different browsers from the developer almost completely.

    But what makes GWT special is that it reclaims Ajax from the programming equivalent of the woodshed.  Real developers have a strong aversion to Javascript, and for good reason.  It's a twitchy, skittish scripting language that is made even harder to work with by different browsers processing Javascript in subtly different ways.  Javascript was never intended for the design and maintenance of robust and sophisticated software applications.  Just the sort of advanced in-browser software that we're seeing emerge almost constantly these days. The software development world has gone too far to accept such a remedial situation, and so with Ajax here to stay, workable alternatives to pure Javascript development like GWT are clearly desired.  Ruby on Rails has done something similar with their Ruby to Javascript compiler for a little while now and GWT does the same thing for Java; getting developers back to tools and languages that were designed for the job of creating properly designed and engineered software.

    Finally, GWT fully abstracts away the browser and leaves little directly contact available to the developer, though there are ways to break out and Google provides something they call the Javascript Native Interface (JSNI) to allow developers access to the local browser environment.  Blendability with other Ajax toolkits and components is also a potential problem (though that is always an issue), and it's unclear as of this writing how easy GWT is to mix with Flash and Flex.

    Potential Issues with GWT (or, does GWT create closed RPC Stovepipes?)

    I did take a pretty close look under the covers at GWT this afternoon and there's quite a bit to like.  The extreme thoughtfulness towards the developer's ease-of-use is evident, and there are several powerful ways to debug GWT applications including a neat plug-in for most platforms that allows sophisticated debugging, profiling, and analysis of GWT applications in the browser.

    Despite this, there are some flies in the ointment, and the GWT designers made some choices that makes it hard for developers to take advantage of some of the most important aspects of Web development.  One of these is their choice for using and exposing services.  Surprisingly, developing GWT-friendly services will NOT create an open, interoperable Web service.  In fact, GWT's servlet approach makes applications developed with it into walled gardens that can only communicate with other GWT services for their data.  You have to separately develop the services you want to expose to the world as traditional Web services.  This is in sharp contrast with other Web application stacks (yes, like RoR or ICEfaces) which can expose the same services to the world as the ones the Ajax applications uses.  Using the same Web services as the application is offering to the world cuts server-side testing and development in half and also automatically creates a public, reusable API that lends itself to mashups and the many advantages to being in an service ecosystem on the Web.  Hopefully, Google will address this in a future release of GWT because if true, that's a fairly serious limitation.

    But this in itself isn't a showstopper for many uses, as are GWT's limited subset of the Java run-time library (only java.lang and some of java.util are supported currently).  But one of the fundamental issues with GWT seems to be its inabilty to use services other than the ones developed using its servlet method.  As far as I could determine, access to services other than those developed using GWT requires leaving GWT and using the Javascript native interface they provide, giving up many of the benefits of using GWT.  Web service re-use is increasingly one of the most important aspects of Ajax development since the landscape of services avaialble on the Web has become truly amazing (see ProgrammableWeb's terrific directory of public Web services and APIs.). 

    Hopefully, the Java serializing scheme that GWT seems to prefer will be expanded to support a true Web-Oriented Architecture and non-GWT services such as RSS, REST, SOAP, and others.  And it's this last piece, until properly addressed, leaves me to caution people considering GWT until it's clear how easy it will be for GWT to co-exist with SOAs, WOAs, and the rest of the Web.  Because developing standalone, stovepiped software is a dying art form.

    Good Write-Ups on the Google Web Toolkit

    The Official Google Blog: Making Ajax Development Easier
    Doug Schaefer: GWT Another Turning Point
    Werner Schuster: Google's Plain Java Ajax Tools
    Internet News: Google Cleans Ajax for Java
    Richard MacManus: Google Web Toolkit Released

    What do you think? Are you looking at using the Google Web Toolkit?

    links: del.icio.us    



    AddThis Social Bookmark Button

    1. SimonG left...
    Sunday, 21 May 2006 9:57 pm

    "Real developers have a strong aversion to Javascript"

    ???? what ?????

    Real developers - aka professionals - impose discipline on their development processes and simply make it work, in whatever they do.

    GUI developers specialise in creating GUI products on a target platform - be it Cocoa, SWT, Swing, Browser HTML/JavaScript.

    Server side web developers who try to abstract away from the browser do so because the browser is an environment that pulls them out of their own skill set. Fair enough, as server side web developers should not be doing GUI development - GUI is not their focus.

    But *real* developers?

    The browser as a platform provides an environment for a rapid feedback loop - it is possible to develop with static html, javascript and data stubs, and simply refresh to see the results. Put an intermediate step and have a server side component mark up the code, and watch that feedback loop degenerate.


    2. venkat left...
    Saturday, 27 May 2006 9:01 pm

    Google Toolkit does not go far enough. Why do only 20% of the desktop GUI platforms, if it is possible to do 200%?

    Please understand the simple logic: All we need to do is invent reusable Ajax GUI classes, which are better than GUI Classes for desktop platform. Then it costs less to build superior online graphics intensive application than possible on desktop.

    A small company, Pioneer-soft recently published an innovative "recipe" to do just that: http://cbsdf.com/technologies/DHTML-Widgets/TECH-Summary.htm

    Although the technology let us build GUI Classes for DHTML components, it would have most impact, when next generation vector graphics such as XAML/Vista or Mozilla/SVG are released.

    It is very hard to create "real" graphics 2D/3D GUI components with out fine-grained control over drawing/animation. Both Microsoft and Google recently came to this conclusion and using SVG on the maps. This trend would continue.

    For example, how is it possible rotating to certain direction or change colors to the GIF image in the following SVG air traffic control application? You need Abobe’s SVG viewer to view the following sample: http://cbsdf.com/technologies/jsp/atc_test1a.jsp

    P.S. Dion, please contact me using my private email to talk about the inventions!

    Regards!


    3. AJF left...
    Sunday, 4 June 2006 2:33 pm

    I have a little different perspective on GWT not using an open web services approach that you see as a negative. For my application, I see this as a plus. For business reasons I don't want my API open to the public for anyone to create a mash-up using my data against my will or without my knowledge.

    While GWT's approach doesn't prevent someone from reverse engineering the API, it makes it much less likely to happen to my website as there are easier pickings elsewhere. Because my data is proprietary, like that of may business applications and websites, I happy GWT didn't choose a well know web services API.


    4. dougd left...
    Monday, 5 June 2006 7:45 pm

    I strongly aggree with your suggestions that 'real developers' avoid Javascript. The GWT is yet another step in the current trend to build tools that make development more efficient and effective.

    The frustrations of web development have long been good reason to avoid it. Why frustrate yourself writing assembly code to perform 16bit arithmetic on an 8bit processor when you don't have to? Bad software stems from the fact that developing software with many tools is so unnatural. Working with Python or RoR leads to better software as it avoids programmers performing tasks that should not be necessary for high level development. A builder wouldn't build a house with a blunt saw, sure they could, but being able to deal with difficulties and irritations is not the sign of a true professional. A true professional uses tools that make the best sense. Charging a client a fortune to work all the idiosyncracies out of an AJAX application when this shouldn't be necessary is criminal.

    There are reasons why in 30 years most software houses still can't engineer bug free and stable software, it's quite simply the tools they use. An engineer building a bridge has to build a bridge that works. Software development is yet another engineering process that shouldn't accept error as 'part of the business'. GWT, RoR, Python and tools in this vain go a long way towards creating a future where software development will be about innovation rather solving problems that shouldn't exist to begin with.


    5. magixMan left...
    Thursday, 22 June 2006 8:19 pm

    I take exception to the idea that real programmers don't like Javascript or that Javascript is unsuitable for large scale application. You would think that we are talking about assembly language here. JS is a high level language and can be well structured. Yes you do give up things like validation of data structures but that is just not my biggest problem. My biggest problem is getting the most out of DOM to make a sexy application and I fear that this higher level abstraction will get in the way.

    Maybe I am wrong about this as I have yet to use GWT it for anything significant. My experience, however, is that I end up using everything at my disposal to get applications to really shine and I don't look forward to having my hands tied. Sure I can insert native JS into my GWT but then I have to be aware that I am in this big framework that is doing these things that I did not need to understand until I actually needed to drop into native JS.

    I am not yet sure what is wrong with JS + web services approach. I don’t find JS to be at all problematic and I find the cross-platform issues to be less significant than I thought after dealing with the obvious stuff like keyboard and event handling. Clearly a lot of people don’t agree since there is such an explosion in frameworks for browser based applications.

    I am just not sure what to think of all of this. The good news is that for the first time there really are a lot of options!