Live data from Hacker News

GWT just got a new look

gwtproject.org

51–60 of 70 posts

Re: GWT just got a new look

#51
post #42

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 fin…

You are looking for ... PHP!

I'm looking for a solution that allows database access from the client (the browser) directly. As far as I know, you can't run PHP on the client (at least efficiently).

Re: GWT just got a new look

#52
post #42

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 fin…

Since there are a million "what is GWT" questions, let me give a thorough answer :

If you have any question with "javascript" anywhere in there GWT is not the answer, unless it's "how can I avoid javascript alltogether ?" (a common question for me and a lot of others).

GWT is a crosscompiler, RPC generator and UI toolkit. That means :

1) Crosscompiler: all code is in Java (and you can pick what code runs client-side). You write browser applications in Java, instead of Javascript. It's not emulated. The client-side javascript is not large (like asm.js stuff), doesn't require plugin downloads that don't work on half the platforms (flash, ms stuff, ...), it's not limited (like most of the javascript frameworks that are advised here that won't work for graphs in canvas ...), ...

TLDR: it's cross-platform, resulting application can work on all browsers, and everything else (e.g. native Android/iOS/Windows/...) (even IE6 if you really want).

2) RPC generator: you can call server-side methods that are also in Java. You can call them as if they are local methods, except that they can execute asynchronously and they can fail with network-related exceptions. This means you don't do it yourself, meaning no work and no errors.

This means that using any java-accessible code on the server in your in-browser applications is trivial.

3) A powerful desktop-like UI toolkit that works well. GWT is "Delphi/Visual Basic/Visual C++/..." with Java as the backing language on the web. https://www.youtube.com/watch?v=kV5H3rGfqOE

4) It's java. The same code works on Android, works on iOS, works in Windows, works on linux native, works on ... and works in the web browser (though you'll have to use different UI toolkits. But in a well-designed application, MVC, only the V needs to be platform-specific).

5) Because reusable code is actually possible in this UI toolkit, you find graphing libraries/controls/... that work well within the toolkit and that work together and you can usually get support for (e.g. Vaadin).

Making client-side Models and Controllers that work on all platforms is very easy (with a little discipline). Making sure that code stays in sync across all platforms is trivial (java is statically typed. Add a new field, and forget to add it on one platform, boom, compile fails).

The big disadvantages :

The big one : Java is a language that is made primarily to allow you to manage complexity in large applications. There is a lot of "default" complexity and lots and lots of tools to manage and refactor large codebases. Java itself is a static language with access controls and many tools to help you. That means that GWT-Java based applications can be a LOT larger than anything you'll ever write in Javascript. This also means that this is meant for large applications. You will find it less helpful for small applications.

You can't use javascript frameworks easily (but it's possible).

It's possible to not use the UI toolkit, but it requires lots of inside knowledge.

You have no easy control over the generated javascript (again, possible, but if you don't know compilers, you may want to avoid this).

You have very indirect control over the DOM elements in your web page. If this is important to you, life's gonna suck.

It's java, not many people would call this their favorite language.

Re: GWT just got a new look

#53
post #3

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 comp…

When I see a landing page like this, I feel that this is their filter. If you are interested in knowing more, you will seek the answers. Otherwise, you will move on to the next HN post... The ones that seek to know more are the ones they want to engage. Only my speculation.

How would you be interested in something you don't even know what it is for? Good descriptions is what generates interest.

Re: GWT just got a new look

#54

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.

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

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.

Re: GWT just got a new look

#56
post #50

Earlier quoted context omitted.

Take a look at https://www.meteor.com

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…

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.

Re: GWT just got a new look

#59

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 advantag…

> * 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 ar…

> and you still need a CSS expert.

Like any decent project.

Re: GWT just got a new look

#60

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.

"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...

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

Post reply on HN