Do javascript developers need to know jquery? - javascript

If you were to hire a javascript developer would you expect them to know jquery?
I just started using stack overflow this week and knew that jquery led the pack, but didn't realize the extent of it until I noticed that MooTools (my favorite) has 59 questions while jquery has over 4000. (of course, a good statistician could attribute jquery having more questions to it's usability, rather than it's popularity--but we know that's false)
And then I started noticing that many people post questions with the tag "javascript" but not "jquery" when every line of their code is jquery--like it's the de facto javascript 2.0, or that they don't even realize they aren't writing "javascript" but rather jquery.
Anyway, I ask this because I've always been freelance and could use whatever framework I want on a project. But lately I've been recommended to be the front-end developer for a couple companies. I want a feel for the community's expectations to know if I should put some other personal projects on hold to pick up jquery before exploring the positions that might be offered.

No. I'd expect them to know how JS works. A good JS developer will pick up jQuery in less than a week, probably a few hours.
A developer who knows jQuery but doesn't know JS has a great deal to learn and would only be considered for the most junior roles.
jQuery is definitely not JS2.0 - it's a great standardisation framework if you still need to target IE8 and the like, but it's not great at mobile, it can't be loaded with async or defer, it doesn't support newer features like passive events, and its primary optimisations are about finding elements in an already built DOM (which means it doesn't add much value for client side DOM builders).
I would expect them to have heard of it, and be able to talk about its strengths and weaknesses against other frameworks.

They should at least know what JQuery is, and be able to tell why they chose it or another framework. Next to that, a basic understanding of the most popular javascript framework can never hurt.

I started off when I came across mootools and have not looked back since. But recently, I have spent a fair amount of time polishing my 'vanilla' javascript and have also started looking at jquery (out of sheer curiosity ). Turns out, you need to understand a lot about the frameworks, the differences between them and how javascript works if you want to be able to translate your skills and be able to refactor code between them freely.
for example, consider this as the logical code refactoring between the 2 frameworks
mootools
$("elementId").addEvent("click", function() {
this.setStyles({
border: "1px solid #000"
});
});
jquery
$("elementId").click(function() {
this.css({
border: "1px solid #000"
}); // fails.
});
I was surprised to discover jquery did not work - and then considered that mootools extends the elements' prototypes by adding .setStyles whereas jquery is function based. the fix is obviously to use $(this).css instead - only it's not that obvious at first. It made me realise it would take more than reading the interface docs to be able to swap between the two.
as somebody said, it would take a week to pickup on all of the nuances of jquery even if you have a strong-ish javascript/mootools (or other framework) background, but it won't be such a challenge. moving from jquery over to mootools, however - won't be such an easy task if you are not well versed in vanilla javascript and OOP.
the short answer is, I wouldn't expect a javascript programmer to just know jquery but I'd expect a jquery user to learn about javascript.

JQuery is a very important part of javascript development these days, so yes I would expect a JS developer to know how to use it even if its just the basics.
One of the reasons that it has suddenly gained momentum in the business app development arena is that Microsoft have given it their backing and have agreed to have it distributed with their latest web frameworks (See ASP.NET MVC).

It all depends on what they were developing.
If the web application extensively used ajax, which you could argue it should if possible) then JQuery is a excellent way of doing this. JQuery reduces development times over solely javascript.
Bottom line, if it was me doing the recommending Yes, know both

I would expect JavaScript developer to know jQuery because it's famous for a reason.

I wouldn't expect them to know jQuery, if they could use it, then it'd be better, since I prefer jQuery to all of the rest. It is possible that he/she has their own preference over jQuery, as many people do.

Jquery is pretty popular these days. It make development much more efficient and easy. And there are tons of plugins and scripts available to choose.

Related

Is there a jQuery alternative for building faster web sites

