GWT for Java to AJAX compilation(code.google.com)
code.google.com
GWT for Java to AJAX compilation
http://code.google.com/webtoolkit/
6 comments
I predict that those web applications that weren't possible before will all use straight JavaScript, and GWT will be relegated to the dustbin of ideas that were too early to change the game.
I predict as web applications get increasingly complicated, javascript will be viewed as more of a low-level language which will be compiled down to from higher level abstractions. Not because javascript is a bad language, but because browser fragmentation is so bad. It may not just be Java (in the form of GWT), but other languages as well.
Google has actually been doing this for a while now, even before GWT. Much of the javascript that is used in their apps is generated via compiler in one form or another.
Google has actually been doing this for a while now, even before GWT. Much of the javascript that is used in their apps is generated via compiler in one form or another.
Browser problems really aren't that bad if you use a cross-platform JavaScript library. The core language behaves basically the same in all browsers (except for the trailing-commas issue in IE), it's just the DOM and event-handling models that are a mess.
Those "cross-platform" libraries aren't:
- Faster - Slimmer - Better
compare to GWT.
- Faster - Slimmer - Better
compare to GWT.
GWT applications ARE straight javascript. It's how you create and maintain those humongous javascript applications that is the question. And GWT is a killer answer.
I still don't get it. Why would I want to eschew the fairly okish and dynamic language JavaScript in favor of the big lumbering Java? The other way round I could understand.
Because browsers suck and native javascript behavior is not predictable across platforms.
In GWT the browser is abstracted and you dont worry about it. You write AJAX code and it always works. Firefox, IE, iPhone, whatever.
Writing the code itself is not where the real time investment is with ambitious ajax projects. Its wasted in browser-related quirks and debugging. Being able save this valuable time and focus on building something cool is worth it in my opinion.
Also GWT is just plain faster.
In GWT the browser is abstracted and you dont worry about it. You write AJAX code and it always works. Firefox, IE, iPhone, whatever.
Writing the code itself is not where the real time investment is with ambitious ajax projects. Its wasted in browser-related quirks and debugging. Being able save this valuable time and focus on building something cool is worth it in my opinion.
Also GWT is just plain faster.
"Writing the code itself is not where the real time investment is with ambitious ajax projects. Its wasted in browser-related quirks and debugging."
That has not been my experience. I've found that the vast majority of my JavaScript development time goes to areas that are hassles in any rich UI programming (I was a Swing and then Netbeans developer before I turned to the web):
1.) Forgetting to call a listener or otherwise update UI state.
2.) Finding that the UI really works better if some faraway component auto-updates its state when you change this menu item, and having to plumb the update through the whole app.
3.) Working out corner cases when the user selects some combination of options that's so crazy you didn't think anyone could possibly choose it.
I usually do all my development in Firefox and then set aside a week or so to port to IE, which I know everybody says is a terrible development practice, but it's worked on multiple projects for me. I just memorize all the areas where I'm likely to have problems, and avoid them. I usually find that well ofter 60% of the bugs are trailing commas anyway - the event-handling and DOM differences are taken care of by JQuery, and there really are not that many other core language differences.
That has not been my experience. I've found that the vast majority of my JavaScript development time goes to areas that are hassles in any rich UI programming (I was a Swing and then Netbeans developer before I turned to the web):
1.) Forgetting to call a listener or otherwise update UI state.
2.) Finding that the UI really works better if some faraway component auto-updates its state when you change this menu item, and having to plumb the update through the whole app.
3.) Working out corner cases when the user selects some combination of options that's so crazy you didn't think anyone could possibly choose it.
I usually do all my development in Firefox and then set aside a week or so to port to IE, which I know everybody says is a terrible development practice, but it's worked on multiple projects for me. I just memorize all the areas where I'm likely to have problems, and avoid them. I usually find that well ofter 60% of the bugs are trailing commas anyway - the event-handling and DOM differences are taken care of by JQuery, and there really are not that many other core language differences.
JavaScript is mostly the same across platforms, the difference is in the DOM and CSS support. This can be encapsulated in libraries like JQuery.
GWT solves a different (perceived) problem - the lack of classes, inheritance, packages and static type checking in the core language - which is orthogonal to the platform differences.
GWT solves a different (perceived) problem - the lack of classes, inheritance, packages and static type checking in the core language - which is orthogonal to the platform differences.
Yes, but abstracted away to Java?
Ok, I see you have a point and that does seem like a good idea. The choice of language just seems crazy.
Ok, I see you have a point and that does seem like a good idea. The choice of language just seems crazy.
Allow me to plug my own project: http://www.ecmascript4.com/
Translates ECMAScript 4 to classic JavaScript. This brings type checking, classes, namespaces etc. to JavaScript, however it is still backwards compatible with classic JavaScript, so you can port gradually and integrate with existing JavaScript libraries. Best of both worlds!
I was afraid of that...
I'm trying to get into web developement; I've been deep in compilers and local apps for too long :(
I'm trying to get into web developement; I've been deep in compilers and local apps for too long :(
I don't think it's bad to want to abstract away the low-levels of client-side JavaScript, but you might want to start with JavaScript first to know what and why you are abstracting away.
There's a good introduction in the form of lectures from Douglas Crockford. I watched them recently and they were informative and interesting.
http://www.catonmat.net/blog/learning-javascript-programming...
There's a good introduction in the form of lectures from Douglas Crockford. I watched them recently and they were informative and interesting.
http://www.catonmat.net/blog/learning-javascript-programming...
Yeah, you're probably right ;)
I'll take a look at the learning-javascript-stuffs, thanks
I'll take a look at the learning-javascript-stuffs, thanks
um, you're about 3 years late on this "news"
You were using GWT 3 years ago? Do you work at Google or something?
This wouldnt have been a valid claim until very recently, like GWT 1.5 so not really old news. GWT 1.5 compiled javascript is super fast relative to older versions.
This wouldnt have been a valid claim until very recently, like GWT 1.5 so not really old news. GWT 1.5 compiled javascript is super fast relative to older versions.
Why convert the Java app into a browser-based AJAX form when you can launch the application using Java Web Start?
I predict that soonish we'll begin seeing web applications that weren't possible before, and this will force a big shift into GWT or a GWT like web application development paradigm.