The Java/JS integration is handled the same way it's handled in any large distributed system: define a protocol for the server and client to communicate. Only evolve the protocol in backwards-compatible ways. You need to do this anyway if you expect user sessions to survive server upgrades, because you may have an old client talking to a new server. I'm curious how GWT handles this case - if it's autogenerating communication responses, it needs to be aware of both old and new versions to safely upgrade them.
So if you want old user sessions to survive, you'll need to keep the old service available until they reload the page.
There are protobuf/JSON-based alternatives with a better compatibility story.
I routinely deploy a new version while hundreds of users are online and nobody is the wiser.
But this can be tricky for large, distributed projects, where the author of a class might not even be aware that it's used with GWT.
This is not difficult.
Protobuf/JSON alternatives don't even have frontend-backend compatibility in the same version. Protobuf in java has completely different encoding to normal protobuf, meaning you need TWO protobuf libraries in your backend, and of course javascript protobuf messages don't actually support anywhere near the language set that protobuf itself supports. Those are reasons why calling it protobuf is misleading. The data structures don't mean the same thing in the frontend and the backend.
1) compiled, not interpreted
2) strongly typed (not optional typing according to the google style guide [2])
So yes, there are large javascript applications. In the same sense that KDE is an extremely large C application, or that the linux kernel is written in assembly. Only not really written in javascript.
[1] https://developers.google.com/closure/
[2] http://google-styleguide.googlecode.com/svn/trunk/javascript...
It's true that all of Google's major customer-facing apps use Closure. However, I would not consider it to be a separate language, but rather a large component library and toolchain for developing JS apps at scale. The language is identical to Javascript, and Closure apps can be run uncompiled, they just take up more bytes on the wire and give the programmer weaker error-checking.
It is also very possible to write Closure without the type declarations - I've done it, frequently, for various doodles & easter eggs. They are non-optional according to the styleguide, but that's a style choice mandated for large teams. Typically, type annotations make working with large multi-developer JS apps much easier, but they're unnecessary for smaller one-off projects.
Also, any JS developer off the street can download Closure and use it to write JS apps, since it's open-source. If they want to use Closure Compiler they will probably have to forgo certain language features; I once tried to get JQuery to compile with it and it was basically a total loss. But the language should be completely familiar to anyone accustomed to working with Javascript. (You probably don't want to do this if you just have a small startup, since both the compiler and class library are designed for working with very large-scale apps and pay a large verbosity penalty for keeping things manageable, but it's possible.)
Specifically C is "smaller". Everything in C can be expressed in assembly, but not every piece of assembly code has a matching C code. One hopes that it's mostly the more insane parts of assembly code that can't be translated.
Nobody will argue that C and "text" assembly are the same language. In the same way, I argue that javascript and closure are very, very different. Generally, assuming google actually demands closure apps compile with the toolchain (I'd be astonished if they didn't), these languages are not the same, despite one being valid in the other.
Javascript further clouds this issue by allowing preprocessing steps in the language itself. If you don't take that into account, you could say python is valid javascript. That's not a reasonable claim.
If you have a real one-page (the only way to go responsive) web-app, once you hit a certain level of complexity GWT is the only way to go. Javascript <> Frontend <> middleware <> backend <> database (using the right framework), all statically typechecked. You NEVER get a fieldname wrong. Checking if a call works ? You don't write tests for that, because static typing means it works. Need the same RPC calls to work for an iOS app, an android app, a desktop app, ... ? They can share all the model code (literally, the same lines of code, same bugs, same everything) and only need custom views and controllers (which you'd have to do differently in any language). Backend is simply identical, and java supports secure RPC to all these platforms, all of whom process data in exactly the same way.
Plus : GWT makes dynamically creating user interfaces tolerable, something I still have nightmares of doing in javascript.
But my main complaint is controlling complexity : in javascript, you can forget about it. 500-1k lines of javascript nicely working together really does mean you have a good programmer. You can effectively not load more than 1 javascript library without unwanted interactions (exception being the many Google libraries that do seem to work together, but combine them with jquery and you'll already see surprises). The point where complexity starts exploding is very low. PHP/Perl/Python/C is a little better : you can generally expect a good programmer to be able to get ~10000 lines to work together nicely without very serious problems. Java/C#/C++ allow you to control complexity on a large scale. 100k, 1 mil, 10 million line codebases are possible and (can be) maintainable in those languages. Now keep in mind that sucky programmers suck in any language, I'm talking about good programmers
Yes, angular is really fast to make a tiny form with "standard" functionality. If you think that's going to do anything more than get you a standard app without armies of programmers (like Google has), you're deluding yourself.
Plus let's state the obvious here : people hate javascript for good reason. Good language, considering it was a weekend hack, but horrible language compared to anything else out there. Java, flawed as it is, is massively better than javascript. Also : once GWT frees you from frontend/backend integration and ridiculous testing you won't want to go back, and of course there's the java library ecosystem that is very extensive indeed.