We are about to commence a redesign of our site and are exploring all options in improving performance. The site is fairly heavy in javascript loaded adverts, therefore we need to be really lean with the javascript we use.
Do any of you have any experience of lighter frameworks or more efficient frameworks that I could explore? Or any resources that you could point me toward? YUI looks like an interesting concept … has the loader being tested in anger? ANy good?
Any thoughts would be appreciated.
Cheers.
edit: Sorry, I wasn't clear. The sites performance currently is pretty good, we are not redesigning due to performance issues, it is due to a rebrand. We just wanted to take the opportunity to review best practices.
jQuery 1.4.2 is lean and mean. You'll be hard pressed finding something faster or more lightweight.
As an example, here is a framework test called slickspeed from mootools. It tests a framework's ability at finding elements in the DOM. The version of jQuery being tested is 1.2.6. Depending on your browser, jQuery performs exceptionally well. In my Chrome browser, jQuery beat all the others with a total time of 20 milliseconds.
And since version 1.2, jQuery has had astounding improvements in optimization and speed, especially with 1.4.
That said, a framework isn't going to make you code better. You can write some seriously slow scripts using any framework, including jQuery.
If, however, you write optimized code, jQuery can be so fast you don't even notice.
Pointy's comment above is spot on. All these guys do all day is worry about how to perform better. So it's pretty optimized.
addendum
This is from jQuery's blog:
While comprehensive benchmarks like Taskspeed can be interesting if deconstructed into individual sub-tests for further study, as a project we tend to stay away from using them as an accurate measure of true, overall, library performance. Considering how many aspects make up a library, not to mention the different techniques that they offer, cumulative results rarely reflect how an actual user may use a library.
So take that as you will.
I prefer YUI3 for larger apps and just about anywhere that 'load on demand' can offer benefits :)
I agree that slowdowns mostly stem from how you implement your app, which is one of the benefits, imho, of YUI, it lends itself naturally towards more modular implementations.
Using the yui loader to bring in page elements widget style allows for good code reuse (and caching) as well letting the user see 'something' quicker.
It won't really solve your JS ad issues though, for that, the best thing you can do is load it as near the bottom of the page as possible, and perhaps look at what loading options the adservers have.
Re: Stephen's comment
Well, raw speed for tight loops are sometimes meaningful, sometimes not. There is also the issue of the implementations used for the comparison, the YUI3 code posted in Ejohns version looks positively gimped compared to the jQuery code, look fx at the first one. Where jQuery adds almost the complete DOM element from a string while YUI3 is going thru all kinds of hoops, relatively speaking.
For a version that is written by someone who knows YUI3 have a look at http://yuilibrary.com/~msweeney/yui-tests/taskspeed/ the newest jquery isn't represented, but it does have YUI3 as ~4 times faster overall than jquery 1.3.2 in my Chrome.
Update
http://www.yuiblog.com/blog/2010/10/27/jquery-and-yui-3-a-tale-of-two-javascript-libraries/ a jquery users experience of yui3.
Probably the best place to start off is not to ask what frameworks can help but why your current site has bad performance. I would start off with tools like Yahoo's YSlow and also Dynatrace ajax edition. Dynatrace is nice because it will point out javascript/dom manip stuff that make your pages slow. You will want to use more than just two performance tools though since they all pretty much have their own idea's on what makes a page fast. Once you have that down then I would come into a forum and state that your having performance issues with X and what can I do to fix.
vapor.js is the world's smallest and fastest javascript library
http://vaporjs.com/
I think you should have a look at zepto.js
http://zeptojs.com/
this article gives you some advices for porting your jquery code
http://blog.pamelafox.org/2012/03/porting-jquery-plugins-to-zepto-tips.html
jQuery is plenty lightweight if coded properly. It sounds like which framework you are using is not the problem, but either a) why the javascript your writing is performing slowly, or b) why you are using so many slow loading ads to begin with.
But if you really want to look into other frameworks, here's a handy comparison chart: Comparison of JavaScript Frameworks
I just wrote an internal app for our company using jquery and jquery UI (http://jqueryui.com/), mixed in with c#. I found it to be extremely lean and fast - no problems whatsoever.
the jquery ui makes it easy to theme the website...
and by adding other components like blockui, jgrowl, etc you should be able to do anything you want!
Sprint is a tiny, fast alternative.
Check out the repo for benchmarks on a few functions, compared with recent versions of jQuery and Zepto.

Can I learn how to use jQuery with just a basic JavaScript experience?

The question is: Is it bad to learn how to do special effects, table sorting, etc, using jQuery instead of learning the bits of code that bring that alive with pure javascript?
I have previously addressed a similar problem in a question, but I missed adding this extra inquiry!
Yes you can. Doing it in JQuery isn't bad. Everyone uses some sort of Javascript library. I love JQuery. Your odds of making things that work in all browsers go up quite a bit, you get the UI done quicker, etc.
Though having a bit of Javascript knowledge is good, because when things go wrong you want to be able to debug the problem.
JQuery.com has lots of good tutorials.
You really should use jQuery; it will allow you to spend more time adding features instead of trying to make your code work in every browser (Note that even jQuery is not a silver bullet; you'll still have some cross-browser headaches in any non-trivial web app, especially if you need to support IE6).
There's no point in turning your back on new tools and libraries just to "stay close to the metal".
If you're afraid of lowering your value in your boss' eyes, look at it a different way. Would you prefer to hire a programmer who spends all of his time working around browser bugs, or a programmer who uses jQuery and finishes his projects faster because of it? Remember that managers are trying to ship products and make money, not simply hire elite programmers.
Personally I was recommended to learn JS before learning jQuery. But started off with jQuery, and can make pretty much with it without to much JS experience. What you do need to know of JS you can just google it and learn it when needed ;)
jQuery is fantastic for us that doesn't take the time to learn everything about JS
Personally, until the beginning of this year, I used to limit my use of javascript to only helping aid the user with things like web forms.
However, after playing around with jQuery for no more than a few days, I realised how much easier it made achieving javascript effects and functionality. Now I pretty much use jQuery on most web pages, a lot of the time, just to add nicer UI effects.
A background knowledge of raw javascript will never go amiss and you will almost certainly still have to mix it in with your jQuery scripts, but when you run into troubles, nearly every problem I've had, had a solution already posted on Stack Overflow or just on Google.
Not a very technical answer, but as an intermediate programmer, and javascript newbie I've had no problems learning to work with jQuery. The documentation and community are very helpful.
I think you should set yourself a goal of knowing javascript well enough to be able to author a plugin if you need it in your favorite framework. While using a framework is almost always the right way to go, there will be times when you can't find a plugin that does exactly what you need. At that point you need to know javascript well enough to be able to adapt a plugin to your needs or write your own.

Is it worth it to use jQuery for Ajax instead of building your own JavaScript?

Aside from the framework, is jQuery worth using rather than creating your own javascript? I've always debated if the framework was better to use than to create your own calls. Are their disadvantages of using it?
Sorry for beginner question, I'm trying to feel out if it would be better to use this and create some of the ajaxish workings of my site rather than develop it from scratch.
Are there other frameworks out there that would be better to use to create an ajaxish website?
Yes, jQuery is worth it. I speak as someone who resisted using any library for a long time, then finally saw the light.
I do recommend that you build some hand-rolled Ajax interactions before you dive into using jQuery for Ajax, so that you understand exactly what is happening with Ajax. Once that's achieved, though, let the library do the dirty work.
jQuery (and most other framework) are for making difficult things simple. It keeps you from having to write cross-browser compatabile code. It keeps you from having to write recursive methods to update multiple dom-elements. It basically cuts your development time down substantially, and saves you a lot of frustration.
Stackoverflow Archive:
Which Javascript framework (jQuery vs Dojo vs … )?
Great discussion (with lots of involvement) over various javascript frameworks. It will benefit you to browse this in depth, or even at a cursory level.
When should I use a javascript framework library?
Which Javascript Framework is the simplest and most powerful?
What JavaScript library would you choose for a new project and why?
Which Javascript Ajax Framework is most powerful and very lightweight?
Which javascript framework can be used for all browsers?
If you like reinventing the wheel, write your own. For me, I prefer to spend my time focusing on solutions rather than lines and lines of javascript code. I'll use JQuery to save resources and frustration
One thing I want to add is for the past couple of months, I was trying to fill a web developer position for my team, and it proved to be a difficult task.
Lots of folks knew how to use a JS framework (JQuery, ExtJS, YUI...), but once outside of the framework, they found themselves in an unfamiliar ground. I had a self-claimed senior JS developer with over 10 years of experience couldn't tell me how to use function.call() or function.apply() or how to implement simple inheritance in JavaScript.
Framework is great and definitely useful, but you will also want to make sure to know how to implement the basic OO concept and DOM manipulation without the framework.
BTW, we use ExtJS and if you are starting to pick a JS framework, you may want to look around to see which one suits you the most.
jQuery is a big project with many users. By that nature, it will be better tested than anything you write by yourself.
It is a great framework for most uses I've come to need.
Is there anything in particular you are trying to do?
jQuery helps you avoid worrying too much about cross-browser JavaScript issues, and helps you get things done quickly. As far as I'm concerned, the key reason for using it vs your own hand-rolled JavaScript probably is the "don't re-invent the wheel" cliché.
Apart from added productivity, JQuery's main plus is that it takes all (most) of the pain out of cross-browser testing.
There is no reason you cannot write your own code and splash in JQuery where needed. JQuery is incredibly lightweight for what it provides and you will quickly find that you can do most takes easier in JQuery (especially once you start using the plugins for it) than by hand. I am a big believer in not reinventing the wheel. The JQuery code is tested by tons of people and there are so many plugins to chose from I could almost guarantee that what I want to do has already been done before.
If you are starting with a clean site, now is the perfect time to take JQuery for a spin though, because if you do get hooked on it your code will be more consistent if you solve similar tasks using the same technique. Go give it a try :)
I would highly recommend using jQuery (or any comparable framework) over straight JavaScript. It just makes common programming tasks easier, most notably cross-browser development.
jquery makes js related work easier and more important standardised/compliant.
If you need re-assurance as to its use:
MS & Nokia are bundling it in their dev platforms.
Its compatible with many of the newest web technologies.
It has a large developer community supporting it.
There are many plug-ins available to aid RAD.
and more...
Give it a go!!
Definutly! Jquery wil save you a lot of time struggling over code and makes your code easier to read to non-experts.

