Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is VanillaJS?

Tags:

javascript

I have one simple question, that got stuck in my mind for a few days: What is VanillaJS? Some people refer to it as a framework, you can download a library from the official pages.

But when I check some examples or TodoMVC, they just use classic raw JavaScript functions without even including the library from the official pages or anything. Also the link "Docs" on the official webpage leads to the Mozilla specification of JavaScript.

My question is: Is VanillaJS raw JavaScript? And if yes, why people refer to it as "framework" when all you need is a browser without any special included scripts?

I am sorry for a probably stupid question but I have no idea what people are talking about when they say "VanillaJS".

like image 816
user1377911 Avatar asked Dec 06 '13 23:12

user1377911


People also ask

Is vanilla JS different from JS?

The term vanilla script is used to refer to the pure JavaScript (or we can say plain JavaScript) without any type of additional library. Sometimes people often used it as a joke"nowadays several things can also be done without using any additional JavaScript libraries".

Is vanilla JavaScript still used?

It is still just plain ol' JavaScript. If your knowledge is limited only to a single JavaScript framework, you will have a hard time learning a new one. Different frameworks are often based on a different set of JavaScript principles.

What is a vanilla code?

In computer science, vanilla is the term used to refer when computer software and sometimes also other computing-related systems like computer hardware or algorithms are not customized from their original form, i.e., they are used without any customizations or updates applied to them.


1 Answers

This is VanillaJS (unmodified):

// VanillaJS v1.0 // Released into the Public Domain // Your code goes here: 

As you can see, it's not really a framework or a library. It's just a running gag for framework-loving bosses or people who think you NEED to use a JS framework. It means you just use whatever your (for you own sake: non-legacy) browser gives you (using Vanilla JS when working with legacy browsers is a bad idea).

like image 125
ThiefMaster Avatar answered Oct 21 '22 16:10

ThiefMaster