Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Is Anyone Using the Google Web Toolkit?

Posted by kdawson on Tue Jul 22, 2008 11:52 PM
from the seemed-like-a-good-idea dept.
eldavojohn writes "After seeing some applications from Google and participating in the Google Codejam (which seems to be built using the GWT), I kind of expected to see websites spring up left and right based off the GWT. Well, it's been a year and a half since they open sourced it and I have to admit that I am more than a little disappointed by its low profile in the UI community. I've been trolling their blog and have seen a few books out on it. But the one thing I'm not seeing is its use outside of Google. I've worked through the examples and tutorials at home and though I've been impressed with the speed, I am disturbed by the actual result — a whole ton of generated Javascript. But this is the first UI technology I've found where I can write in the native language of the server (Java) to generate and unit-test the UI code. Aside from Google's use and the games of Ryan Dewsbury like KDice & GPokr, does anyone know of major sites using the GWT? If you don't and you've used it yourself, why isn't it taking off? Is it too immature? Is it a solution to a problem that already has too many solutions? Is it fundamentally lacking in some way?"
+ -
story

Related Stories

[+] Developers: Google Web Toolkit Now 100% Open Source 173 comments
chrisd writes "When we first released the Google Web Toolkit (GWT) we were focused on building a great tool for people to build AJAX apps with. Now, we're happy to announce that all of the GWT source code is available, including the Java to JavaScript compiler and the debugging browser, under the Apache 2.0 license. If you'd like to see how we pulled off letting you avoid dealing with nasty browser quirks, you should take a look. More importantly, we're running this like a true open source project now: we'll be developing GWT completely in the open, as per our project charter. More info on the GWT blog."
[+] News: GWT Java AJAX Programming 100 comments
simon_kehler writes "The Google Web Toolkit (GWT) is a Java AJAX framework that provides an easy to use programming paradigm for web developers using the Java programming language. It is one of the more recent entrants into this field, but has been gaining a lot of traction and popularity. GWT Java AJAX Programming authored by Prabhakar Chaganti and published by Packt Publishing addresses the use of GWT to build ajaxified user interfaces. The author gently introduces the reader to GWT and then leads the reader through a series of tasks, each of which shows how to perform an useful action with GWT." Read below for Simon's review.
[+] News: GWT in Action 216 comments
Michael J. Ross writes "Server-side computer languages, such as Java, possess numerous advantages over their client-side counterparts — including more robust integrated development environments (IDEs). In contrast, Web-focused languages, such as JavaScript, benefit from the global accessibility of the Internet. Bridging this gap, and leveraging the strengths of both sides, has long been an objective of the software development community — though not all attempts have been successful, e.g., Java applets. The Google Web Toolkit (GWT) is the latest attempt, and shows considerable promise, as illustrated in a new book intended to help programmers learn this new technology: GWT in Action." Read on for the rest of Michael's review
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Anonymous Coward on Tuesday July 22 2008, @11:59PM (#24299401)

    Because a big company open sources something we're supposed drop what we're doing and run to the next best thing?

    JavaScript libraries and toolkits multiply faster than rabbits, there's a new "framework" coming out each week, and some of them had strong developer support (i.e. people willing to answer my stupid questions in forums) long before Google came out with their stuff.

    Not that it's bad or anything, but in the end it's all JavaScript anyway, and learning two different ways to get to the same goal (an interactive site) is generally pretty low on everybody's priority list.

    Are you using Google Sparse Hash by the way? Why not?

    • by Kristoph (242780) on Wednesday July 23 2008, @02:06AM (#24300089)

      The wacky Javascript that GWT generates is fine if your a Googler and understand and can fix issues that might occur but there many other cleaner solutions out there that mere, non kool-aid drinking, mortals can much more effectively work with.

      • by IamTheRealMike (537420) * on Wednesday July 23 2008, @06:31AM (#24301875) Homepage

        D'oh. I'm a Googler but seriously, nobody is meant to understand compiled JavaScript. Good thing then, that GWT provides a mode in which it does not minify the code, so if something does go wrong in the generated JS you can track it down in the human readable version.

        There are a lot of GWT myths floating around here. I don't work on it but I did adopt it for a project of mine recently, and it's worked out pretty well so far. Myths I saw reading this thread, in no particular order:

        • No nice widget toolkits like Qt or GTK+: GWT Ext seems to provide this [gwt-ext.com]. Haven't used it myself though.
        • Content can't be crawled: well, GWT is meant for applications rather than websites, but you can embed anything you want in the bootstrap HTML which will be crawled just like normal. If you have an app in which you want to expose a giant database of things to a crawler then whilst you can still do that with GWT, you don't get as much of the benefit.
        • Can't use "traditional" frameworks like jQuery: a lot of the better JavaScript frameworks have equivalents in GWT actually, for instance, GWTQuery does what jQuery does (let you select nodes from the DOM using CSS selectors) - but it uses the GWT compiler magic to produce optimal code for each browser. For instance, it can compile your CSS expression into an XPath query for browsers that support that, or do things the long winded way for browsers that don't. Thus your user gets a maximally efficient app.

        I suspect you'll see GWT used more and more in future. It's such a radically different approach it takes some getting used to, and whilst it does support evolving an existing codebase towards it, it's still easier if you start from scratch. Still, I do believe that GWT is one of the nicest open source things Google has released for a long time. It's very well thought out and is designed to be very efficient, which is important for any non-trivial web app.

          • by HommeDeJava (986338) on Wednesday July 23 2008, @10:19AM (#24304979)
            Here's a quick overview of what has been done in GWT 1.5 in terms of accessibility support:

            * Keyboard support to Menus and TabBars

            * Added ARIA roles/states to MenuBar/MenuItem, Tree/TreeItem, TabBar/TabPanel, CustomButton/ToggleButton/PushButton

            * Screen readers are now able to identify and speak the content of these widgets

            * Improved tab navigation

            * New API to set ARIA roles/states on Elements (still experimental)

    • GWT is NOT a Javascript library! It's a Java library and a Java-to-Javascript compiler; it saves you from having to learn or work with Javascript at all. This means that you write your client in Java, same as your server-side code, and get to use a real Java debugger.

      • by vidarh (309115) <vidar@hokstad.com> on Wednesday July 23 2008, @03:33AM (#24300533) Homepage Journal
        That's assuming your server-side is written in Java, which is a pretty big damn if when it comes to web applications.
        • by samkass (174571) on Wednesday July 23 2008, @08:51AM (#24303503) Homepage Journal

          You wouldn't write a web app in C++, so why would you want to write it in a language that was designed to replace C++?

          Wow, this comment I think wins the Best Java Troll on SlashDot for this month. There are so many logical fallacies in such a short sentence it almost boggles my mind to try to construct a response that sets the record straight. But to try to cut to the essence, Java solves many problems very well and is thus very widely used, and its technically pedigree is neither particularly rooted in C++ nor is it relevant to the decision to use the language.

        • by cduffy (652) <charles+slashdot@dyfis.net> on Wednesday July 23 2008, @10:20AM (#24304983)

          WTF! You can write server side code but don't know how to do the basic javascript stuff.

          Screw "basic"; if you're building an AJAX site, you want your javascript to be all-singing and all-dancing... and entirely reliable.

          Writing for Java, you have static compile-time checking; you have 1001 different unit tests framework and code coverage frameworks and other tools you can use to help write reliable, production-quality software. For JavaScript, you have jack squat -- not even compile-time static checking. GWT solves that gap, providing a way to apply the same quality control tools and processes you have for your server-side code on your client-side code. As such, it's an extremely valuable tool in your toolkit.

  • by QuantumG (50515) * <qg@biodome.org> on Tuesday July 22 2008, @11:59PM (#24299405) Homepage Journal

    is that everyone wants to roll their own.

    • by SanityInAnarchy (655584) <ninja@slaphack.com> on Wednesday July 23 2008, @12:23AM (#24299567) Journal

      Mostly because no one's really gotten it right yet.

      That, and we still don't have any set of frameworks which have built up enough to be difficult to replace. Nothing close to, say, GTK+, Qt, WinForms, Cocoa, etc.

      • Mostly because no one's really gotten it right yet

        Presumably, everybody is waiting for Web 2.1 or 2.2.

          • by try_anything (880404) on Wednesday July 23 2008, @01:48AM (#24299975)

            No, the cool, unique properties of a web app are pretty much entirely the user experience -- the fact that there's nothing to download, and no updates to manage.

            I develop a rich client application for internal corporate use, and I find that casual users really miss web-style navigation. I get a lot of requests that are essentially requests to simulate a web experience by providing a bunch of screens that users can click through to find the information they want, instead of using traditional (perhaps formerly traditional?) GUI ways of exposing functionality.

            Also, these days, mashups and Greasemonkey scripts really magnify the value of web applications. Deprecating a web application in a big company can be nearly impossible because you find out that there are a bunch of business processes that depend on mashups and fancy Greasemonkey scripts that have been hacked together (usually by interns, IT guys, and other random people) and that provide substantial business value.

    • by Atario (673917) on Wednesday July 23 2008, @01:25AM (#24299865) Homepage

      The secret shame of Web 2.0^W^W^W^W programming in general

      Fixed that for you.

        • by Atario (673917) on Wednesday July 23 2008, @03:08AM (#24300407) Homepage

          Aha, gotcha! I knew someone would pedant all over me no matter how many "^W"s I put in there. You'll be happy (or possibly appalled) to know that I actually opened up a gvim window, pasted my text in there, and hit control-W, counting the presses till I got the desired result. First one kills "0", second kills ".", third kills "2", fourth kills "Web ".

          Too bad Slashdot doesn't allow the <strike> tag, which I would prefer.

          You may now pelt me with taunts of "NERRRD!!".

  • To me, (Score:5, Interesting)

    by bucky0 (229117) on Wednesday July 23 2008, @12:03AM (#24299433)

    To me, the biggest problem is abolutely no fallback to non-javascript browsers. I'm not so much worried about users, but search engine bots won't be able to spider me and drive traffic to me.

      • Re:To me, (Score:5, Interesting)

        by VoyagerRadio (669156) <harold.johnson@gmail.com> on Wednesday July 23 2008, @12:17AM (#24299525) Homepage Journal
        Exactly. Man, when I finally decided to really get down and dirty with HTML (translation: when I decide to learn all aspects of HTML and its related technologies), I got all hardcore over XHTML and CSS. I spent more time validating my site to strict XHTML than making the site prettier (not to mention producing better content). After a few years of my addiction to usability and valid forward-and-backwards-compatible code and Jeffrey Zeldman articles, I finally realized that I was wasting my time. Users don't want valid code: they just want pretty, moving pictures and sound (that they can easily turn on and off, of course).
        • Re:To me, (Score:5, Insightful)

          by FinestLittleSpace (719663) * on Wednesday July 23 2008, @12:49AM (#24299717)

          It's not about valid code, it's about accessibility.

          Your attitude is the same as some dick opening a shop with spiral stairs leading up to it 'cos it's prettier, right?' Yeah, except for those wheelchair users.

          There not be many disabled people compared to 'able', but if you ever become disabled one day, you'll be shouting from the roof for more accessibility just like all the rest.

          • Re:To me, (Score:5, Funny)

            by Anonymous Coward on Wednesday July 23 2008, @02:25AM (#24300175)

            How do you get to the roof in a wheel chair?

              • Re:To me, (Score:4, Insightful)

                by FictionPimp (712802) on Wednesday July 23 2008, @07:55AM (#24302615)

                My problem stems from laws that require me to cater to people I may not even care about as customers.

                For example, lets say I sell stairmasters. If I do not install a wheelchair ramp, I might get sued. Does that make any sense?

          • Re:To me, (Score:5, Informative)

            by msuarezalvarez (667058) on Wednesday July 23 2008, @01:06AM (#24299785)
            you probably do not know what 'valid' means in this context...
          • Re:To me, (Score:4, Insightful)

            by mcvos (645701) on Wednesday July 23 2008, @04:38AM (#24300937)

            Not only that, once you're in deep for a while you realize that "valid code" is a self-defined term. Do you mean w3c valid or microsoft valid or acid 4 valid? Even the developers of each browser have their own view of "valid," hence all the diversity.

            Valid means "valid", which is not the same thing as "working", which is what you're talking about.

            There's no such thing as microsoft valid or acid 4 valid html.

  • by j_kenpo (571930) on Wednesday July 23 2008, @12:11AM (#24299479)

    We built a Proof of Concept Report Designer and Report Viewer on top of BIRT using GWT for the interface. It had some cool features, like multi-user real-time report development, versioning, and tie ins to the commercial report repository that the company that built BIRT sells. It had a real nice WOW factor to it, but in the end, it was just a pretty POC that we could show at conferences, it would never replace the desktop version due to responsiveness (imagine, an Eclipse app that is more responsive than something else...) IMHO, web technology is just catching up in the UI space to where desktop apps were like 15 years ago, and Web 2.0 is still a tacky buzzword. To do some things that are trivial in a desktop app requires a lot of convoluted steps (callbacks, etc). And even things that would be done the same way still requires a network round trip to get information that desktop apps don't suffer (simple tasks like dynamic drop-down or list population). GWT is a step in the right direction, and the ability to debug in an IDE both client and server side components is very nice.

  • Seems Too Heavy (Score:5, Interesting)

    by telbij (465356) on Wednesday July 23 2008, @12:11AM (#24299483)

    I'm a long time web developer but I've never even cracked open the box on GWT, so take this with a grain of salt.

    The idea of depending on generated javascript scares me. I'm against writing Javascript in Java, Ruby, Python or anything else. Javascript is just too much of a beast to debug to leave everything up to an opaque framework, and I want to be able to get my hands dirty. I like the smaller and more traditional open-source style frameworks. Prototype, jQuery, MooTools, even Dojo just scare me a lot less.

    It could be totally irrational, and it also could be the fact that I tend to build web applications that need minimal state and pretty basic AJAX interactions. Nothing anywhere near as dense as, say, Gmail. If the right project came along I'd definitely give it a more serious look.

    • by pohl (872) on Wednesday July 23 2008, @09:34AM (#24304149) Homepage

      I've used GWT to develop a pretty sophisticated server-side piece of a vertical market product. I approached GWT with much of the same trepidation as you have expressed. In the end I just had to "let go" and think of Javascript as an assembly language. (After all, I've been ignoring assembly language all these years, why not ignore Javascript?)

      Now that our product is in a mature phase, and looking back at what we've built, I'm amazed by the brilliant design tradeoffs chosen by the GWT team at Google. Kudos.

      The generated Javascript ended up being very easy to debug, and exceedingly lightweight. Since the source language is static, the compiler is able to leave out every feature that you didn't use. Their "Pay As You Go" philosophy actually works.

      The only major caveat that comes to mind is that GWT shines for "web apps" more than for "web sites", which may account for why the submitter isn't seeing GWT "in the wild". It's important for sites to be spiderable [wikipedia.org], and you get the most leverage out of GWT when you're building an all-in-one-page DHTML rich-client application, not a site. It's still useful for sites, but then you'd be hunting squirrels with a bazooka.

      But that can be fun, too.

  • by Cyberax (705495) on Wednesday July 23 2008, @12:13AM (#24299501)

    There's a lot of corporative GWT-apps because it's, probably, the best toolkit for rich-client web applications.

    However, it's not used much in the public web because most sites just don't need that kind of user interfaces.

    Also, GWT is incompatible with web spiders.

    • by vagabond_gr (762469) on Wednesday July 23 2008, @04:11AM (#24300757)

      I couldn't agree more. There 2 very different ways to use Ajax:
      1) have a traditional site and embed small "Ajax goodies" here and there, like digg does with comments.
      2) have a 100% Ajax site, like GMail.

      Cleary, GWT is good for (2), not (1). Now ask yourself, how many full Ajax sites do you know? GMail, Yahoo mail, a couple more? So it's not a problem with GWT, it's just that the idea of a full Ajax site is not suitable for the open web, it is much more useful for intranet and web-apps use.

  • Probably the most popular social website in Lithuania uses GWT - www.one.lt [www.one.lt].
  • by Gazzonyx (982402) on Wednesday July 23 2008, @12:29AM (#24299599)
    My biggest problem is that I'm studying frameworks, JITs, libraries, languages and spinoff languages nearly constantly, and they're multiplying faster than I can even say I've given a look at them.

    Just a few weeks ago, I had an itch to scratch, so I figured I'd bang out a quick fix in my most well known language, Java (I started Java around early 1.4 days back in high school, as they were fading out C++, although I passed the AP test in C++ the last year it was given in that language). I figured I'd expand my horizons a bit and learn Java Enterprise, as I already have a really solid background in Standard Edition. After compiling a JBoss server, Ant, and getting JBoss studio (read: a day later), I decided to jump right in. Several hours later and a trip to the book store later, I realized that I needed more background info and got the hardcopy version of the Java EE Tutorial. It assumes that you know, XML, RPC, SQL, Hibernate, ODBC, etc. I've got experience with a good deal of it, and it's still a daunting task to learn just the architecture of the Java EE suite. This is before even thinking about writing a bit of code. The amount of time that you have to invest and the steepness of the learning curve is, frankly, intimidating!

    My Eclipse install is a gigabyte, ATM, I've got about 10 IDEs, 3 SQL servers, and a directory called 'programming' with a range of tools and a sub directory called 'libraries' which has SDKs that I've downloaded and intend to getting around to trying. I bought Flex2 and Expression Studio last summer and have barely had time to play with them, and both have new versions out already. Then I've the SDK for Android, Flex (looks like another month of studying the architecture just to hit the ground running), and AIR, all sitting around for me to have time to play with them, before they're obsolete. Not to mention another Java release in the wings.

    There are simply too many frameworks, languages, and methods for anyone to be well versed in more than a small number of them. And they come and go so quickly, I don't know if I should invest time in what might become the next Laszlo (looked really, really, cool - never got any traction). Google offers APIs and SDKs in what, half a dozen languages, and half of them are just interfaces to XML? What's wrong with libcurl?

    I've only got so much time, and lately everything falls in to one of three categories, "cool, and worth the time investment", "cool, but probably only for my own hacking around", and "...what the crap does it do?".

    Am I the only one with this issue? I admit, I spend a lot of time playing with Linux distros, too, so I have less time than others. Oh, yeah, and the four or five languages I'm expected to use every semester, and the three or four that I use at work on a monthly basis.
    • After compiling a JBoss server, Ant, and getting JBoss studio (read: a day later), I decided to jump right in.

      Here's a hint for you: Use Glassfish [java.net]. Your life will be about 1000x easier.

      Here's another hint: No matter what anyone tells you, AVOID JAVA SERVER FACES LIKE THE PLAGUE. The API will not help you.

      Hope that helps. :-)

    • by try_anything (880404) on Wednesday July 23 2008, @01:28AM (#24299881)

      As a student, don't bother learning frameworks with the idea that you will use them later. There are only two good reasons to learn a framework. The first is to use it right away on a project you want to get done. The second is to get experience with frameworks in general and particular types of frameworks. It is valuable to be able to:

      • Learn a framework quickly.
      • Understand the advantages and disadvantages of frameworks, as opposed to lightweight approaches.
      • Evaluate and compare frameworks for a given task.

      Knowing a framework is, in itself, pretty useless unless you are going to use it right away or apply for one of those mythical Monster.com jobs where companies hire people to work with version 2.37a of Ridiculously Specific Technology Z. I don't know of any companies that actually hire that way unless they need a consultant to work with a legacy system whose developers have long since disappeared. In other words, you won't be hired for your experience with a specific framework until that framework is obsolete.

      Now, setting aside the proper way to study frameworks, why are you even thinking about frameworks as an "investment" at your age? You sound like you're in way too much of a hurry. If you learn one distributed N-tier application framework, one web application framework, and one rich client application framework, then you will have much more industrial-type experience than most developers ten years older than you. The downside is that industrial-type experience, while it helps you make better decisions about large-scale software development, also tends to dull your brain. If you're already focusing on frameworks in college, you're going to be burned out and useless by the time you're thirty. You'll end up quitting and starting over from scratch in a new career, just to get away from software. Unless you're just one of those precociously responsible (*cough* boring *cough* *cough*) kids who tracked his gas mileage in high school and thought the coolest thing about the Science Fair was having an excuse to wear a suit and gesture at graphs.

      In college, you should be implementing your own language, becoming a whiz at Emacs Lisp, mucking with kernel modules, starting your own web business, building natural language parsers, and doing all the other silly, vain, perfectly useless (Emacs Lisp excluded) things that end up making you into a smart, versatile programmer.

    • by Llywelyn (531070) on Wednesday July 23 2008, @01:35AM (#24299903) Homepage

      As a software development *student*, you should be focusing more on the concepts, on engineering problem solving, and on reasoning skills than on the specific technologies.

      As a software engineering professional, I learn the tools that I need to effectively do my job. I learn things that look interesting and applicable to whatever it is I am doing. Thus, I work with the GWT and with AJAX because I decided that's what I needed in order to tackle a problem we were having. As a senior engineer who is engaged in the hiring process, I care more about that you can think than that you happen to have seen and worked with twelve dozen technologies by the time you graduated. As a job posting I saw recently says [fogcreek.com]:

      We do not hire based on a specific list of buzzwords, technologies, or popular acronyms on your resume. Today we happen to use Wasabi, JavaScript, xhtml and CSS, and C++ to build FogBugz, but Python and .NET are likely to be important in the future. We use C++ and Objective C for Copilot. We have server systems in C# and legacy code in VBScript. Tomorrow we may be using something different. Whatever technologies, languages, or development environments you've been using, we expect you have mastered them in depth, and we expect that you will be able to master any technology, language, or development environment that we need in the future.

      You can't predict it and the specific tools will change tomorrow, so as a student I would generally say that learning it--unless it is for a specific project or class of projects, or because it contains a concept or problem solving idea that you want to learn--is a waste of time. I learned R back in school because it was more efficient than using Minitab for multivariate statistics and for statistical modeling, not because it was out there and I needed to put it on my resume. On the latter point, I still think learning Prolog and LISP were extremely valuable despite that I never use them professionally and will probably never use them professionally.

      Incidentally, if you are a good engineer, the language doesn't matter. If you are a bad engineer, the language still doesn't matter. *Problem solving* counts for more in the long run than bullet points.

      • by Gazzonyx (982402) on Wednesday July 23 2008, @02:36AM (#24300231)
        Perhaps I didn't say what I was trying to say ;)
        What I was trying to get at is that, I've mostly mastered the concepts, and now I want to try everything that I can. Almost everything that I do is for the challenge/thrill of it. Yet, at the same time, I desire that what I hack around with should become a tool in my toolbox. It's almost like writing code that never gets used; it just feels wrong to pour your blood, sweat and tears in to a project that never gets used.

        I guess it's in my blood, my great grandfather was an architect on the Hoover Dam and Chrysler building, my grandfather a civil engineer (apparently, he used to slam trains together in White Sands, NM. with explosives on them to see how much shock would set them off), and my uncle owns a software company. It's like I have to find the biggest, baddest problem that I can, and then I must own it! And not just own it, but own it from three angles at once. Then, I put it down and almost never pick it up again unless someone asks me how I would attack that problem. I intern for a small local company where I maintain a Linux server, an old Access database, and write some bash scripts... and play with new 'shiny objects' when I've completely my assigned work. (my boss is a Comp. Sci. geek from back in the day - I can usually get him to let me geek out with stuff since he enjoys it as well, and on occasion, it's worked out well for the company) But when I get home, I want to build something! The more elaborate, the better!

        With SDKs, it's the same thing. I'm fairly sure that between kernel hacking and the release of java.util.concurrent with Java 6, (or maybe they extended it...) I failed a course or two. To be honest, while immature, I'd probably say it was worth it for the hours of fun it provided to fully grok the Java threading model or the interrupt routing for an SMP kernel during a critical section of code. The icing on the cake was when I got to hack around more the next semester while we were covering those topics. Or being able to speak somewhat intelligently on the use of 'goto' in class after reading about it in Code Complete. Sure, the extra pay off is nice, but it's what I would have been doing regardless.

        Maybe I'm sick, but I love programming languages. Last semester I was required to do a bit of LISP and PROLOG for AI class, ADA95 for procedural languages, and took up PERL for fun. They're all really fun to hack around in (except I can't really find a great use for PROLOG), and I'm always on the lookout for a chance to break out ADA again. Take it as you will, I also enjoy using recursion. It's too elegant to not admire.

        So, for mine own part, I've found that solving problems is relatively simple, just break it down in to atomic sub-problems, start with the most trivial, and divide and conquer each layer above it; if the solution makes sense, it works. I just want a few more hammers to try out on other problems. Unfortunately, mot problems dictate the most correct hammer by the time you've broken them down to isolated cases, and usually the most boring hammer is the one you should employ. :/
  • by GWBasic (900357) <slashdot&andrewrondeau,com> on Wednesday July 23 2008, @12:29AM (#24299601) Homepage

    My experience with GWT is rapid prototyping. Overall, I like playing around with GWT. It's a great way to quickly dynamic web sites without wading through the mess that JavaScript is. Considering that I do other kinds of software on a day-to-day basis; GWT has a learning curve that's gentle enough to allow me to write powerful UIs as a weekend project.

    GWT's integration with Eclipse; especially its debugger, is a significant advantage. Its compiler is also another advantage. I tend to shy away from JavaScript because I prefer compiled environments with rich debuggers.

    I think GWT's long-term strengths could be its maintainability, although someone who is experienced with both JavaScript and GWT will be better off making such a judgment. I have not written a large, multi-developer GWT application; thus I do not know what kind of complexities arise in such an environment.

    GWT has an odd deployment system that's designed to take advantage of HTTP caching. Compiled javascript files are named based on a hashing algorithm, thus a web server can be optimized to instruct the browser to only download code when a new version is compiled. This makes storage of compiled JavaScript difficult for some deployment scenarios, because the files always change.

    I've been reading the mailing list for about a year, and in general, it tends to have a lot of novices and hard-core Java developers. There's a lot of talk about using various Java frameworks within GWT. I get the impression that, even though GWT is Java-based, using frameworks like Spring or Hibernate is like ramming a square peg down a round hole.

    Some novices don't understand that GWT doesn't run under the JRE, or assume that GWT can somehow magically make their favorite library run in the browser. GWT compiles Java into JavaScript; it does not deal with Java bytecode (except in its debugger.)

    There's also a lot of talk about using various RPC / Remoting protocols when served from a Java web server. It seems that some Java programmers like that they can keep a simple layer between code running in the browser and code on the server. I personally avoid these layers and stick with simple AJAX calls into PHP or my custom-written C# server.

    I wrote this in GWT as a learning exercise: http://andrewrondeau.com/com.Memmexx.GearPod/GearPod.html [andrewrondeau.com]

    Now, you might think "wouldn't it be a cool idea to integrate an MP3 search engine into your demo?" I did, but it's locked behind closed doors because I don't want to get sued! (It turns out that the folks at Seeqpod got sued after I completed the version with the search engine.

  • Not being used?? (Score:5, Interesting)

    by iwein (561027) on Wednesday July 23 2008, @12:42AM (#24299675)
    I've been on a project using GWT in 2007, been quite successful. If you want to see an example that is public run over to Parlays.com, they have a Flex and a GWT version.

    If you want to write clean code check out my blog on TDD with GWT: http://is.gd/1156 [is.gd].

    With the 1.5 release they did some very promising improvements.

    So you're right if you say it is not mainstream, but to say nobody is using it is exaggerating. Just be patient, GWT will continue to grow.
  • We are (Score:5, Interesting)

    by Arnold_DeVos (1331059) on Wednesday July 23 2008, @12:57AM (#24299739)

    We have used it for a fairly big internal application for one of our clients. Given we wanted ajax rather than a typical rich client, the main advantage of GWT was that we could program in the same language end-to-end.

    We managed to avoid a lot of boilerplate code by using the same data class definitions (POJO's) in the server and client. So an object might be created by hibernate from a database record, copied to the client, displayed and edited, copied back to the server, manipulated there and finally updated in the database via hibernate.

    The main omission in GWT is a good framework for binding data to UI elements. Because there is no introspection available in the GWT client environment, it is hard to do this in a generic way. We solved the basic problem by generating class and property descriptors during the usual hibernate code generation step. We then created a UI-POJO binding framework that picks up and uses these descriptors. Again avoiding a lot of boilerplate.

    Our code for all this is here: http://code.google.com/p/gwt-hibernate/ [google.com]

    I'd say GWT worked out pretty well.

  • You start with the assumption it should be widespread, and are disappointed because it is not. Which leads to the question, what leads you to that assumption?

  • I've written quite a few GWT apps in the last year and a half. Here are two that I can show:
  • by twasserman (878174) on Wednesday July 23 2008, @03:15AM (#24300443)
    Ajax Patterns [http://ajaxpatterns.org/wiki/index.php?title=AJAXFrameworks] and eDevil [http://edevil.wordpress.com/2005/11/14/javascript-libraries-roundup/] compiled a list of more than 100 Ajax toolkits, covering a wide variety of underlying language technologies. While many of these get very little use, there are at least six [Yahoo UIL, Tibco (General Interface), Google GWT, OpenLaszlo, Microsoft .Net, and Dojo (or the commercial WaveMaker based on Dojo)] with a significant developer base.

    When people are looking for an Ajax toolkit, the Google name often gets it onto the selection "short list", but that doesn't automatically assure that it will be the final choice. Many corporate IT organizations insist upon commercial support for any software that goes into their business-critical applications. Of course, Google does not provide such support. In those situations, GTK will be ruled out for business reasons, independent of its technical merits. The net result is that there are numerous sites built on GTK, but the large variety of choices means that no single framework or toolkit has yet emerged as a favorite.

  • I used it (Score:5, Interesting)

    by Fuzuli (135489) on Wednesday July 23 2008, @03:30AM (#24300511)

    Because I needed a website with a high level of interaction. The client asked for enabling disabling of various things on a widget, some bells and whistles,but nothing fancy. In the beginning I wrote the code for this using javascript, hand coded the whole thing. But change requests, and much more important than that, browser compatibility problems cost me a lot of time. GWT fixed this aspect. Mostly compatible with all major browsers, and being much more experienced in Java than in js, I became more productive.
    However, I should have limited my implementation to a single widget, and that was my mistake when using GWT. Use a plain jsp page, attach the widget to a div, and be done with it. Instead I've built the whole thing on GWT, and later fell in a position where I can not easily add very simple stuff. The usual GWT app is one single js chunk, which navigates to different pages by hiding and showing things on a page. This requires a little getting used to, and I've implemented more flexible things like pulling html via remote calls etc. But in general, mixing GWT with a more server side oriented technology (asp.net, jsp, jsf etc...) looks like a better approach now. But when you have to build a slightly complex interface where there are trees, enabled disable compoenents, users adding, removing things to a list etc, GWT serves well. I guess the secret is in the balance, just use it at the necessary level, no more. I could have used Flash, but that'd be a total pain for multiple reasons. (a lot of reasons actually)

  • by tangent3 (449222) on Wednesday July 23 2008, @05:04AM (#24301169)

    Theoretically...

    Number of Java developers > Number of Flash developers > Number of Silverlight developers
    Number of Javascript capable browsers > Number of Flash enabled browsers > Number of Silverlight enabled browsers.

    Which is a good idea, since Google has created a framework in a language that most developers are familiar with, for a platform that just about all web browsers support out of the box.

    However...

    Number of PHP hosting sites > Number of ASP hosting sites > Number of Ruby hosting sites > Number of Tomcat hosting sites

    Which is probably one of the reasons why it's not doing so well.
    GWT-RPC is excellent. It allows me to use the same data objects on client and server, and debug both from the same IDE. But it requires a Tomcat server.

    Now if GWT is able to compile the server portion to easily deployable PHP code, this could lead to somewhere interesting.

  • by MrBlic (27241) on Wednesday July 23 2008, @07:13AM (#24302181) Homepage

    I've recently spent a year with the GWT, and just a couple of months with Flex.

    I would use Flex to flashify whatever dynamic parts of a standard html page I needed to for my next project. Everything that I'm trying to do in GWT could be done much faster in Flex... and when you are done in Flex, you are really done.

    In the GWT, you have to be aware of what html each of the Java GWT widgets equates to... and then in the CSS, you have to work thinking about the resulting html. (FireBug makes it pretty easy.)

    Cons for GWT 1.4:

      - Long start-up times: web sites can take 8 seconds to show you their first page as the GWT javascript initializes.

      - One imperfect CSS declaration, and you're having to debug IE6 / IE7 / Firefox / Safrai issues... Only very plain sites are insulated well from browser incompatibilities.

      - Your site is all-or-nothing GWT. It's possible to use one GWT app to automate one part of a static page easily... but usually your whole site is 100% GWT, with no other static pages outside of the GWT's control.

      - The AJAX mechanism on RFC-compliant browsers only lets you make two async requests at once... a third request is queued until one of the first two async requests returns... making it only asynchronous to an extent.

      - I ended up having lots of html in my .java files, and using the HTMLPanel to turn that html into a GWT Widget. There are some parts of a web site that really do make more sense as HTML, and there's no easy way in GWT to keep the html separate (no templates!?!)

      - The integration of GWT development can be done simply, but it can also grow to mirror the complexity of EJB style Java junk way too easily.

      - IE needs special treatment (worth repeating.)

    That said, it's probably the best way to create a web app for an iPhone right now, since there's no flash on the iPhone. (Please Adobe, I'd love it if you created an Air run-time for the iPhone!)

    Pros of the GWT:

      - it makes it easy to handle the back button and bookmarks.

      - it can scale up to fairly large sites, and the smallest building blocks can be kept clean and small.

      - the end user experience is a good one after that start-up delay.

      - The GWT team has done lots of fantastic work, and in an open exchange... one of my coworkers has committed some changes to one of the supporting libraries.

    Flex, on the other hand is designed to appeal to people who are weary from fighting CSS / browser incompatibility issues. In Flex, you still use CSS, but it works the way you would expect all the time. In Flex, you can also skin any compononent to look however you want, and then have a very clean top-level which wires up the various components with their skins. It's really beautiful... and best of all, when you're done, You're done! You don't even have to test on IE6! The learning curve is about the same, or a little harder, but it's all forward motion.

    My next site is going to be 80% Django templates, with a good dose of mochikit (or dojo) for some dynamic parts, and a few Flex / flash applets sprinkled in where they make sense.

  • Internal project (Score:4, Interesting)

    by WPIDalamar (122110) on Wednesday July 23 2008, @07:26AM (#24302329) Homepage

    We did a QA interface to one of our projects so we could test the backend without going through the rich client. It was a great experience and really easy to get working. The javascript/java backend communication was ultra-simple to get working.

    But...

    If we want to really easily create something that looks great we'll be sticking with more traditional approaches either using Flash/Flex or AJax with a standard JS library. Having a designer skin a GWT app is harder than those approaches.

    I've been reading a lot about DWR and that plus a UI library will probably give you most of the benefits of GWT. Have to give it a try soon.

  • GWT is cool once you get started, but eventually familiarity breeds contempt. The issues that always bothered me were the following:
    • Any UI toolkit is going to limit customization of the UI to an extent.
    • The javascript is generated from Java code on the client side, and best supports Java code on the server side. This presents two issues:
      • Good luck finding a cheap Java host
      • You are tempted to use cool things like Hibernate, which presents a problem when entities are being passed to what is ultimately javascript code.
    • Deploying was always a bitch
    • Writing a webapp in a statically typed language seemed.... wrong.

    I ultimately scrapped this project and started it over using another google product, Google App Engine. All client side stuff is done using jQuery, it gave me an excuse to learn python which I absolutely love. And, GAE has the specific goal of making it easy to deploy and scale the application, which was always something I had dreaded even thinking of.

    • Re:It's used... (Score:5, Insightful)

      by John_Booty (149925) <johnbooty@NOsPaM.bootyproject.org> on Wednesday July 23 2008, @12:32AM (#24299613) Homepage

      On a personal level, I'd rather see the effort spent learning GWT applied to learning Javascript and the web technologies instead. There are a lot of frameworks out there, but none of them are actually needed in 90% of the cases. What we actually need are programmers who know how to write maintainable and highly interactive Javascript components for their sites. Such knowledge allows them to get the job done faster than mucking about with Yet Another Framework(TM) designed to take a cannon to the problem of killing a fly.

      It's not learning Javascript that's the big obstacle to coding your own solutions sans framework; it's dealing with the browser compatibility issues. Frameworks largely compensate for that.

      If you write your own non-trivial Javascript code, you have to test on IE 6/7/8, FF 2/3, Opera 9.whatever, Safari 2/3, etc etc etc etc.

    • Re:fr0sty piss (Score:5, Interesting)

      by hostyle (773991) * on Wednesday July 23 2008, @02:54AM (#24300335)

      Apart from a few niche Web 2.0 sites, most websites are still built using tried and tested backend tech, and laid out using HTML, CSS and some graphics. GWT is pretty much doing everything using Javascript and a little bit on the server side serving xml/json. Not everyone needs AJAX. Most sites need to be able to work without it (for accessibility, backwards cinpatibility and non-javascript visitors), so unless its capable of adding really useful features (cases of which are few and far between) AJAX and GWT are just not necessary. Its nice if you can have it, but its a luxury you don't actually require for a usable website / web application.

      • Re:fr0sty piss (Score:5, Insightful)

        by encoderer (1060616) on Wednesday July 23 2008, @08:16AM (#24302991)

        I think the market has shifted a bit more than you're giving it credit for.

        But it all depends on your niche.

        We built our business on web retail and we still do an awful lot of it. And in that world, you simply cannot afford to lose a customer due to whatever whizbang technology you want to use at the moment.

        But outside of retail is very different.

        And the truth is, non-JS visitors and non-Flash visitors are the slimmest of minorities. 1-3% on average. If I was targeting the /. market I'd accommodate it. But for a general cross-section of the web? Javascript rules the day.