Learning Javascript vs. jQuery

I got the Wrox.Beginning.JavaScript.3rd.Edition and wanted to start learning it from scratch, then my boss came along and said that why bother, learn jQuery.
Can I understand jQuery and work with it although I am a newbie and have limited knowledge in ASP.net, vb.net, some C#, and basic HTML?!
jQuery is javascript. I think you're on the right path. Learn javascript well and you'll be able to make better use of jQuery.
So what's your question? JQuery is a framework built on the top of a language JavaScript. To use JQuery confidently, you should get familiar with JavaScript. JQuery contains a bunch of useful patterns and utils that mask the incompatibilities of the browsers. Using a JavaScript framework make sense as it allows you to focus on your problem instead of the problem of the JavaScript implementations of the browsers.
For further details on JavaScript frameworks, see SO question »Which Javascript framework (jQuery vs Dojo vs … )?«. For learning JavaScript, learn the good parts.
if all your manager is asking from you is to show and hide some elements, or fade in and out a couple of images, or request some data via ajax and display it then learning jquery and its api is perhaps all that you need.
but if you (or your manager) are concerned about performance, maintainability, code reuse and generally understanding what the *ell is going on 'back there' then learning the language itself is a safe bet.
I would suggest grabbing a copy of JavaScript: The Definitive Guide, which will give you a general understanding of what it is and how to use it, and much more. While you are at it, I also suggest John Resig's Pro Javascript techniques. This guy really knows his javascript inside-out (works for mozilla, author of jQuery, amongst others).
As for jQuery, you don't really need to buy a book. Just browse through the API and have a look at its source code. Perhaps you won't understand much, but there are some cool stuff going on that will make you think.
It is entirely possible to learn jQuery without learning every bit of javascript first. However, to be productive and and extend the functionality of plugins etc you will need to know javascript.
I would suggest that you do a bit of both. Continue learning Javascript but when you want to implement functionality make use of the jQuery library.
I would say the statement is akin to you reading a C#/VB.Net book and having your boss say "Don't bother, just learn ASP.Net". You really don't get much from the latter without the former.
JQuery provides a good layer of abstraction for interacting with DOM elements. You can do a lot of interesting things with it quickly and easily. But there are probably many things that JQuery won't do for you. You'll need to use regular JavaScript for that.
jQuery removes the need for many bad Javascript habits.
However, you will frequently need to know more than just jQuery to get non-trivial work done.
You'll need to learn both, but try to pick up habits based on jQuery.
jQuery is made from javascript. :)
It would be a very good idea to read the source-code of jQuery to enhance your overall understanding of javascript...
Definitely learn both at the same time :)
Good luck and have fun.
Maybe your boss is trying to save you some time learning the basics of Javascript and start you off learning jQuery right away but I think this would be a bad idea.
Understanding the basics of javascript is key to using jQuery successfully. jQuery provides shortcuts and solutions to problems (cross browser problems etc) but it is not a language unto it's self.
My advice, learn javascript, learn about handling events in different browsers, inserting in to the DOM and then start using jQuery. You will appreciate it a lot more and be a better coder for it.
If you already have an understanding of C#, you'll have a head start learning Javascript and it shouldn't be too hard to pick up. I'd stick with that Javascript book though, since you need to know Javascript to use jQuery. Once you are comfortable with Javascript, move on to learning jQuery. The jQuery docs are VERY helpful and can answer almost any question you have.
Good luck with learning it, it'll be worth it.
jQuery Docs
what are U doing? - ofcourse pure JavaScript is better =)
Libraries will alwas contain nonessential complexity, but they can save some headaches if they're not too bloated or already present on the end users' systems. Best use would be to learn javascript while using jquery, and then slowly remove the crutch of using jquery. While it's powerful, it does add significant overhead, nonessential complexity, and potential opportunities for abuse, just like flash. There are no silver bullets.

