TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Vanilla JS, fast, lightweight, cross-platform framework

208 pointsby elliotlaiover 12 years ago
Vanilla JS is a fast, lightweight, cross-platform framework for building incredible, powerful JavaScript applications.

27 comments

graueover 12 years ago
I can't be the only one getting tired of sites like this making the front page. Really? It would be one thing to see someone write a legitimate article on why they think the move to JS frameworks is harmful and/or the benefits of using plain JS, and for that to make it to the front page. I'd be interested in that perspective. But this is just somebody being snide. It's the internet equivalent of the kid on The Simpsons that points and goes "ha-ha!" There's no content. We can't have a discussion around a smartass joke like this.
评论 #4436992 未加载
评论 #4435962 未加载
评论 #4437793 未加载
ashrayover 12 years ago
Fast and lightweight, yes. But vanilla-js is certainly not cross platform ;) You see, that's actually one of the biggest problems with JS and one of the main reasons why people use things like jQuery (apart from the pretty API..).<p>That cross platform bit is the weakest link <i>sigh</i>.
评论 #4435854 未加载
评论 #4436117 未加载
评论 #4435773 未加载
kellishaverover 12 years ago
This site could actually be made useful if the little area where you check which "features" you want to include that "generated" the download file actually caused cross-platform, native JavaScript examples of those bits of functionality to be included in a real downloadable file.<p>If you really think more people should be using plain vanilla JavaScript (and in a lot of places, I think this is actually true and even when a framework is needed, it's good to have the underlying skill) then the way to get them to do that is to educate them on it, not patronize.
hcarvalhoalvesover 12 years ago
Raw Javascript is simply not an option. The API is awful, default types are not powerful enough and cross-platform consistency is a joke. For every decently sized project you start in JS you have to reinvent a thousand wheels to even get rolling, so you better just leverage a framework.
RandallBrownover 12 years ago
Wow, even jQuery is written using vanilla-js.
scarmigover 12 years ago
Does anyone else find the code examples absolutely damning?<p>Aside from not being cross-platform, VanillaJS is just plain ugly.
Timmy_Cover 12 years ago
Recently, I was interviewing a front-end developer candidate and I gave them a simple JavaScript problem. The sad thing was, they didn't recognize `document.getElementById()` and didn't know any of the parameters to `addEventListener()`.<p>We finished the exercise assuming the example used jQuery instead.
评论 #4436050 未加载
评论 #4435770 未加载
评论 #4435929 未加载
paulrosenzweigover 12 years ago
Was anyone else surprised by the performance penalty of jQuery? Over 400x hit for getElementsByTagName! I'm curious whether this is more due to cross browser checks or determining the what type of selector was used. To the source!
评论 #4436413 未加载
评论 #4436777 未加载
评论 #4436406 未加载
csabaover 12 years ago
<a href="http://vaporjs.com/" rel="nofollow">http://vaporjs.com/</a> is way better, and was here first.
评论 #4435604 未加载
pooriaazimiover 12 years ago
Question: is the 'Speed Comparison' for real? I find it really, really hard to believe. Surely jQuery &#38; co. revert to native implementations (if they exists, as they do in all modern browsers) for things like `document.getElementById` and don't iterate over the whole DOM.
评论 #4436438 未加载
评论 #4436387 未加载
评论 #4436399 未加载
chbrownover 12 years ago
Not sure why Vanilla JS doesn't require &#60;script&#62; tags, whereas jQuery apparently does.
评论 #4436763 未加载
suyashover 12 years ago
I love pure JavaScript. jQuery is overrated and most libraries are only good for one thing or the other, nothing can replace the joy and performance of Vanilla JS!
评论 #4436174 未加载
评论 #4436234 未加载
ranzaover 12 years ago
these sites are getting really old
Xorlevover 12 years ago
The features generator is a nice touch.
pepveover 12 years ago
I would have liked a compatibility chart between this and the other frameworks.
评论 #4435740 未加载
gokulkover 12 years ago
$.ajax({ type: 'POST', url: "path/to/api", data: "banana=yellow", success: function (data) { alert("Success: " + data); }, });<p>can be written as<p>jQuery.post('path/to/api',{banana:yellow},function(data){alert("Success: "+data);});<p>much simpler and easy than<p>var r = new XMLHttpRequest(); r.open("POST", "path/to/api", true); r.onreadystatechange = function () { if (r.readyState != 4 || r.status != 200) return; alert("Success: " + r.responseText); }; r.send("banana=yellow");<p>nevermind got the joke. but i think jQuery helps write faster code sometimes
phylofxover 12 years ago
wow, the list of the companies using vanilla.js is impressive. if those put their trust in this framework, it surely must be good.
评论 #4435777 未加载
Tichyover 12 years ago
It confuses me if you describe a JS framework as cross platform. Isn't that the whole point of using JS?
mfenniakover 12 years ago
The first book listed on the "Books" link is: JavaScript &#38; jQuery: The Missing Manual<p>Heh.
aneth4over 12 years ago
Given how optimized jquery is, does anyone understand why something as simple as getting an element by id would be so much slower than Dom methods?
评论 #4436426 未加载
shuzchenover 12 years ago
Get back to me when Vanilla.js has a way to handle document ready, and then I'll believe that it's cross-platform.
samvjover 12 years ago
If nothing else, the word doc look is pretty amusing :)
martin-adamsover 12 years ago
I want to use vanilla.js, do you think I should minify it and serve with gzip compression? Anyone know if it will pass JSLint?
tjholowaychukover 12 years ago
nope you have to use codesmell jquery and backbone :p
carlosd19over 12 years ago
hkjk
PythonDeveloperover 12 years ago
ANYWAY, Lol at that... made me chuckle.
评论 #4444640 未加载
madmax108over 12 years ago
So many JS frameworks, so little time...