views:

847

answers:

9

Now that frameworks like GWT, Morfik etc exist which compile Java client side code into major JavaScript dialects, is it still worth learning JavaScript?

+47  A: 

In my book, yes.

I'm a strong believer in understanding the underlying technology beneath whatever toolkits you're using.

Abstractions are leaky - you'll run into trouble down the line if you try to get away with only understanding a high-level toolkit, and not the underlying technology. Sooner or later you'll need to debug your project at the JavaScript (or whatever) level.

RichieHindle
Not really worth it's own answer, so put here. If you use one of the Java->Javascript converters, you lose a lot of javascript features such as dynamic typing, and the ability to use functions as proper objects.I don't really see why people look at javascript as a low level language. Combined with frameworks (written in javascript) such as jQuery, it's a easy to use and powerful language.
Macha
@Macha: Well said. JS in it's own right is extremely powerful (and very different from Java). Why cover it up with abstractions?
Rake36
Agreed. Using stuff like Gwt without knowing JS is like using some database tool without knowing SQL. While that may work, you're going to get better results if you actually know what's going on.
Jani Hartikainen
+11  A: 

Understanding the technology behind your framework reduces the time spending on debugging the things you do with your framework. so in my opinion it's always good to know whats going on behind the scene.

Chris
+2  A: 

Stretching this further...

Should you learn assembly language nowaday with so many higher level languages?
Should you learn how to do basic arithmetic like subtraction and addition by hand when now we have calculator and computer that can do this for you?

Well, I'd say maybe you won't need to if you don't have any reason to go deep down, but someone will have to still.

As with all things, there is a balance. Know that it will be to your disadvantage if you don't know the lower level stuffs, but sometimes it is necessary to skip it so you can be deep in something else. You have to admit there are so much technology out there that you won't be able to be an expert in all things. In that case, knowing someone else who does is a good thing.

So pick your choice and go with what interest you. If you think you are interested in learning JavaScript go for it. If not, you can stick to your level of abstraction and get a JavaScript buddy that can help you when you are stuck.

Jimmy Chandra
+8  A: 

Yes,

...and I speak with experience: I've never learned javascript and only used parts of it, when I encountered it in google searches for questions.

Now that I'm building a Web application, I notice that not all abstractions away from javascript have the desired functionality, and I need to go into javascript to solve it.

I notice that I miss the fundamental knowledge I have with other languages, just like I miss the 'javascript programming language' book (I'm not sure it exists but I have similar copies for C, C++ and Java). So today I ordered Javascript:The good parts and I will learn it...

Roalt
Andreas Grech
I would suggest cross-referencing the two; for the language features that Crockford leaves out of The Good Parts, I wouldn't spend too much time studying them while reading The Definitive Guide. You may eventually need to understand those features, but part of Crockford's point is that a bunch of things in the Javascript language were poorly designed and really shouldn't be there. I've found that, for the most part, I've agreed with him. (I also learned a fair amount from him.)
DougWebb
Dreas: Thanks for the tip, I will get the book soon so I will see if I still miss some fundamentals. Note that I've learned already a lot of different languages, so I will probably understand more of it that a full beginner.
Roalt
+2  A: 

I think the reality of browser bugs will make being able to diagnose and understand the generated JavaScript necessary for a long time. I worked with a Spreadsheet company for OS/2, and they had to read the generated assembler from the C++ code because the IBM compiler would generate buggy machine code at times. So while they may not have known enough Assembler to write a whole project in it, they certainly had to know enough to track down problems.

That being said, there are also many web frameworks that require you to code your own javascript, and a given toolkit won't necessarily do everything that you need to do without directly writing some javascript. You can choose frameworks that avoid it if you prefer, but it isn't at all obvious that, unlike say Assembler for application development, the Web development community has decided to abstract away any involvement with it. You may well end up on projects that need it.

Yishai
+7  A: 

ABSOLUTELY. In my opinion, abstraction is important, but knowing how that abstraction works is equally as important.

I've seen developers who live and die by their frameworks (javascript: jquery, yui, etc... or php: zend, cake, etc...), but have no clue how to do anything productive without them.

Who would you rather be (or hire)? The guy who knows how everything works, but improves his productivity by using frameworks and libraries... or the guy who uses these resources with no idea how they actually work?

Mike
+1  A: 

Actually, drawing a parallel to assembly language is a bit missing the point. Assembly was platform specific and the move to C enabled a certain level of platform agnosticism, allowing the developer to be more productive on multiple platforms. Hence, there was a real productivity effect.

Learning all your rich web chops on something like GWT is more limiting. It is, after all, based on Java, and the web is way larger in scope than just Java. You'd be seriously limiting yourself if all you know is GWT but not the inner workings of the generated Javascript (Can't comment on Morfik as I don't know it).

However, employing something like JQuery in order to be more productive when coding Javascript is much better. JQuery can be used on any browser running on any OS, so it doesn't limit you.

feicipet
A: 

I'd say yes. I've met people who claimed to know javascript, when all they could do is do a couple of jquery function calls. Javascript (ECMAscript) is a beatiful little (ok, not so little) language.

Abstracting a bit from javascript - define "worth learning". This kind of thinking was always a conundrum to me. Are you, per chance, afraid of learning something new?

I guess, this kind of thinking is what really separates a coder from a programmer.

shylent
+1  A: 

A web developer who does not know Javascript is like an auto mechanic who does not know how to change a tire.

Josh Stodola