What is Vanilla JS?

Asked

Viewed 32,107 times

85

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

  • Vanilla JS, it’s a joke, so just use pure javascript, here’s a speed comparison, displaying the javascript version of some popular framework codes. Hehe. (It’s something like: "I don’t use libraries").

  • 7

    The joke is more or less thus

  • It comes from English. They call it vanilla (vanilla) anything that is without anything extra, ordinary, regular. For example, daddy-mommy sex is "vanilla".

6 answers

108


You saw right, it’s pure Javascript. Perhaps the form presented to look like a framework is intended as a joke since there is criticism about the proliferation of frameworks which in general add little in fact.

Probably the website that you saw is that. His goal is to jocosely publicize the use of pure Javascript to the detriment of frameworks since the latter do not allow doing anything new at most, and this can often be questioned, in an easier way.

I do not deny that there are some advantages to the use of some of these frameworks but they also bring disadvantages that many people ignore such as the increase in resource consumption and the difficulty of seeing what is really happening.

You can read more about it on Google (the list is too long to list one by one).

I will take this opportunity to clear up a very common confusion:

jQuery is NOT a programming language

jQuery is just a library, or if you prefer, call him framework. But please don’t call it a programming language. The same goes for other libraries designed to help you use Javascript. The same goes for ASP.Net to be called language, when it’s just a technology.

jQuery depends on another programming language directly. That is, without Javascript syntax, it is not possible to do anything with jQuery. It is not a question that jQuery exists by itself and is then converted to JS, as with other languages.

The purpose of this library is to make it easier to write some patterns, shorten the code, make it compatible with the various browsers and provide some commonly needed operations when writing Javascript code, usually using a fluent syntax. Note that using jQuery you still write JS code, even if it doesn’t look like.

jQuery increases the abstraction level.

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

So you don’t program EM jQuery, you program in Javascript COM jQuery. Just like you no program in HTML.

You may not need jQuery

  • 21

    The following is documentation from Vanilla JS: https://developer.mozilla.org/en-US/docs/Web/JavaScript. kkkk

  • 9

    @Joaopaulo, UP in your comment, for the nice reference to documentation. kkkkk. And don’t forget to include the library vanilla.js, otherwise it doesn’t work. kkkkkk

  • 3

    It’s the main @Fernando!! I advise 'checkar' all the features before downloading, to have the complete package.

  • 3

    @Most modern browsers no longer need to include vanilla.js but can be used natively

43

It’s pure Javascript anyway. In English there is this expression "vanilla [Something]" to refer to the most common, simplest or purest variant of something - perhaps because "vanilla" is the most basic flavor of chitutes like cookies, ice cream, etc.

21

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

Here another joke as an example: needsmorejquery

18

It wasn’t necessarily a joke. The term "Vanilla _______" itself is something serious and used in many areas. See: https://en.wikipedia.org/wiki/Vanilla_software

is called vanilla when not customized from its original form, meaning that it is used without any customizations or updates Applied to it. [...] The term comes from the Traditional standard Flavor of ice cream, vanilla Flavor.

Translating:

is called vanilla (vanilla) when it is something not customized in its original form, meaning it is used without customization or updates applied to it. [...] The term comes from the traditional standard flavor of ice cream, vanilla.

Another example of the use: Building and installing a vanilla Linux kernel on Ubuntu, that is a pure linux kernel, no customizations.

  • 2

    Worth the translation of the passage, since it is what explains what is Vanilla ***.

  • @Thanks for the touch. Thanks ;-)

13

Javascript purer than this one doesn’t have many around, no website when you download what comes is a file called vanilla.js with nothing.

-4

As has already been said above by several colleagues, Vanillajs is just a sarcastic way of referring to pure JS. So Vanillajs is the same as Javascript Puro.

  • If it has already been said, I did not understand what the purpose of the answer was. It has some more information?

  • After almost 5 years the question was asked I thought something new would appear, but it seems that...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.