TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Vanilla JS, fast, lightweight, cross-platform framework

208 点作者 elliotlai超过 12 年前
Vanilla JS is a fast, lightweight, cross-platform framework for building incredible, powerful JavaScript applications.

27 条评论

graue超过 12 年前
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 未加载
ashray超过 12 年前
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 未加载
kellishaver超过 12 年前
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.
hcarvalhoalves超过 12 年前
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.
RandallBrown超过 12 年前
Wow, even jQuery is written using vanilla-js.
scarmig超过 12 年前
Does anyone else find the code examples absolutely damning?<p>Aside from not being cross-platform, VanillaJS is just plain ugly.
Timmy_C超过 12 年前
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 未加载
paulrosenzweig超过 12 年前
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 未加载
csaba超过 12 年前
<a href="http://vaporjs.com/" rel="nofollow">http://vaporjs.com/</a> is way better, and was here first.
评论 #4435604 未加载
pooriaazimi超过 12 年前
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 未加载
chbrown超过 12 年前
Not sure why Vanilla JS doesn't require &#60;script&#62; tags, whereas jQuery apparently does.
评论 #4436763 未加载
suyash超过 12 年前
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 未加载
ranza超过 12 年前
these sites are getting really old
Xorlev超过 12 年前
The features generator is a nice touch.
pepve超过 12 年前
I would have liked a compatibility chart between this and the other frameworks.
评论 #4435740 未加载
gokulk超过 12 年前
$.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
phylofx超过 12 年前
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 未加载
Tichy超过 12 年前
It confuses me if you describe a JS framework as cross platform. Isn't that the whole point of using JS?
mfenniak超过 12 年前
The first book listed on the "Books" link is: JavaScript &#38; jQuery: The Missing Manual<p>Heh.
aneth4超过 12 年前
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 未加载
shuzchen超过 12 年前
Get back to me when Vanilla.js has a way to handle document ready, and then I'll believe that it's cross-platform.
samvj超过 12 年前
If nothing else, the word doc look is pretty amusing :)
martin-adams超过 12 年前
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?
tjholowaychuk超过 12 年前
nope you have to use codesmell jquery and backbone :p
carlosd19超过 12 年前
hkjk
PythonDeveloper超过 12 年前
ANYWAY, Lol at that... made me chuckle.
评论 #4444640 未加载
madmax108超过 12 年前
So many JS frameworks, so little time...