

GWT just got a new look - florian-f
http://www.gwtproject.org/

======
zamalek
Gah! Again! People not explaining what something is on the landing page!

> GWT is used by many products at Google, including Google AdWords and Google
> Wallet. It's open source, completely free, and used by thousands of
> enthusiastic developers around the world.

Any amount of things fit that description. Beer? Air? Clicking "Learn about
GWT" gets you this:

> GWT is a development toolkit for building and optimizing complex browser-
> based applications.

That's all it takes! Can we _please_ start seeing these kinds of descriptions
on landing pages. You're not selling a clothing brand, you are selling a
toolkit to developers: I care first and foremost what the thing does, not how
fashionable it is.

~~~
Kiro
I agree but GWT is such a well-known project that it's almost OK in this case.

~~~
SwellJoe
I still don't quite grok GWT, even having known about it for something like a
decade. Is it a web application frontend thing that compiles Java to
JavaScript?

~~~
prohor
Basically yes, you write in Java and it compiles it full-client side
JavaScript application. But it also has a lot of goodies, like "templating" or
rather binding DOM to code, internationalization, code splitting (so not
everything is loaded upfront), client-server communication and other things
needed in front development. You typically develop one-page applications with
it (fully client side).

~~~
jakobegger
Thank you. This is the kind of explanation that should be on the landing page.

------
ezequiel-garzon
Grammar question from this non-native English speaker: does it sound right to
say "you can quickly develop _performance AJAX applications_ "? Wouldn't you
say something like "high-performance AJAX applications" or "highly performant
AJAX applications" (or just "performant AJAX applications")? It seems to be
missing something.

~~~
kra34
"Performant" actually isn't a dictionary word, there is sort of a debate about
it's use:

[http://english.stackexchange.com/questions/38945/what-is-
wro...](http://english.stackexchange.com/questions/38945/what-is-wrong-with-
the-word-performant)

the way they are using it seems like their spell checker just changed the word
from "performant" to "performance"

------
johnyzee
Been using GWT for almost a decade. It makes it easy to develop and maintain
enormous and complex web applications, which would otherwise be difficult if
you had to rely only on JavaScript (both the language and the toolchain).

Being able to write the entire application, from the client and the domain
model on down to the backend, in the same language, re-using classes across
the entire application, is a big advantage.

In addition, being a very mature toolkit by now, GWT has A LOT of features to
make life easier. Transparent RPC/serialization, code
obfuscation/deobfuscation, IDE integrated debugging, i18n, resource bundling,
code splitting, JavaScript interoperability, and a lot of other stuff.

Current project: Real-time multiplayer GTA-style game based on HTML5 canvas:

[http://www.webworks.dk/html5engine](http://www.webworks.dk/html5engine)

~~~
ExpiredLink
> * GWT has A LOT of features ... and a lot of other stuff.*

Yep, that's the problem. I had to learn GWT for a project last year and I
don't share your enthusiasm. The learning curve is steep, integration with
"the rest" of a Java EE application messy (but doable) and you still need a
CSS expert. GWT is now a 'grown' framework. Many concepts have changed during
the years and therefore many previous recommendations are obsolete nowadays.
Documentation is meager. After a while I spent most of the time searching for
the _right_ code snippets on Stack Overflow.

~~~
boobsbr
> and you still need a CSS expert.

Like any decent project.

------
polskibus
I've never used GWT, but it looks a lot like ASP.NET (all the button
declarations in code, heavy page lifecycle in code, etc.). Can anyone with
ASP.NET knowledge comment on that? ASP.NET has many problems, there are valid
reasons why most developers are moving towards ASP.NET MVC so I wonder what is
the place for GWT in modern web dev.

~~~
prohor
First difference is that ASP.NET is running on the server side. GWT is fully
compiled to JavaScript and runs in browser. The server doesn't even need to be
Java, can be even plain web server without server side code. With GWT you
typically develop one-page web applications.

As of doing everything in code - not necessary. As of now GWT has UiBinder -
it is a kind of template or DOM + widgets, where you then bind code to it. But
in upcoming 3.0 it will use web components standard
([http://www.w3.org/TR/components-intro/](http://www.w3.org/TR/components-
intro/))

~~~
polskibus
Thanks for clarification. Does GWT assist in storing component state on the
server?

~~~
prohor
No, not at all. There is no concept of a component on the server side in GWT.
For GWT server is like a second tier, similar as you would write in
JavaScript. Though, GWT gives you few ways to communicate with server:

1\. RPC, which is in a way similar to RMI. It supports polymorphism, so you
can get an interface in response and GWT will create correct implementation.
Java is required on server.

2\. RequestFactory, which is more focused on data transfer than
implementation. It also allows to transfer data model, which in server is not
compatible with GWT. Sends only delta of changes when sending back to server.
Also requires Java on server.

3\. REST. It is not maybe advertised that mutch, but GWT can work with any
REST endpoint. It has built in JSON (de)serialization with AutoBeans; or you
could also use Overlay types. There also some third party libraries for REST.
This time server can be anything, just to return JSON.

But if you really want to have sibling component on the server side, then
there is Vaadin - a framework built on top of GWT which has server-side
components which synchronize with client-side counterparts. But then, all
handlers are on server, rather than client as with GWT.

