Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I haven't been working with Java for a long time, and I found GWT to be interesting plus a chance to learn and practice Java. My goal for this year is to learn JavaScript. I'm very interested in HTML5, browser extensions and other cool stuff that JavaScript can do. I think I'm more interested in this than Java at the moment (that's not to say I dislike or would discontinue working with Java) but I would like advice as to whether it's a good idea to proceed with learning GWT (given my interest in JavaScript) or to spend my time learning other Java technology.

Thank you.

share|improve this question
1  
I wouldn't bother with GWT if you want to learn javascript - GWT aims to avoid using js I think. –  Alison Mar 2 '11 at 23:18
    
As mentioned a few times, java =/= javascript. They are totally different languages (just looking at variables and runtime environment is proof enough) and are very rarely used together. –  Trezoid Mar 3 '11 at 1:50
add comment

4 Answers 4

Learning Java isn't all that helpful for learning Javascript. Despite having similar names. they're very different languages with different purposes.

If you want to learn Javascript, I suggest just doing that. There are various tutorials and books that can help you out, for example here and here.

share|improve this answer
add comment

I've been developing in GWT for about the past 8 weeks or so, and I can say that I have not seen one ounce of Javascript in the process.

The whole point of GWT is to remove the programmer from the Javascript, as GWT custom compiles you Java code into Javascript (that you will rarely, if ever, see).

Learning Javascript will require time and effort outside of frameworks such as GWT, or even Jquery or Mootools.

share|improve this answer
add comment

GWT is just a way of avoiding JavaScript, and that is its main purpose, to write front-end code in Java. Honestly, I just don't see the point if your server is not application (i.e., the one running in your server) it's written in Java. As a concept is very interesting and it could offer some extra performance against poorly written JavaScript.

But if you truly want to learn JavaScript (and you should want), avoid this tool because you are going to see any JavaScript, since the generated JavaScript is not even legible. Anyway, in the future it is much more likely that you are going to work with JavaScript than GWT, so you should know at least the basis of JavaScript.

My advice is starting from the very beginning to learn the language itself, then the DOM and other basic things like AJAX. You can take a book to learn them, but I think the most solid option is directly the Mozilla Developer Center (MDN). It has really good documentation, and the best place to start is from this guide.

Then, you may consider doing real things ;) For that, a JavaScript framework is practically required. I recommend you jQuery because it is very popular, quick and sexy. My choice could be also MooTools, because you can actually write code in a reusable and sane way (unlike jQuery) and it is very Object Oriented, but I don't know if it is really the best option to someone that is starting.

share|improve this answer
add comment

To me, using GWT to produce Javascript is like using a pack of dogs to pull a car. Why would I want to write 10 lines of Java, then compile and deploy a .class file, instead of writing two lines of Javascript that I can test instantaneously?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.