What is Vanilla JS?

65

I have already found this term in several places, "Vanilla JS". It seems to be cited as a framework , but in the codes where it is quoted and on the site itself the code presented is pure JavaScript.

    
asked by anonymous 15.01.2015 / 13:00

5 answers

76

You've seen it right, it's pure JavaScript. Perhaps the form presented to look like a framework is purposeful as a joke, as there is criticism of the proliferation of frameworks that generally do not really add.

Probably the site you've seen is esse . The goal is to make joking the use of pure JavaScript rather than frameworks as they do not allow you to do anything new at the most, and this can often be questioned more easily.

I do not deny that there are any advantages to using some of these frameworks but they also have drawbacks that many people ignore, such as increased resource consumption and the difficulty of seeing what is really happening.

You can read more about Google in # (the list is very large to list one by one).

I will take the opportunity to clarify a very common confusion:

jQuery is NOT a programming language

jQuery is just a library, or if you prefer, call it framework >. But, please do not call it programming language. The same goes for other libraries made to assist the use of JavaScript. The same goes for ASP.Net to be called language when it is just a technology.

jQuery depends on another programming language directly. That is, without the JavaScript syntax, you can not do anything with jQuery. It's not a question that jQuery exists by itself and then converted to JS, as with other languages .

The purpose of this library is to make it easier to write some patterns, to shorten the code, to make use of the various browsers, and to provide some commonly needed operations when writing JavaScript code, usually using a sintaxe Fluent . Note that using jQuery you still write JS code, even if it does not look like it.

jQuery increases the abstraction level .

jQuery has no variables, they are used because JS has them. Although the library has a function that prevents the use of flow control in many situations, it has no control, not even the function call is itself. All programming semantics in programming languages, ie in languages that are turing complete only is present in the part provided by JS.

So you do not program in jQuery, you program in JavaScript with jQuery. Just like you do not program in HTML .

You may not need jQuery

    
15.01.2015 / 13:05
32

It's pure JavaScript anyway. In English there is this expression "vanilla [something]" to refer to the most common variant of something - perhaps because "vanilla" is the simplest / basic taste of trifles like cookies, ice cream, etc.

    
15.01.2015 / 13:05
16

As they said, it's just a joke. Vanilla was a clever way to criticize the indiscriminate use of frameworks or libraries when you should just use pure javascript.

Here's another joke as an example: needsmorejquery

    
15.01.2015 / 15:10
13

It was not necessarily a joke. The term "Vanilla

18.11.2015 / 12:36
10

More pure JavaScript that does not have many around, in the site when downloading what comes next is a file called vanilla.js without anything. Joke indeed!

    
15.01.2015 / 13:15