Reputation: 7285
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".
Upvotes: 685
Views: 429740
Reputation: 58093
There's no difference at all, VanillaJS
is just a way to refer to native (non-extended and standards-based) JavaScript. Generally speaking it's a term of contrast when using libraries and frameworks like jQuery and React. Website www.vanilla-js.com lays emphasis on it as a joke, by talking 'bout VanillaJS
as though it were a fast, lightweight, and cross-platform framework. That muddies the waters! Thus, it can be a little philosophical question: "how many things do I compile to Vanilla JavaScript
without being VanillaJS
themselves?" So, a mere guideline for that is: if you can write the code and run it in any current web-browser without additional tools or so called compile steps, it might be VanillaJS
.
Upvotes: 0
Reputation: 32512
This word, hence, VanillaJS
is a just damn joke that changed my life. I had gone to a German company for an interview, I was very poor in JavaScript
and CSS
, very poor, so the Interviewer said to me: We're working here with VanillaJs, So you should know this framework.
Definitely, I understood that I'was rejected, but for one week I seek for VanillaJS, After all, I found THIS LINK. š
What I am just was because of that joke.
VanillaJS === plain `JavaScript`
Upvotes: 1
Reputation: 6911
"Vanilla JSā is an expression that got popular after the publishing of a satire website in 2012 (http://vanilla-js.com/). Thereās a section covering its story/meaning in this post.
So why the joke? It kind of came as a modern response to the old school knee-jerk reflex of relying on jQuery and additional JS libraries. With the ECMAScript spec and modern browsers capabilities, the need to bypass plain JS with external libraries to maintain consistency across browsers just isnāt there anymore. Hereās a site that shows you how true this is with concrete examples: http://youmightnotneedjquery.com/
Upvotes: 5
Reputation: 34535
This is a joke for those who are excited about the JavaScript frameworks and do not know the pure Javascript.
So VanillaJS is the same as pure Javascript.
Vanilla in slang means:
unexciting, normal, conventional, boring
Here is a nice presentation on YouTube about VanillaJS: What is Vanilla JS?
Upvotes: 48
Reputation: 15574
VanillaJS === JavaScript i.e.VanillaJS is native JavaScript
Why, Vanilla says it all!!!
Computer software, and sometimes also other computing-related systems like computer hardware or algorithms, are called vanilla when not customized from their original form, meaning that they are used without any customization or updates applied to them (Refer this article). So Vanilla often refers to pure or plain.
In the English language Vanilla has a similar meaning, In information technology, vanilla (pronounced vah-NIHL-uh ) is an adjective meaning plain or basic. Or having no special or extra features, ordinary or standard.
So why name it VanillaJS? As the accepted answer says some bosses want to work with a framework (because it's more organized and flexible and do all the things we want??) but simply JavaScript will do the job. Yet you need to add a framework somewhere. Use VanillaJS...
Is it a Joke? YES
Want some fun?
Where can you find it, http://vanilla-js.com/ Download and see for yourself!!! It's 0 bytes uncompressed, 25 bytes gzipped
:D
Found this pun on internet regarding JS frameworks (Not to condemn the existing JS frameworks though, they'll make life really easy :)),
Also refer,
Upvotes: 43
Reputation: 12916
Using "VanillaJS" means using plain JavaScript without any additional libraries like jQuery.
People use it as a joke to remind other developers that many things can be done nowadays without the need for additional JavaScript libraries.
Here's a funny site that jokingly talks about this: http://vanilla-js.com/
Upvotes: 369
Reputation: 5062
The plain and simple answer is yes, VanillaJS === JavaScript, as prescribed by Dr B. Eich.
Upvotes: 45
Reputation: 25728
VanillaJS is a term for library/framework free javascript.
Its sometimes ironically referred to as a library, as a joke for people who could be seen as mindlessly using different frameworks, especially jQuery.
Some people have gone so far to release this library, usually with an empty or comment-only js file.
Upvotes: 74
Reputation: 318508
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).
Upvotes: 580