------
mradmin
GWT pronounced «gwit»

Seriously? First I've heard this is how you pronounce it. And how does one
pronounce gwit? I think I'll continue to call it: G.W.T.

~~~
insin
First I've heard of this too.

Obviously "gwit" is pronounced as "jwit", right?

~~~
Dylan16807
jw? In english?

~~~
on_and_off
reference to the gif vs jif debate.

------
farresito
I think the word 'resource' is not well spelled ('ressource').

------
amelius
I'm looking for a toolbox that can give me:

1\. client-side (javascript) database access

2\. automatic updates to the client's view of the database

And also:

3\. automatic optimal re-execution of javascript code whenever something
changes in the input (e.g., the database). Note the word "optimal", e.g., no
glitches, and no (or minimal) unnecessary work done.

Of course, it should be fast :) Does anybody know where to find such a
toolbox, or libraries that allow me to accomplish the above? Any pointers are
greatly appreciated!

~~~
thekaleb
Take a look at [https://www.meteor.com](https://www.meteor.com)

~~~
amelius
Thanks for that link. I did a bit of reading, and found this [1].

> These are the main bottlenecks when scaling Meteor, and they introduce two
> main issues: 1. The polling and comparing logic takes a lot of CPU power and
> network I/O. 2. After a write operation, there is no way to propagate
> changes to other Meteor instances in real-time. Changes will only be noticed
> the next time Meteor polls (~10 seconds).

This seems like quite a limitation. So I wonder if there are any libraries out
there that successfully solved this?

[1] [https://meteorhacks.com/does-meteor-
scale.html](https://meteorhacks.com/does-meteor-scale.html)

~~~
killing_time
Specifically about this issue, see the section about the MongoDB oplog further
down in the article. This removes the polling interval/overhead, so should
significantly improve performance and responsiveness.

~~~
amelius
Ok. It indeed seems to be the case that the polling delay can be eliminated.
But I'm wondering, if db-changes are written to the client directly, is it
still possible to apply security rules to that? Evidently, I don't want all my
db-changes to be written to all clients, and, preferably, a security-filter
should be able to determine which clients receive which updates.

~~~
killing_time
Yeah - the very earliest preview versions of Meteor had this obvious gap where
reads and writes were basically a free for all. However, it's changed a lot
since then. As a development crutch the aptly-named 'insecure' package is
installed by default (which maintains the free for all), but you're expected
to remove it and able to apply fine-grained control to which clients can
C/R/U/D which data.

These two steps of the Meteor tutorial probably describe it best:
[https://www.meteor.com/try/10](https://www.meteor.com/try/10)
[https://www.meteor.com/try/11](https://www.meteor.com/try/11)

------
JensRantil
I'm surprised GWT is still used out there. It's slow as hell to compile and JS
libraries are so much better and more response nowadays.

~~~
rdwallis
GWT 2.7 has incremental compilation. During development, recompile takes less
than a second.

~~~
mark_l_watson
Thanks for that information. I used GWT on two personal projects years ago and
for customer work three years ago. The only thing that I didn't like we're the
long build times.

I like web dev environments that use the same language on both client and
server sides: Meteor, Clojure + ClojureScript, and GWT. I need to use several
programming languages and there is always a small overhead for me when
switching languages.

------
needusername
This
[http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsCom...](http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsCompatibility.html)
seems to indicate that GWT still supports only Java 1.5. Is this true or
simply outdated documentation?

~~~
florian-f
No, currently it's 1.7 (with gwt2.7.0) and soon (when gwt 3.0.0 is released)
it will support java 8.

Parts of the page are still rather outdated and haven't really been touched
since 2010/ 2012.

This is why it's so great that the site got a new look now, it indicates that
things are moving again and I'm sure the outdated parts are going to be
removed soon.

------
ciudilo
Could not easily find what version GWT is on now and OMG those showcases look
like they are from previous century.

------
jamies888888
I've never knowingly seen GWT used in practice. Does anyone have any examples
of (semi) notable websites utilising it?

~~~
stephen123
I used it for about 8 months, Hated it. Its like a big wall between you and
the DOM.

I guess its good of you hate html and javascript. But once you grow up and
realise your making a web page and need to control the DOM in a particular
way, it just gets in your way.

~~~
collyw
Would you recommend it for some one who doesn't know the DOM well?

------
bshimmin
Is it just me, or do the pagination blobs on the right really not work at all?

------
BilalBudhani
carousel switching buttons on the right hand side are not working, even in
chrome.

------
x0rg
It makes sense in the enterprise world where everyone love Java and Eclipse
(at least as far as I can see). It doesn't make sense on HN, not at all.

~~~
collyw
When does something "make sense on HN"? When it is a reinvention of the wheel
done in JavaScript?

------
raverbashing
Seems to me the textbook example of Java people trying to make everything Java
(and failing at it, as usual)

While it's funny (and sometimes silly) to see a huge amount of .js libraries
popping up, they're not adding a big block between the programmer and the
browser.

And js may have its quirks, but it's _not java_ and I'm thankful for that. I'd
rather use js over java anyday, unless there's something really dependent on
it.

