Is jQuery good to use JavaScript well?

I am quite effective in jQuery, implementing it in several projects for my company. However, I got a little lost when reading things like node.js

Should I go back to the basics and learn the JavaScript language, or should I just stick with jQuery?

Another thing I would like to ask is: Does coding in plain JavaScript improve performance compared to coding with jQuery? For my own experience, coding a heavy complex animation combination in jQuery always seems to take up most of the computer's memory.

+6
javascript jquery
source share
8 answers

You must understand what is happening, to some extent. It is not good to know what is under it, but sometimes it is not so important to know everything, for example: .innerHTML consistent? Not completely, for example. <select> in IE. Does this mean that you need to know every inconsistency? Not if you allow jQuery to handle it.

People say that you need to understand JavaScript before jQuery, let me say I agree , but there are limitations to this, although you do not need to know every quirk and inconsistency between browsers, for example, why we use an abstraction layer.

For me, this is no different from what you need to learn how to build before C #, if you know what happens, how memory refers, what is a pointer? I think you need to know every detail? Probably no. We would never progress if every new programmer studies each layer below, which is why mathematical theorems are based on other, known as true, identical concepts.

You must trust your level of abstraction . It's always like that? unfortunately not, but jQuery does a pretty good job of being as consistent as possible and always improving. More importantly, the community is doing a good job of making inconsistencies known.


Edit: Let me caution all of the above if you know what to do under (this applies to most of the abstractions in my book, not just JavaScript), this will help you program better and more efficiently. If you know what is happening under the covers, you can use it more effectively.

+17
source share

It is very similar to apples and oranges. jQuery is a terrific library, but it focuses on manipulating the DOM. This will not help you with general coding, prototype inheritance, closure, data types and other important materials that you have to deal with when programming.

node.js has nothing to do with the DOM, so it is very orthogonal to jQuery, it is not surprising that it is difficult for you to understand it.

Please note, however, that knowing JavaScript does not necessarily mean that you will be effective with every JavaScript library. Each library pretends to be a superset of a language, a domain-specific language, to aid in the specific task that the library was built to solve. You will always need to find out that DSL will be the first to be effective, but it will be easier to understand the insides of any given library if you know JavaScript well.

+4
source share

If you are only interested in application programming (websites and applications), then jQuery is more than enough. If you want to develop a framework or a JavaScript library, you need knowledge of the JavaScript language.

+3
source share

Is jQuery good to use JavaScript well?

Not. I highly recommend you learn the basics, and then some.

jQuery is just a library. Although productivity, well versed in the functionality provided by the library, is not the same as good in the language in which the library is written.

I'm not saying that you need to know that all bitwise operations are converted to signed 32-bit integers in big-endian order , but you need to know basic concepts such as closing , how to properly attach event handlers and the basic concepts of asynchronous / oriented programming events.

What if you have to switch jobs to a company that uses ExtJs instead of jQuery? Understanding the basic concepts of language will make these types of transitions not problematic.

Another thing to consider is that for every library there is always a task that it does not support. By relying on the library to always do the heavy lifting, you will eventually bite you in the backs.

Does coding in plain JavaScript improve performance compared to coding with jQuery?

Libraries tend to be as universal as possible for the area of ​​use that they are targeting. Because of this, inefficiencies can occur in some scenarios that could otherwise be optimized outside the library.

It all depends on how much you understand JavaScript, the selection / creation / analysis of algorithms and generally programming. When you start to be as effective as possible, you really need to be able to move on to the finer details of the language. "Being good" in jQuery or some other library probably will not help you with this (unless you look under the hood and apply your methods in a way that is typical of your scenario).

+3
source share

jQuery is a list of (very) useful functions written in JavaScript.

You simply use the library, not understanding what is behind it and how everything works. In most cases, you will only need jQuery, perhaps 20-40% of your code, and the rest will be pure JavaScript, so I recommend that you learn the basics. These are good places to start:

+1
source share

I am a bit ambiguous on this. Knowing real deep JavaScript is a great art - I am always terrified when one of our regular JavaScript JavaScript experts comes to the table. However, not everyone needs such deep knowledge - if you focus on creating interfaces, it is well known that one of the frameworks may be all that you will ever need, with very few edge cases.

On the other hand, knowing at least the basics of how JavaScript works under the hood can be helpful. If you feel that I was forced to look into it, I would say do it. You do not have to become a complete guru in basic JavaScript, but it has a basic understanding of how data is processed within the company, how events are processed by the browser, how memory is managed, etc. It's good.

+1
source share

jQuery is an abstraction layer for JavaScript, and for this reason most of the time you will do all this in jQuery, not raw JavaScript. However, it is always useful to have some JavaScript knowledge, at least for the required parts.

For this reason, if you see any jQuery book, most of them have a chapter or index regarding "JavaScript Basics" or "JavaScript for jQuery."

0
source share

Not necessarily, it is like saying that being good in Java is the same as in byte code, as it uses byte code.

0
source share

All Articles