Should I learn/become proficient in Javascript?

I am a .NET webdev using ASP.NET, C# etc... I "learned" javascript in college 5+ years ago and can do basic jobs with it. But I wonder if it is useful to become proficient in it.
Why should I learn Javascript?
Is it more advantageous then learning JQuery or a different library?
Yes, definitely learn Javascript before you learn one of the libraries about. It's the whole walk-before-you-can-run thing.
Make sure you add these sites to your bookmarks:
Mozilla's developer site: This contains the reference to the Javascript API in Mozilla. This will help you make sure you're writing code that Firefox understands.
IE's site in Microsoft Developer Network: The same, for IE.
W3's reference of DOM for HTML: In most web applications today, the Javascript code manipulates the DOM, which is an internal keeping track of the objects displayed on screen (but you already knew that, right ?) This is the reference to the DOM API. It is language neutral, which means it does not target Javascript, but these methods exist in Javascript too.
Douglas Crockford' site: Doug Crockford is THE MAN when it comes down to Javascript. The articles in his page are a must read. Because Javascript has closures and first-class functions, he believes it is closer to Lisp and Scheme than to other languages. And he teaches you how to greatly improve your code with these language features.
Yahoo Developer network: You may also want to check this. I'm not a regular visitor to this site, though, so I can't really say much about it.
Yes, absolutely you should learn JavaScript if you are doing web development. I highly recommend JavaScript: The Good Parts, by Doug Crockford. And, JQuery is a great framework to use (this site uses it) -- it kind of depends on what you are trying to do -- YUI and ExtJS are also very nice.
The answer is simple.
Hands down yes. There's a reason that Google have made such a big fuss about the V8 JS engine for Chrome, why Mozilla are working on TraceMonkey for Firefox and why Webkit have been working on Squirrelfish for a while (now Squirrelfish extreme). It's because JS is becoming more popular by the day.
Javascript is one of those languages that spending a few hours learning will probably teach you 99% of what you will ever really use. I would imagine you are at the point in your learning of javascript that you know more than enough now and just learn one or more of the frameworks now.
I would recommend brushing up on your non-frameworked javascript first. Refreshing/learning basic concepts of dom manipulation and what not. Like learning how to build a linked list, stack or queue in C++ before learning how to use the STL (standard template libraries).
In addition to brushing up on straight javascript, it might be good to get into a framework that doesn't abstract and change the way things work so much, for instance Prototype. You code with it very much the same way you code with straight javascript. Read through the Prototype code, learn how to make classes, and do some fancy stuff. From experience, I can say reading through the Prototype.js helped me learn alot.
After messing around a bit, then I'd say go for jQuery. If jQuery didn't, literally, change the way you write code I'd say go for it first, but learning how to build classes and js inheritance and what not can be a very important lesson for someone who wants to become fluent in JS.
Learning javascript is recommended for any web application developer. Why?
You will better understand the possibilities, limitations and dangers related to developing a web application
It is a boost for your career, if you are working on a web application that has a user interface.
However, learning javascript is usually a trade-off between a programming language and another. You should consider whether javascript is relevant for your career or project.
Unless you want to really get into javascript, I think you'd be better off learning enough JS to leverage one of the tried and tested javascript libraries out there.
One thing nice about JavaScript is that it is quite different from mainstream languages such as C#, VB.NET or Java. Learning it, especially if you have occasions to use it, will give you another insight on programming, and that's always good. I think it's worth learning it.
If you are doing web development then at some point you are going to get exposed to Javascript or ECMAScript at some point in your career for any one of a number of reasons. At a minimum you should know enough Javascript to be able to be able to validate user input; however, the web is moving in the direction of using more an more Ajax so you should also know enough Javascript to properly leverage one of the major libraries out there such as jQuery.
As some of the other users have noted, you can learn most of what you need of Javascript on a day to day basis in a single day or a couple of afternoons. If you want to get more advanced with Javascript then you are going to have to invest much more time in learning the language but odds are that unless you seek out this type of work that you are not going to encounter something that a preexisting library doesn't already exist for.
If all you want is to do some simple UI-effects and the like, I suggest you just pick a library and go for it!
Using libraries eliminates all the flawed implementations of JavaScript and provides you with an API which is the same across all browsers. And if you're working together with others it is also a great way of implementing code-standards and best practices.
Learning a second programming language is always good.
By the sound of it, JavaScript is a language that you use, to it will be of practical use too. As a web dev, it has been recommended to me in a review that i learn at least basic JavaScript.
A library such as jQuery is essential for web development thse days, so you could learn that too.
I don't think a lot of deliberate learning makes sense (but of course you need some basic knowledge), but I also think after some years of web development you'll become pretty proficient in the language anyway :)
If you are a webdev then yes, you should be proficient with Javascript. Javascript is a major part of making web apps as interactive as desktop apps.
With that being said, learn to use one of the cross-browser compatible libraries like JQuery, Prototype, etc. We do not need to have any more single browser crud created using Javascript, just because any real man/woman rolls their own.
A few things to learn in Javascript:
1. Basic syntax
2. The various flavours of function declaration.
3. Passing functions around and how to use passed in functions.
I recommend Jeremy Keith's books: DOM Scripting and Bulletproof Ajax. After you become more fluent in JS I would recommend a JS library(I use jQuery, but that is not important).
JS is important to learn. You cannot use a framework without the proper understanding of how it works. That is doing things backwards.
i thing you should have a good knoloedge base of language specification and DOM (Document Object Model). it means,you shoud know how find/create "page object" an edit properties. Also you should have an idea of "object oriented" javascript tecniques, which the starting point of a lot of framework. you don't need learn specific framework if you don't use it. simple keep in mind generic base concept!
I'll go with the opposite answer most are putting out there. Learning javascript as a developer these days is almost pointless. The language is similar enough to java/C# that it's syntax and semantics shouldn't be lost on you.
What you should learn is jQuery.
As you use jQuery you'll pick up the most common things you'll ever need from javascript anyway.
If you're involved with the Web in anyway then the answer is "Yes, always". Maybe an embedded or system's programmer could get by without JavaScript, but not a webdev.
Most of the libraries are designed to alleviate some of the pain of interacting with a multitude of browsers. They will not abstract away core JavaScript functionality.
Yes, you should learn JavaScript. Sooner or later you will need to use it!

Categories

Resources