Is the Google Web Toolkit Right For You? 163
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."
Google takes more ground... (Score:5, Funny)
AJAX (Score:2)
Mingling of server and client code is "unusual"? (Score:5, Insightful)
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.
Re:Mingling of server and client code is "unusual" (Score:3, Interesting)
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 p
Re:Mingling of server and client code is "unusual" (Score:2)
Re:Mingling of server and client code is "unusual" (Score:4, Funny)
Re:Mingling of server and client code is "unusual" (Score:2)
Sticky, sticky cohesion.
Re:Mingling of server and client code is "unusual" (Score:2)
Well, ok, done right, coupling requires a hard part.
Re:Mingling of server and client code is "unusual" (Score:2, Informative)
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/ [buddytrace.com]
Does it have an "I'm feeling lucky" feature? (Score:5, Funny)
Re:Does it have an "I'm feeling lucky" feature? (Score:2)
Othertimes your computer might explode, your hard drive might vaporize, or your program might erase itself.
Short answer: No. (Score:3, Informative)
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.
Accessibility? (Score:5, Interesting)
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.
Re:Accessibility? (Score:5, Informative)
*Section 508 Standards for Electronic and Information Technology;
SubSection 1194
Re:Accessibility? (Score:2, Informative)
So, basically your script navigation has to provide text l
Re:Accessibility? (Score:2)
I don't want to provide the bare minimum legally mandated accessibility. I want to provide actual accessibility, so real people with real special needs software can access my sites.
So I'm not really interested in what the law says, I'm more interested in what the actual software out there can do.
Re:Accessibility? (Score:2)
Actually, me too -- I'd love to get a testing copy of a screen reader. I'm just reacting to the assertation which gets floated here that "works in Lynx" is somehow legally requried.
Re:Accessibility? (Score:2)
Re:Short answer: No. (Score:2)
Re:Short answer: No. (Score:2, Interesting)
Re:Short answer: No. (Score:4, Insightful)
Ever think that it's not always someone's *choice* whether they can use JavaScript enhancements?
P
Re:Short answer: No. (Score:3, Insightful)
Re:Short answer: No. (Score:2)
I agree with you about screen readers, to an extent. Screen reader developers are simply not keeping up-to-date with movements in web accessibility. You could argue that this makes sense, since a sizable proportion of sites (probably the ma
Re:Short answer: No. (Score:2)
Ever think that it's not always someone's *choice* whether they can use JavaScript enhancements?
They have the choice of not going to the web site. But I guess fascist, nanny-staters would try and outlaw anything that doesn't conform to some lowest common denominator.
Re:Short answer: No. (Score:4, Insightful)
Don't even get me started on *flash* sites...
Re:Short answer: No. (Score:2)
Although I have done this, it was more out of convenience (to find/download a patch or piece of software). I could have just as easily have used my load web browser to find the URL and then use fetch/curl/wget to download it. No big deal. I can't imagine why you need lynx as your primary web browser
Re:Short answer: No. (Score:3, Insightful)
Re:Short answer: No. (Score:2)
Sera
Re:Short answer: No. (Score:2, Insightful)
Short answer: Yes (Score:2)
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 bo
Re:Short answer: No. (Score:2)
If your management team is paying attention, that should pretty much stick a fork in this technology.
Not really, we are talking about AJAX web applications not about mere (more interactive?) web pages. A user who needs a rich client, will have the right web browser, e.g. a user in a corporate internet accessing a corporate application that happeens to use AJAX / HTML as front end.
angel'o'sphere
Feeling Inadequate (Score:2, Funny)
we just weren't right for each other (Score:2)
Re:we just weren't right for each other (Score:2)
haxe (Score:3, Interesting)
Re:haxe (Score:2)
What, are generics (in Java 5) not good enough?
Re:haxe (Score:2)
YAHOO UI Toolkit (Score:5, Interesting)
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.
Re:YAHOO UI Toolkit (Score:3, Interesting)
Why not learn the tools instead (Score:5, Insightful)
Re:Why not learn the tools instead (Score:5, Insightful)
Expanding on parent's point, a lot of problems I see in my short time in web development is that too many people are getting into it not by learning basics (like how to build a well-formed XHTML/HTML document with DTD and such, or how to make an image swap sources onmouseover or whatever) but by diving straight into frameworks. I understand the want (and need, in some case) to make programming of all flavors more non-programmer friendly, but without that base foundation we'll end up with a bunch of forums full of "how do i make it do this" questions that are elementary in nature and, even worse, a bunch of web apps that are riddled with problems in security, UI, or other. There's no harm in asking questions, but when everyone is asking the same question that is answered in chapter 2 of any good HTML book, that's a lot of wasted time.
I'm not saying everyone needs to learn how to build Slashcode from the ground up using only Notepad, Mountain Dew, and a bag of Doritos, but learning the basics first then going to a framework to speed up your work on complex projects would seem like a better option. It will almost always be cheaper and faster to write simple things in the base language, but so many are so fixed on frameworks they wouldn't know how to do that.
Re:Why not learn the tools instead (Score:2)
Easy answer: because a lot of folks wear different hats in their organization. Its not easy to dive into an area and stay current and still have that be only 15-20% of your day-to-day responsibilities. The reality is, there is a need for developers to be able to create AJAX applications that aren't cobbled together, that can be unit tested with robust testing frameworks, and whose code can be audited, if necessary - and a lot of that just isn't going to happen easily, effectively, or affordably by saying "t
Re:Why not learn the tools instead (Score:2)
Normally, yes. However, there's one key ability that GWT (and other such frameworks that generate the Javascript layer) give you that you just don't have with the "actual code". Namely, the ability to write unit tests. Javascript has some attempts at a unit testing framework, but everything I've seen falls way short of what you need to write comprehensive tests.
GWT solves this by moving your co
Article misses the point a bit? (Score:5, Informative)
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 [googlepages.com]). 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.
Re:Article misses the point a bit? (Score:2)
Under duress, I've had to become familiar with it these last few months, and it really does have some impressive capabilities. Try investigating the prototype.js library; lots of things in there that show just how elegant Javascript code can be, especially if you're a Pyth
Re:Article misses the point a bit? (Score:2)
Why? My experience with Javascript is that it's a rather nice merger of object oriented and functional programming methodologies, rivaling Smalltalk in many ways (not the least of which is ubiquity).
Re:Article misses the point a bit? (Score:2)
'course, if you've grown up in the C++-der
GWT vs. Echo2 (Score:3, Interesting)
Re:GWT vs. Echo2 (Score:3, Informative)
Echo 2.x seems to have now added support for ajax.. a demo is available here: http://demo.nextapp.com/Demo/app [nextapp.com]
Why GWT Isn't A Good Framework (Score:4, Interesting)
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 [alistapart.com].) 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.
Re:Why GWT Isn't A Good Framework (Score:4, Insightful)
Mod -1: Trying too hard.
Seriously though, you say 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. and then go on to say Until someone comes along with a framework that creates clean, semantic code with full separation of behavior, presentation, and content.... Isn't that kind of contradictory? If its spitting out xhtml, css and javascript, that seems like content, presentation, and behavior are all clearly defined.
Re:Why GWT Isn't A Good Framework (Score:4, Insightful)
OK, ignoring the fact that GWT uses Java as its initiation language (it could use Ruby or C++ or PHP) - I still have to disagree on a number of points.
Right, which is why something like GWT is nice because you don't really care that the browser sucks, you write your code and it works. Graceful degradation isn't really an issue in this case ... GWT supports a number of browsers identically (i.e. your code will run identically to the end-user). If you're looking for graceful degradation to plain HTML w/o JS, then that's a bit of a pipe dream, since you're not talking the same application. That's analagous to writing a GUI app (on Windows or OS X or Linux/GTK/Qt) and having it gracefully degrade to a console application. Last I checked, anything that's more than a simple app doesn't do anything like that, and for good reasons. Endless backwards compatibility is a case of diminishing returns and while it may be "nice", it isn't practical or economical.
Um, no. The results are a web-application that functions as you would expect. It is unknown if Google Calendar or Google Spreadsheet are using GWT, but according to Google, the pain they experienced writing Google Maps & GMail played a part in developing GWT - so those types of applications are certainly on the drawing board for GWT. I wouldn't call those apps mangled or anything along those lines. They're quite possibly best-of-breed.
I also disagree that Google's approach with GWT:
On the contrary, I think in reality, hand-coding, by the masses of programmers that cannot be experts at JavaScript and Browser Nuances, has already created bloated masses of code that not only frustrate users & hog bandwidth, but are also difficult to maintain, practically impossible to debug effectively, and a huge drain on an organization's resources. Its time to change that and I think GWT takes steps in the right direction. I haven't heard of masses of users being frustrated by Google Maps, Mail, or Calendar ... at least not because its bloated or hogs bandwidth.
Re:Why GWT Isn't A Good Framework (Score:2)
Re:Why GWT Isn't A Good Framework (Score:2)
Unobtrusive JavaScript (Score:2)
XML11 looks more promising (Score:2, Interesting)
application development, web interface (Score:2)
(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
Google Web ... (Score:3, Funny)
Huh? (Score:3, Funny)
There is an OO equivalent to spaghetti code, and it's fearsome.
Re:Huh? (Score:3)
Re:When I hear OO ... When I hear Java (Score:2, Insightful)
Thats my biggest beef with the way this kit works. The JSNI interface seems like a pure hack to start with doing things like embedding javascript code in a java file using code like the following:
I find these kinds of toolkits get you up and going quickly, especially if you are new. However, the firs
Re:When I hear OO ... When I hear Java (Score:2, Interesting)
Great for college research (took multiple classes on it)... but annoying in the real world
Re:When I hear OO ... When I hear Java (Score:2)
Perl 6. Perl 6 will be compilable to JavaScript, so you can write your web applications completely in Perl
Re:When I hear OO ... When I hear Java (Score:2)
http://svn.openfoundry.org/pugs/perl5/PIL2JS/ [openfoundry.org]
Re:When I hear OO ... When I hear Java (Score:2, Insightful)
This is exactly the reason I gave up on VB. Want to do something even mildly handy (say, check the amount of free space on a disk)? Better figure out the WinAPI call format and figure out how to cast your arguments to FAR_WPTR[1], 'cause VB itself is absolutely worthless for this. OK, so you're not totally SOL, but if you don't have some experience with cross-language subroutine calls, you'll be pulling yo
Re:When I hear OO ... When I hear Java (Score:2)
Re:When I hear OO ... When I hear Java (Score:2)
Re:When I hear OO ... When I hear Java (Score:2)
Re:When I hear OO ... When I hear Java (Score:4, Insightful)
When I hear "code generator", I think compiler.
Re:When I hear OO ... When I hear Java (Score:2)
Re:When I hear OO ... When I hear Java (Score:2)
Re:When I hear OO ... When I hear Java (Score:3, Informative)
There's plenty of unreadable, unusable OO code out there, as well as plenty of well performing Java.
Re:When I hear OO ... When I hear Java (Score:2)
Ahem (Score:2)
There's not a lot of tolerace for criticism of corporations, is there?
I think that most coders feel the same way.
Re:When I hear OO ... When I hear Java (Score:2)
Java's performance isn't "poor" — as is frequently pointed out on this site, this is largely an outdated myth. As for not truly open source, it's a definate issue, yes, although there is open implementations [wikipedia.org].
Re:When I hear OO ... When I hear Java (Score:2)
Perl code can be readable, but usually resembles line noise.... The mere fact that it is possible to write readable perl code does not negate the fact that by design, the language lends itself to unreadable code.
In a similar way, you can write poorly-performing code in any language, but I can't think of any language that has such a high percentage of slow programs. I know that various folks have proven that it is possible to write software that performs reasonably well in Java. However, the sheer numbe
Re:When I hear OO ... When I hear Java (Score:2)
That's not the issue though — the issue was that there's just a stigma around Java now because it was slow in the past (due to a less refined implementation) and because its desktop APIs are generally terrible so desktop apps written in Java tend to be clunky and slow. If you used Java apps a while ago, or Java desktop apps, to gain your opinion of it being slow, you're damned right. But Java itself is not slow.
Re:When I hear OO ... When I hear Java (Score:2)
No
Thus it's ok to have different opinions on them.
Re:When I hear OO ... When I hear Java (Score:2)
Many computer languages are or can be Object Oriented (Java, C#, VB.NET, C++, etc.)
Therefore Java is a sub set of Object Oriented Programming
Object Oriented Programming is not just Java though, cause as said above it could be C++, C#, VB.NET, etc.
Therefore, I believe it's ok to say then that Java (as a subset of OO) may suck
Well, I tried.
Re:When I hear OO ... When I hear Java (Score:2)
Re:GWT feels like GUI programming (Score:2, Informative)
From TFA: GWT essentially exploits the browser as a run-time environment for lightweight GUI applications, and the result is much closer to what you might develop with Morfik, OpenLaszlo, or even Flash, than to normal Web applications
It seems more suitable for client development in intranet-type situations, rather than for stuff to go on the web at large. GWT is walled off from the traditional web page, it seems, and the article says there's no way to take values out of wi
My thoughts exactly (Score:2)
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 Jav
Re:My thoughts exactly (Score:2)
Re:My thoughts exactly (Score:2)
Where cal is the reference to your Calendar object. If that's not exactly the format you want look at the Javadocs for SimpleDateFormat. You can adjust the format accordingly in the above constructor or through the applyPattern method. You can also use the parse method in SimpleDateFormat to parse Date objects from a String. If you then want thos
Re:My thoughts exactly (Score:2)
Re:My thoughts exactly (Score:2)
See the SimpleDateFormat Javadocs here [sun.com] for a complete explanation of how it works including the symbols used in the formatting.
Re:My thoughts exactly (Score:2)
dFormat.format(calendar);
in the obvious trivial way it blows up, because you can't apply a SimpleDateFormat to a calendar. Instead you have to extract the TimeZone from the Calendar, apply the TimeZone to the SimpleDateFormat, extract the Date from the Calendar, and finally ask the SimpleDateFormat to format the Date.
And going the other way is similarly ugly. You can't just construct a Calendar from a Date and TimeZone, or even from y/m/d/h/m/s numbers. No, you have to obtain a G
Re:My thoughts exactly (Score:2)
Re:My thoughts exactly (Score:2)
OK then, show us the incredibly trivial code to parse an ISO8601 date into a Calendar object, and to turn a Calendar object back into an ISO8601 date. And why not a quick example of printing the current date and time in that format?
Re:My thoughts exactly (Score:2)
2005-06-27T12:13:14-0500 and 2003-07-09T06:05:03Z, String to/from Calendar. Show us how utterly trivial it is. Put up or shut up. Arguing "it is because I said so" isn't going to cut it on Slashdot, especially not from an Anonymous Coward.
Why I like YUI (Score:5, Interesting)
- 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
Re:Why I like YUI (Score:2)
I wish it was just a single library, rather than one file for each function (which really isn't, because every function I've used doesn't work unless all of the other files are included as well, even if I'm not explicitly using them.)
Re:Why I like YUI (Score:2)
Re:In all fairness (Score:2)
It's not like GCC was written by AT&T.
Re:As if.. (Score:2)
Re:As if.. (Score:2)
Anyway, I didn't mean to imply that GWT was actually like SWT. I just meant that it was an (clunky, IMO) alternative UI tookit
-matthew
Re:As if.. (Score:2)
Re:As if.. (Score:2)
Anyway, I've complained enough. I'll just leave you with a quote
Re:As if.. (Score:2)
On a Mac, and to a lesser extent Linux, SWT and Swing both suck ass. I refuse to use any Java app unless it uses Cocoa.
I disagree.
On my Mac applications like Eclipse (Java IDE written in SWT) look pretty good, and applicagtions like CodeGuide (Java IDE written in Swing) look pretty normal.
I think you need to be a Cocoa Fanboy or java hater to find much diffrences in the look and feel.
All applications I write, are either web applications, or Swing applications on my Mac
Re:As if.. (Score:2)
While I haven't used Eclipse proper on my Mac, I have used RadRails (Ecplise based) and it was unusable as far as I am concerned. And I ditched that bloated, ugly piece of crap Azureus not too long ago.
I think you need to be a Java developer to actually