Thoughts on Google Web Tools?

J

Josh Russo

I know the general thoughts surrounding most web frameworks, being
largely unnecessary and at times producing problems of their own. With
that in mind, what are people's thoughts on GWT? In case you don't
know it auto-generates all of the JS and HTML. You do everything in
Java.

One of the big benefits to this is that you can more easily unit test
your interfaces. Of course you are trusting Google to produce good JS,
but this really isn't a new paradigm. Other languages/frameworks have
done the same for C and C++. You generally lose flexibility but it's
usually the more arcane functionality that is lost.

Personally, I'm just starting to research GWT but it seems really
intriguing.

What are your thoughts?
 
D

David Mark

I know the general thoughts surrounding most web frameworks, being
largely unnecessary and at times producing problems of their own.

The main thought is that most GP frameworks that exist today are
demonstrably awful (e.g. Google Closure).
With
that in mind, what are people's thoughts on GWT? In case you don't
know it auto-generates all of the JS and HTML. You do everything in
Java.

Sounds awful.
One of the big benefits to this is that you can more easily unit test
your interfaces.

I don't see how that follows.
Of course you are trusting Google to produce good JS,
but this really isn't a new paradigm.

The age of the paradigm notwithstanding, trusting Google to produce
good JS is like trusting a million monkeys to produce good
Shakespeare.
Other languages/frameworks have
done the same for C and C++.

That's a whole different ballgame (and presumably features better
players than Google's JS developers).
You generally lose flexibility but it's
usually the more arcane functionality that is lost.

Personally, I'm just starting to research GWT but it seems really
intriguing.

What are your thoughts?

Don't.
 
G

Garrett Smith

I know the general thoughts surrounding most web frameworks, being
largely unnecessary and at times producing problems of their own. With
that in mind, what are people's thoughts on GWT? In case you don't
know it auto-generates all of the JS and HTML. You do everything in
Java.

One of the big benefits to this is that you can more easily unit test
your interfaces. Of course you are trusting Google to produce good JS,
but this really isn't a new paradigm. Other languages/frameworks have
done the same for C and C++. You generally lose flexibility but it's
usually the more arcane functionality that is lost.

I always give my stock recommendation to carefully review the source
code of any third party code, and offer the code guidelines document to
help with that:
<http://jibbering.com/faq/notes/code-guidelines/>

Regarding what little I know of GWT:
* The overall design is based on using browser detection to send
browser-specific JS (or try to).
* You're stuck writing it in Java, unless you use the "JSNI" or
"native", which still requires editing and compiling java

I can't say anything about the quality of the JS code because I have not
reviewed it recently but the overall strategy of browser detection is an
architectural mistake.


I have noticed that a lot of Google apps use global identifiers (DOM tab
in Firebug).
Personally, I'm just starting to research GWT but it seems really
intriguing.

I thought so when I first heard of it. I quickly changed my mind after
looking into it.
What are your thoughts?

The problems with browser detection have been discussed to death.
There's even an article on it in the notes:
<http://jibbering.com/faq/notes/detect-browser/>

The idea of sending browser-specific code, streamlined for each browser
sounds good but it doesn't provide clean abstractions of the problem of
dynamic environment. Instead, it couples the code to tool and uses an
unrelated inference (User Agent). That strategy will fail in cases, to
identify the browser and can result in cases where the user has a
perfectly good browser that could have worked, but didn't pass the
browser whitelist check.

I noticed that the author of GWT actually advocated the practice of
global variables and actually went on to provide a reason that it helped
performance.
<http://blog.j15r.com/2009/08/where-should-i-define-javascript.html>

But actually global identifiers don't help performance -- they hurt it:
<http://groups.google.bg/group/comp.lang.javascript/browse_thread/thread/566395fc193eb4f1/>

Now don't know if the practice of using global variables made it into
GWT or not, but I do see a lot of globals in Google js and the author
advocating something like that is something to be concerned about.

The browser detection-based architecture is the most obvious deterrent.
 
D

David

I know the general thoughts surrounding most web frameworks, being
largely unnecessary and at times producing problems of their own. With
that in mind, what are people's thoughts on GWT? In case you don't
know it auto-generates all of the JS and HTML. You do everything in
Java.

One of the big benefits to this is that you can more easily unit test
your interfaces. Of course you are trusting Google to produce good JS,
but this really isn't a new paradigm. Other languages/frameworks have
done the same for C and C++. You generally lose flexibility but it's
usually the more arcane functionality that is lost.

Personally, I'm just starting to research GWT but it seems really
intriguing.

What are your thoughts?

If you need a generator look at Pyjamas also:
(http://pyjamas.sourceforge.net/). It's Python based. Now that has
to be better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top