Live data from Hacker News

Ask HN: Your opinion on GWT vs raw JS

news.ycombinator.com

1–10 of 11 posts

Re: Ask HN: Your opinion on GWT vs raw JS

#2
You've left out a third option: using a mature pure-JavaScript library like JQuery, Closure, or YUI.

IMHO that's the best of the options, because you can fall back to pure JS if you need extra flexibility or speed, and yet still don't have to deal with cross-browser bugs.

Re: Ask HN: Your opinion on GWT vs raw JS

#3

You've left out a third option: using a mature pure-JavaScript library like JQuery, Closure, or YUI. IMHO that's the best of the options, because you can fall back to pure JS if you need extra flexibility or speed, and yet still don't have to deal with cross-browser bugs.

ok yes I know about those libraries...I guess what Im asking is why use GWT when such libraries exist?

Re: Ask HN: Your opinion on GWT vs raw JS

#4

You've left out a third option: using a mature pure-JavaScript library like JQuery, Closure, or YUI. IMHO that's the best of the options, because you can fall back to pure JS if you need extra flexibility or speed, and yet still don't have to deal with cross-browser bugs.

ok yes I know about those libraries...I guess what Im asking is why use GWT when such libraries exist?

If you have a piece of algorithmic code that really needs to exist on both the server or the client, and maintaining two versions of it will be too much of a pain. That's why Wave uses it (the Wave team would probably give you other reasons too, I've heard they like it, but that's the only technically defensible one IMNSHO).

If you want to have the same code run on both the server and client, your only options (that I know of) are GWT, server-side JS like Rhino or V8 or Node.js, and Pyjamas. GWT's the most mature of those.

Also, a social reason to use GWT (and perhaps the real reason Wave uses it) is if you know Java and don't want to learn JavaScript. This doesn't hold much water with me - what sort of a programmer wouldn't want to learn a new language? and JS is a pretty nice one all things considered - but it's convincing for lots of other folks.

Re: Ask HN: Your opinion on GWT vs raw JS

#6

Earlier quoted context omitted.

ok yes I know about those libraries...I guess what Im asking is why use GWT when such libraries exist?

If you have a piece of algorithmic code that really needs to exist on both the server or the client, and maintaining two versions of it will be too much of a pain. That's why Wave uses it (the Wave team would probably give you other reasons too, I've heard they like it, but that's the only technically defensible one IMNSHO). If you want to have the same code run on both the server and client, your only options (that…

thanks for the great response

Re: Ask HN: Your opinion on GWT vs raw JS

#7
Disclaimer: I've never used GWT professionally before.

I think its a good idea if your web application is driven by the JS instead of just using it to add interactivity. As in, something like Gmail or wave which are basically "javascript applications" rather than "web applications", if you know what i mean.

JS can get a bit annoying when trying to impose the needed structure to write big applications. That structure is "built-in" when using something like Java.

Also, with a JS-heavy application, you'd need to take care of the different browser quirks(via library or otherwise). Apparently, GWT can take care of this for you.

Having said that, I don't typically like "generated" code. At least not code that I don't generate myself.

Re: Ask HN: Your opinion on GWT vs raw JS

#8

Disclaimer: I've never used GWT professionally before. I think its a good idea if your web application is driven by the JS instead of just using it to add interactivity. As in, something like Gmail or wave which are basically "javascript applications" rather than "web applications", if you know what i mean. JS can get a bit annoying when trying to impose the needed structure to write big applications. That structure…

thanks. what development tools do you use to develop JS applications?

Re: Ask HN: Your opinion on GWT vs raw JS

#9

Disclaimer: I've never used GWT professionally before. I think its a good idea if your web application is driven by the JS instead of just using it to add interactivity. As in, something like Gmail or wave which are basically "javascript applications" rather than "web applications", if you know what i mean. JS can get a bit annoying when trying to impose the needed structure to write big applications. That structure…

thanks. what development tools do you use to develop JS applications?

Oh just the typical stuff. I'm old school so...

Your favourite text editor(I use vim) or you can be a bit more fancy and go with something like Netbeans or Eclipse(although I always go back to an editor). And firebug for debugging.

You can add a bunch of stuff to the mix, but that's all I need really.

(Oh, you might also want to throw in a mini-fier for when you're done.)

Re: Ask HN: Your opinion on GWT vs raw JS

#10
If you use GWT integrate it nicely into your build process. Worked at a place where it was a bit klunky whenever you made a change to the GWT code and subsequently GWT has left a bad taste in my mouth but I think that's probably unfair.

If we'd taken the time, we could have ironed out the klunkiness.

Might be worth building a vertical slice of you app, first with jquery (or another JS library) and then with GWT and see which one suits it better.

Post reply on HN