Live data from Hacker News

Vanilla JS, fast, lightweight, cross-platform framework

vanilla-js.com

61–70 of 134 posts

Re: Vanilla JS, fast, lightweight, cross-platform framework

#62
post #57
post #9

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..). That cross platform bit is the weakest link sigh .

Aren't the polyfills pretty good nowadays?

Yes, but using all of them needed for full HTML5 support in, say, IE6, probably takes up more bandwidth than downloading a new browser.

Re: Vanilla JS, fast, lightweight, cross-platform framework

#64
Sites where js performance of this kind is worth the substantial increase in engineering effort and decrease in maintainability are 1 in 1000.

This guy reminds me of the people who used to say they just wanted a phone when talking about smartphones or who just wanted a command line on Linux when talking about DEs.

Re: Vanilla JS, fast, lightweight, cross-platform framework

#65
post #14

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!

If you listen to HN a lot you'll believe everyone uses jQuery or some other framework, but that's not true. I use vanilla JS and I love it!

Re: Vanilla JS, fast, lightweight, cross-platform framework

#66
post #50

Earlier quoted context omitted.

That's a fair assumption since most of front-end development is done using jQuery as far as the DOM goes. Did you expect your interviewees to have memorized APIs? There's Google so that you can look up those when needed.

I agree. I think it's important to know Javascript as a language well, but there are very few cases when you'd be using Javascript without some abstraction from the DOM.

And in point of fact, neither of those examples are actually about JS, the language. They're about the DOM.

Re: Vanilla JS, fast, lightweight, cross-platform framework

#67
post #14

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!

jQuery is kind of a big download for mobile, so I often skip it for small tasks.

What gets me is when people include jQuery and then further bog things down by loading a lot of plug-ins to do things that could easily be accomplished by adding a few lines of code of their own. Even if you do need and include jQuery, it doesn't mean you have to use it for every piece of javascript in your app.

Many times, a plug-in will do a lot more than you need it to do. If your primary goal is to just get rid of the 300sm delay translating tap events to click events, you don't need a library for full gesture support. You need half a dozen lines to listen for touch events.

If you just need to add some client-side persistence for a few basic things in LocalStorage, you probably don't need a plug-in with a complex query syntax.

Cannibalize a library if you need to and pull out the bits you need. You don't have to include the whole kitchen sink.

Re: Vanilla JS, fast, lightweight, cross-platform framework

#68
post #23

Earlier quoted context omitted.

If you're only targeting modern browsers (latest Chrome/FF/Opera/Safari, IE10), is this still true? I was under the impression the recent browsers were standards-compliant enough that you could use vanilla JS. Of course, most developers still have to target older browsers, but for a private Web app where you know your target audience, this shouldn't be a huge issue.

And what's IE10s market percentage? Less than a fraction of a fraction of a percent I bet. And with current reviews of Win8, I don't see that changing in a meaningful way for soooome time.

I think you missed the announcement where Microsoft is going to do a silent update of IE10 to consumer PC's. IE9 usage will drop to the low single digits within a year and IE10 will take its place as the leading IE browser.

Re: Vanilla JS, fast, lightweight, cross-platform framework

#69
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.

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.

Re: Vanilla JS, fast, lightweight, cross-platform framework

#70

Earlier quoted context omitted.

I prefer semicolon.js, more secure and reliable :) https://github.com/madrobby/semicolon.js

Actually, function.js is vastly superior as readers of "JavaScript: The Good Parts" will know: https://github.com/TazeTSchnitzel/function.js

There is an error in the Readme. It begins with "Vapor.js is a much more...". Should be "Function.js is...".
Post reply on HN