Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I've learned jQuery, should I go back and learn "proper javascript"?

I'm primarily a server side developer, working professionally with PHP. For javascript I always use a framework (jQuery/mootools), will this be a professional disadvantage for me down the line? Should I put the time in to learning straight javascript, or are most developers moving over to frameworks anyway?

Thanks.

like image 693
Bala Clark Avatar asked Oct 02 '09 14:10

Bala Clark


People also ask

Should I learn jQuery instead of JavaScript?

Javascript can be harder to learn and seem more challenging up front. That's why, as a teacher, I often recommend starting with jQuery — because you'll also be learning Javascript fundamentals along the way!

Is it worth to learn jQuery in 2020?

In my opinion jQuery should not be used any more in new projects that only target modern browsers, and of course if your project relies on it for some particular reason, or just because you use plugins or other code that needs jQuery, definitely keep using it.

Is jQuery still worth learning?

It's good to know jQuery and there are still use cases for it. However, you should not spend a lot of time learning it. jQuery should not be your focus this year. The biggest advantage of jQuery now is that you can manipulate the DOM with less code.

Is 3 months enough to learn JavaScript?

However, unlike CSS and HTML, JavaScript is not something that can be aced in just two weeks. But, it can be done in just three months! Most employers will be happy to hire you as their web developers if you just master some of the JavaScript basics. Of course, learning never stops.


13 Answers

It depends. If you're asking about DOM manipulation, it has many quirks and inconsistencies across browsers. While it can be good to know these, most of the time you're shielded from having to worry about them by your framework. Learning everything on your own is rewarding, but difficult.

As to everything besides that in straight JS, such as closures, private functions, object syntax, prototypes, etc., you should definitely learn these, as they are just as applicable within a framework as without it. At the root, you are still coding in JS, just with the assistance of a framework for some common tasks.

like image 196
Adam Bellaire Avatar answered Oct 05 '22 02:10

Adam Bellaire


No.

The move to frameworks is driven by years of frustration over the browser-dependencies and sheer dislike for many of the original decisions made in the design of Javascript. Note that you are still working in Javascript though so it isn't really fair to say "learn Javascript" so much as "explore the areas of Javascript now handled by JQuery."

With respect to your attractiveness to a prospective employer, I'm pretty certain that JQuery would be a better skill to list on a resume than Javascript (I know it would in our shop). If you think about it, employers who care enough to do good client-side development will expect prospective employees to have experience with tools like JQuery. Those who don't care as much about client-side development simply won't make client-side skills - including Javascript - a priority. Indeed, if you are going to spend your time learning more about the client side, I'd recommend learning another client-side framework (e.g. YUI or Ext). Not only will it make you more valuable, it will almost certainly require a certain degree of exposure to more of Javascript's idioms due to differences in the frameworks.

Update - Rohan makes a good point about learning Javascript: that it may help you code more efficiently and effectively in JQuery. I agree in the abstract but I would personally be a bit hesitant to put too much effort in this area. As a long (long) time developer, I've learned to be very focused on the payoff from investments of time and effort. There is much to learn in the world, and only so much time to learn it. The time I spent learning how to write ISAPI dlls, for example, has paid very little compared to the investment.

Update 2 - A few people are making the argument that JQuery is slower than raw Javascript. Is anything ever new? This same argument about "raw" development versus frameworks has been going on for decades!

In this case it is especially perplexing, though. In my experience, people who adopt a client-side framework actually end up delivering client-side functionality. Those that don't tend to get locked into server-side solutions because of the inherent difficulty of handling DOM incompatibilities across browsers, Javascript idiosyncrasies, etc. Thus, recommending Javascript "for speed" misses the whole dynamic where a pure Javascript site is very likely to be slower because developers end up falling back on Server-side code just to stay productive.

like image 23
Mark Brittingham Avatar answered Oct 05 '22 01:10

Mark Brittingham


Yes.

More often than not jQuery is slower at performing tasks. If you know how to do it in plain JS you can come back and optimize the slower parts of your page.

