views:

460

answers:

11

I'm a backend programmer and I wonder about one thing. I know just a little about Javascript. I know the basics when I look at some Javascript code, I understand what code is trying to do. But I have never used it to create animations.

Then I heard about jQuery. Can I be an expert on jQuery without knowing a lot about Javascript?

And how about Ajax? Can I do Ajax animations (search suggestions) just with jQuery and don't have to learn Javascript?

+32  A: 

JQuery provides a framework that allows you to create a lot of great features relatively simply but it's still javascript and doesn't release you from the need to have at least a reasonable understanding of javascript to use it.

Javascript is one of those misunderstood languages because it's a scripting language, it's a very powerful and flexible language... learn it and you'll be grateful you did.

Lazarus
+1 Javascript is a misunderstood and an underestimated language.
Jonas
A: 

Yes you can but you will not be able to do complicated stuff which will use pure javascript, because jquery is not everything.

But with the help of the internet and seeing examples, you can do alot.

Amr ElGarhy
+5  A: 

That's a bit like asking if you can use ASP.NET without learning C# or VB, or if you can use the java.math library without learning Java. jQuery is a library to make make JavaScript programming easier. You still have to write JavaScript to use it.

Joel Mueller
+1  A: 

Learning the ins and outs of Javascript will make your jQuery experience much more pleasureable. Specifically I would recommend looking at Javascript's unusual model for OOP, closures, scoping, namespacing - that sort of thing. It will make life much easier for you.

John McCollum
+3  A: 

Ajax and animation are two different things. AJAX (Asynchronous Javascript And XML) is a communication protocol. Animation is the art of making still things appear to move. ;-) Jquery and its associated plugins, Dojo, Script.a.licious and other such libraries include built in animations that you can plug in without understanding the underlying javascript -- however, as everyone else here has said, understanding javascript will make your coding experience much more pleasant and effective.

Don't forget that there are a very large number of answers already available on Stack Overflow that will help you become acquainted with the language (not to mention a large number of experts willing to give even more help.)

I'd recommend starting with some of these questions:

The Hidden Features of Javascript

How Does Javascript's Prototype work

Object Construction with Prototyping

Sean Vieira
+2  A: 

No

While you can certainly use jQuery without knowing JavaScript, there's absolutely no way to become an "expert" at jQuery without knowing JavaScript.

You'll be fine without a JavaScript background if you just need basic animations, event handlers, and DOM traversal. But being an "expert" at jQuery presumably requires more than that, in which case you'll need to learn JavaScript in order to write clean, elegant, and maintainable jQuery code.

Kevin Pang
+15  A: 

Javascript, jQuery and Ajax - misconceptions

Javascript is a language. All modern desktop web browsers support Javascript. But their support differs. That's where jQuery comes in. It's built on top of Javascript and its functions are written in a way so they work with most of these browsers in exactly the same way. So developers don't have to write all-browser-supported javascript code by themselves.

Nontheless, jQuery is still build on top of Javascript. jQuery is a Javascript library. And when you use jQuery, you still write Javascript code. Think of it as additional functions to the existing Javascript functionality. jQuery calls work the same on all browsers and you still use Javascript.

What about Ajax. There's no thing like Ajax animations. There are Javascript/DOM/jQuery animations. They may be triggered by Ajax calls/responses, but they are not Ajax animations. Ajax in itself is a communication facade between your client side (Javascript code) and server side (whatever platform and language is used there).

Animations are done by manipulating HTML DOM elements using Javascript + time. Libraries like jQuery provide the functionality to do this kind of stuff the easy way. Again to make it easier on you. So you don't have to do it by yourself.

Answer to your question

So if you want to develop client apps using jQuery it's imperative you become familiar with Javascript. And HTML. And DOM. Ajax is not mandatory. To become really good with jQuery one has to become really profficient in Javascript. Because it's the client language you'll build your app. Using upgrades in the form of jQuery library. jQuery itself uses rather complex parts of Javascript that you'll have to understand to some extent to be able to debug problematic situations in your app.

Robert Koritnik
+2  A: 

i am a backend programmer

So there is your answer: no, because jQuery is javascript for designers.

edit whoever voted this down really is too serious in life :-)

Paul
No. I suppose jQuery is Javascript for web client developers. Not necessarily designers. You're lucky if you get a designer with programming knowledge on your project. On the other hand I doubt that any designer (not being intrinsic developer) would write any useful code.
Robert Koritnik
There are a lot of designers out there who know jQuery but not much JavaScript. I run into them all the time. They know HTML, CSS, and enough jQuery to do some simple transitions and animations.
Nosredna
http://jqueryfordesigners.com/ http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/ http://www.designer-daily.com/10-jquery-scripts-to-improve-your-sites-interface-1144
Nosredna
I think pretty much everyone who’s done any DOM manipulation with JavaScript finds its CSS selector engine useful.
Paul D. Waite
+1  A: 

jQuery is a JavaScript library the way stdlib is a C library, so yes you'll need to know minimal JavaScript as well as basic understanding of CSS/HTML.

However, learning jQuery is probably the best way to learn JavaScript these days, as it takes care of the big hurdles that trip up those new to JavaScript (the DOM and the event model) and makes AJAX a breeze. It also encourages best practices such as unobtrusive JavaScript, as opposed to putting "onclick" everywhere, and forces you to learn about closures. If you're already a programmer, you'll have no problem picking it up.

jshalvi
A: 

jQuery in its core is javascript. learning javascript would be good but with jQuery it is not really required.

Yassir
A: 

You need to learn JavaScript, but you don't need to learn the DOM or raw XHR. This is what jQuery saves you from.

Skilldrick