Is the Google Web Toolkit Right For You?
An anonymous reader writes "The recently released Google Web Toolkit (GWT) is a comprehensive set of APIs and tools that lets you create dynamic Web applications almost entirely in Java code. However, GWT is something of an all-or-nothing approach, targeted at a relatively small niche in Web application development market. This article shows you what GWT can do and will help you decide if it's the best tool to use for your web development."
Where I hear OO ... I think good ... there'll be readable code, there'll be clean code, there'll be re-usable code ... I think arg ... poor performance & not truly open source
When I hear Java
Looks interesting, but who will take the chance on it?
...because I can't program :-)
34
I, for one, welcome our weather-reporting overlords.
+5, Truth
I think that's how ASP.NET components have worked for years too. So, I wouldn't say that it's unusual unless you're coming from a completely "my text editor is my development environment" world.
Does it have a "I'm feeling lucky" feature, where it will deploy your project for the first time without bugs?
HELLO WORLD8 3EBFB33F2246EBB 897A74180D41D49 338E1479AB03DC4 7535C51E66D577
94732 94732
HELLO WORLD
1D9BA67D23125E86CB9C2766A10181239F1CA5837518E5730
701EF312163B68F68B8A2B495DFDBF7B10723415C482D8A9E
5AA2D6C72FD377A6595210A184A4FEE0C5A624386CAF06888
3070EFA41430C2BAB39CA4F4976EDAE9481C4C868233DC043
K-BYE
P2P Anonymous Distributed Web Search: http://www.yacy.net/
In other words, if you want to make sure your site "just works", GWT isn't a good technology to use. If your management team is paying attention, that should pretty much stick a fork in this technology.
You haven't seen bad OO code? (maybe YOU'RE the bastard who writes it) You don't know how to write good non-OO code? It exists.
There is an OO equivalent to spaghetti code, and it's fearsome.
From a web developer point of view, and as the article states several times, the Google Web Toolkit uses an approach similar to Swing, code written for GWT feels like GUI code more than web code, while I don't have anything against this and I believe it does have audience, I think many would prefer a more web-like approach such as Prototype or the Yahoo UI library.
python>>> q="'";s='q="%c";s=%c%s%c;print s%%(q,q,s,q)';print s%(q,q,s,q)
Using GWT is far closer to developing with Swing or SWT than the usual experience of Web application development,
As if GUIs in Swing or SWT weren't slow and clunky enough. Now Java developers have a slower and clunkier alternative. Yay!
-matthew
"THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
I had to stop after the third line... "Level: Advanced"
I mean, I tried to make it work, but I couldn't ever get her to give me a callback...
I think that's how ASP.NET components have worked for years too.
Not to mention EchoPoint.
It's a good idea, but the devil is in the details.
App developers are overwhelmed with details they have to manage. And we all know that the essence of good design is not having to worry about details until the appropriate time. The flip side is when you do focus on some other details you'd been ignoring up to this point, you don't want to have to worry about details you've already taken care of.
So, the idea is that programmers should be able to program with your framework without worrying that they are doing something web based. That's good. But the flip side of that is that designers should be able to design without worrying about the fact the programmers are using your framework.
The problem with past attempts at this paradigm fall short of ideal because they enforce non-standard or proprietary ways of doing things. They may be good enough, but they could be improved on.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
The main difference is that ASP.NET generates the HTML/Javascript at runtime, whereas GWT compiles Javascript applications beforehand. So performance on the server is not affected by Java at all -- seems like a good use of a managed language.
.NET code on the server at runtime, generating rich client side widgets and managing the client-server communication. It's sort of like a cross between GWT and ASP.NET, I like it because it gives you the full stack of language functionality, and server functionality when you want it, rather than restricting what available libraries you can use when you're writing your code.
I'm working on a project that exposes a similar code design environment to GWT, but does so in managed
The project is GPL'd, and the website is www.emergetk.com if you're interested.
--ben
There's been several JS code generators recently. Apart from GWT there's also haXe which is more ambitious. haXe can also be used on the Server Side and includes some facilities for Dynamic programming (whereas Java is strongly typed 100% of the time).
Also, what's the state of the art in screen readers? Do they have sufficient JavaScript support? (*)
If not, using GWT for a corporate web site is just a lawsuit waiting to happen.
(*) This is not an idle question, I'm sincerely interested in real answers and pointers to software.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
We've already got an MVC LAMP architecture here at work and I have limited Javascript development until the framework was further along. But now the designers are getting edgy because I won't let them incorporate Javascript.
My issue was that I wanted a unified javascript library so we didn't have redundant code snippets all over the place and some way to standardize the development. So after a little searching, I found the Yahoo UI toolkit that is still in beta. It's a unified javascript library released under a BSD license that has been tested in multiple browsers.
No I have a unified library, tested in multiple browsers and standardized that all I have to do is drop into a directory and hook into the framework.
I know this is probably unrelated but since we were talking about toolkits, I thought this would be handy to mention this as well since it saved us a month of work.
This is my sig. There are many like it but this one is mine.
When I saw the announcement I was initially excited... then I saw that the first stage was to write a Java Swing application.
Well, I'm writing a Java Swing application at the moment for non-GWT purposes, and it's a horrible, painful process. I'd rather write raw HTML and JavaScript any day. It's not just a Swing issue; there are still too many things in Java that are way, way more difficult than they ought to be. (Like date and time handling, for instance.)
I really wonder why they built this thing using Java as the source language, when they could have chosen something easy and painless to learn and write like Scheme, Ruby, Python, or even (shudder) BASIC.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
There are developers who still use VI for Web developments :)
GWT is the heavy favorite to serve as the core for our new webapp.
====
Beaches & Casinos: http://buddytrace.com/
http://buddytrace.com/
There's not a lot of tolerace for criticism of corporations, is there?
I think that most coders feel the same way.
Wikileaks, no DNS
Hmm, all the examples in the article look pretty much the same than they were written in JavaScript, but in a more complex way. Why not actually learn the trade. Its easier to fix problems if you're working with the actual code that runs in the browser, not the "meta code".
Hey, this is a bit of a shameless plug for my open source project, but it's on topic to GWT. Speaking to the subject of the post, regarding the utility of GWT, I point to my API and API like it so say there is probably a larger market for GWT than this fellow is speculating, and frankly from my experience with the interface I don't see how he could reasonablely charictarize it as all-or-none (the project google generates is example of how to integrate google GWT into your current HTML using named elements and replacing them....). Features: Fully implemented all the major classes including the new Geocoder and events. Available for download on SourceForge (http://sourceforge.net/projects/gwt/). For anyone interested in helping help please e-mail me (developers, testers, documenters welcome).
In all fairness, untill Sun works out the java problems reguarding their control and non-free implementation, it's simply not worth it for developers to lock themselves in like that.
I would never, ever, ever even _think_ of trying to write an Ajax application. I hate javascript way too much for that, and the whole asynchronous web-page dynamicness scares the shit out of me. However, I can stand writing GUI code in Java, and I already have some knowledge of how it works. GWT enables me to write super-cool Ajax websites without worrying a bit about javascript. I think this is the true power of GWT: it enables _application_ developers (rather than web developers) to write nice web applications without learning a whole new skillset. This is a win for developers because we can do cool things without learning a whole new trade, and it's a win for consumers because web apps can be written by skilled application developers instead of photoshop gurus.
Also, just because GWT provides some server-side machinery doesn't mean you have to use it. GWT will happily make asynchronous calls to any old URL, so you can write your backend in PHP or Perl or C or whatever you like. Personally, I've been playing with GWT using PHP/SQLite as my backend (following Juan Hurtado's great tutorial). It works great, and since I'm already comfortable with Java, PHP and SQL, it doesn't require a steep learning curve to create very nice web apps.
That said, I will certainly be taking a deeper look at TFA later and perhaps following its example to learn how to use the Java server-side machinery. Could be interesting.
This seems like a useful article. At work we were just discussing the possibilities of using the GWT. Currently we use NextApp's Echo1 and are also pondering upgrading to Echo2. The demo app for Echo2 is actually mighty impressive; I'd say moreso than GWT's. Though I wonder how much of it is just more time spent on fancy graphics as opposed to a better quality framework.
Does using Java to write JavaScript make you some sort of super Java ninja?
The Computer Science terms you are looking for are "coupling" and "cohesion." A good design minimizes coupling and maximizes cohesion.
As a disclaimer, I'm a huge fan of Ruby on Rails, and not at all a fan of Java.
The problem with the GWT and other framworks like it as it ignores the reality that browsers today suck. IE's rendering engine is suckier than Monica Lewinsky holding a Dyson at the event horizon of a black hole. Firefox doesn't quite yet pass Acid2, but is as close to a reference platform as one can get. Safari shows promise, but it has a weak JavaScript environment that doesn't support things like ContentEditable. The whole problem is that the GWT assumes a much more stable platform than actually exists.
The real challenge for web application developers is that there are no frameworks (that I know of) that provide for things like fully semantic code, graceful degradation of capabilities, and full separation of content, behavior, and presentation. (For why that separation is important A List Apart has a great article on the subject.) Not even Ruby on Rails gets this right by default.
GWT tries too hard to abstract the actual code that user agents see from the code the programmers create - and that level of abstraction just doesn't work yet. Just like trying to translate a passage in French to English and Japanese with a machine translator, the GWT tries to take Java code and translate it into a mish-mash of XHTML, CSS, and JavaScript - and the results are as mangled as one would expect.
Until someone comes along with a framework that creates clean, semantic code with full separation of behavior, presentation, and content, web application developers have to be mindful of their code and do a lot by hand. Frameworks can save time, but they also cause a trade-off in terms of code quality and compatibilty. The GWT goes too far in that balance IMHO, and isn't something I'd use to develop public applications. Like ASP.NET, it's too reliant on abstracting XHTML/CSS/JavaScript from what the programmers deal with, and that always leads to bloated masses of code that frustrate users and hog bandwidth.
I'd prefer to see a toolkit that provides unobtrusive JavaScript. Basically, you'd tag (with a specific class) the HTML elements that you'd want to act as UI widgets. Then include the JavaScript file, and the JavaScript file does all the work. This provides graceful degradation -- if they don't have JavaScript, they just get the original HTML. And it lets you use all your standard HTML tools, so your designers can still handle all the look and feel, without having to deal with anything besides HTML and CSS.
Software sucks. Open Source sucks less.
The two things I like about the Yahoo! UI toolkit are that:
- it is a la carte
- it represents pretty advanced, human-readable Javascript, which has allowed me to learn advanced Javascript techniques
The first, a la carte, means that the entire web application does not need to be dedicated to YUI. Recently I incorporated a YUI DHTML window (Panel, in YUI-speak) into an existing ASP.NET application. It required only a few lines of Javascript and some HTML. Ditto for another application (JSF, this time), where I added an AJAX data lookup to dynamically populate sample values in a dropdown list. I love the DOM and Event libraries: they really clean up the cruddy job of adding small DHTML things to a website, regardless of how it's put together.
The second, that YUI is a learning experience, is also very important to me. I've come late to the DHTML game, and most books and tutorials on Javascript deal with the basics, and stuff like OO programming is either glossed over or omitted entirely. However, Javascript is a language that is suited to OO programming in a unique way, IMHO. By studing how the YUI toolkit works and seeing what Javascript is capable of, it has opened the doors for new ways of tackling problems and reducing the number of lines of JS code I write.
HBH
"Smart is sexy." -- D. Scully ("War of the Coprophages")
Now I understand why computer science geeks don't "couple". They have a whole different meaning of the word from the rest of the world ;)
Uses java byte code instead of source so it's more stable. http://video.google.com/videoplay?docid=-317158218 7051229467
is terence parr's mantra: http://www.cs.usfca.edu/~parrt/papers/mvc.template s.pdf
i've used his http://stringtemplate.org/ in a webapp with pretty good results...even if stringtemplating is itself a form of programming, at least it keeps java out of html:-)
Interesting, I'm not really a web developer except for a bit of custom javascript DHTML stuff I've done.
;-)
;-)
(Yes, most of my web experience comes from the days when it was just called DHTML..)
This is the first time I've peeked into a platform like this... it's really interesting how close it is to writing a GUI application, like in SWT or something. (Again, I've only done a little bit of SWT, since I don't prefer Java most of the time, but it definitely has its place.)
But I find it amazing how it seems totally incidental that it happens to use the web for rendering its interface. What it really makes me think of is the possibility of writing multiple back-ends for it. Imagine using it to write applications that can compile to both a GUI environment, using native Win32/GTK/Cocoa elements, and then also be able to easily re-compile to a web application. Not sure there'd be any point to that, come to think of it, but the idea sounds cool for some reason.
Or imagine writing an application which is totally local, but happens to use a browser for its interface. It could embed a mini HTTP server in it.. well, I know this has been done before, but this is the first time I've seen an API that actually makes the idea somewhat attractive to me. It would solve the multiplatform GUI problem by just using whatever browser the user happens to prefer.
Anyways, now if only I could use GWT from Python instead of Java..
(Same goes for SWT by the way.. the PySWT project isn't very useful yet. Sigh..)
Did you say "Google Web Rootkit"?
You can defy gravity... for a short time
and executes a shout the loudest Smells worse 7han a e8emplified by
A competing framework Thinwire[www.thinwire.com] has another analysis of GWT.
http://www.thinwire.com/thinwire_vs_gwt.html
Couplin done right results in cohesion.
:D
Sticky, sticky cohesion.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
Yay for cohesion! Too bad you require to couple first. That's the hard part.
I ... will ... try ... to ... remember ... that ... next ... time.
In other words, if you want to make sure your site "just works", GWT isn't a good technology to use. If your management team is paying attention, that should pretty much stick a fork in this technology.
If it's an inhouse app, then there should be no problem. If it's an "app" that's for the public then there should be no problem. If it's a "web site" where the desired goal is to try and be compatible with every possible browser, then the answer is no or serve up different pages upon client detection.
The bottom line is that we live in our browsers so much, that it's very appealing to try and expand the functionality of what can be done on a web page. We'll only see "richer" web pages in the future.
That feature leaves you in an endless beta :-)
No, that's the *fun* part.
:D
Well, ok, done right, coupling requires a hard part.
"Times have not become more violent. They have just become more televised."
-Marilyn Manson
What I don't get is this: Isn't AJAX supposed to require enabling ActiveX support on MSIE browsers? And isn't ActiveX notoriously hacker-friendly? If so then why would anybody want to develop using AJAX?
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
ASP.NET does not natively do what GWT does. In GWT, you write code in Java and it is converted into JavaScript for the client side. Yes, every AJAX applications will still rely on servlets and yes many of your pages will be rendered on the server: this is where it's similar to ASP.NET. The key is that you don't have to write ANY code in JavaScript unless you need functionality outside the GWT. In fact, they have a very neat interface for "native" JavaScript as well.
In ASP.NET you have to write all your JavaScript in.. well, JavaScript or JScript as MS calls it, which is probably a better name anyway since JavaScript and Java have not very much in common.
GWT is new.
It is a great idea, and it's already been copied in the MS environment, which is good.
Here's an interview with someone in the middle of integrating Google Web Toolkit (GWT) with a Spring MVC application. In the interview Michael Podrazik provides some insight and tips for people interested in starting out with GWT.
------ Tim O'Brien
I actually am one of them, and I'm quite productive, I can code way faster than a lot of dreamwaver users I know, and I'm not even an CS graduate or anything related
VI rules, thank you very much
I'm positive, don't belive me look at my karma