like image 32
ChaosPandion Avatar answered Oct 05 '22 02:10

ChaosPandion


actually, yes. After a few years of jQuery, it's good to learn JS so that you know whats going on behind the abstraction layer that jQuery sets up. It will help you work better with jQuery or any other framework you might move to.. also it'll help you modify those frameworks if such a need ever arises.

like image 42
Rohan Prabhu Avatar answered Oct 05 '22 01:10

Rohan Prabhu


Not where it overlaps

You already need to know some "pure" javascript for things like string and array manipulation, right? Beefing up on that stuff could be good.

And there may be specific cases - like making bookmarklets - where knowing how to find a DOM element with straight JS would be useful.

But for most production code, a good JS framework is so much better that I think using pure JS is silly.

Learn what you can actually use, but if it's purely academic, I'd say spend that time learning another, truly relevant, skill.

like image 34
Nathan Long Avatar answered Oct 05 '22 01:10

Nathan Long


This is not specific to Javascript, but learning lower level concepts can often help when writing higher level code. It's about learning the whys as well as the hows.

So if you have the time and motivation, I'd recommend it.

like image 34
Colin Pickard Avatar answered Oct 05 '22 01:10

Colin Pickard


I think not knowing it can definitely be a professional disadvantage down the line. For example, I had a job where we used jQuery exclusively, and when I recently moved to a new job, they use YUI exclusively. If I didn't know "raw' JavaScript, I would have a much harder time picking up a new framework.

like image 40
GSto Avatar answered Oct 05 '22 01:10

GSto


Unless you want to make JS a core competency, I think you're good.

like image 22
Ian Robinson Avatar answered Oct 05 '22 02:10

Ian Robinson


I'm pretty much in the "don't bother until necessary" camp. In fact i consider it a kind of premature optimization to dive in the underlying language if not necessary. While you may indeed need to squeeze every millisecond out of a script, as long as it's usable i would say don't bother.

Even then, jQuery lets you wiggle for room with selector optimization and stuff like that.

Of course that could be me talking from the pain inflicted by "proper" javascript all those years before those wonderful frameworks :)

like image 37
samy Avatar answered Oct 05 '22 00:10

samy


Unless you plan on being a JavaScript guru, I'd say no, there are better things your time could be spent learning.

like image 42
JonoW Avatar answered Oct 05 '22 01:10

JonoW


For javascript I always use a framework (jQuery/mootools), will this be a professional disadvantage for me down the line?

Probably not a disadvantage. You are simply standing on the shoulders of other libraries to get your work done. The only possible downside, is keeping your learned skills current as new versions come out, knowing version X that you learnt may well be out-of-date.

Should I put the time in to learning straight javascript, or are most developers moving over to frameworks anyway?

I'd say every JS developer is using some library or other, but they should still know the language they are using. A library/framework is just that, a library of code built upon the language. You still need to know the ins and outs of the language. For example, do you know what the difference is between == and === ?

Also, if there is a problem with the library you are using and you need to dig into it, wouldnt knowing the language help?

If you have the time I'd highly recommend something like this, a video from Douglas Crockford on Javascript.

like image 22
Steve Casey Avatar answered Oct 05 '22 00:10

Steve Casey


It's a good thing to know how to program well in JavaScript, because knowing jQuery won't protect you from writing insecure and inefficient code. It will just give you some tools to speed up your coding.

like image 24
RaYell Avatar answered Oct 05 '22 01:10

RaYell


IMO, you've already answered this question by saying "I'm a server-side developer." Do you want to do front end code as well? If so, learning JavaScript (and a framework) will make you stand out. Personally, I think it makes you a stronger developer if have a basic understanding of the opposite area you're working on - you can make better assumptions and coding calls when working on a group project when you understand what the front-end guys are working with (or possibly suggest a solution for them to run with).

Like everyone says - it depends on your long-term goals and what kind of developer you want to be seen as.

like image 24
keif Avatar answered Oct 05 '22 00:10

keif