4 ms·
> with some simple jquery Plain javascript, if you want to go down that route. Jquery is around 30kb of javascript, if I remember correctly. > but that's not
by azangru 6y ago
> with some simple jquery
Plain javascript, if you want to go down that route. Jquery is around 30kb of javascript, if I remember correctly.
> but that's not cool and not good on your resume
On the contrary, writing vanilla js is pretty cool and impressive on the resume, when every other developer puts react there; but it's pretty miserable too, compared to using frameworks.
- bob1029 6y agoIf I see the words "vanilla JS" or "SQLite" on a resume, I will automatically place it into my maybe pile.
- ant6n 6y agoIs that a good or bad thing?
- bob1029 6y agoYes, its basically a shortcut when I am doing a quick first scan through resumes. The moment I see one of those keywords I will flag it for 2nd pass review and move on.
- asddubs 6y agoI'll bring some demos of my snowflake animations and cartoon character gifs that follow the cursor around to the interview I actually quite like writing vanilla js in my spare time, but I can never tell if I'm doing everything horribly wrong or not
- bob1029 6y agoAs long as it makes sense when you read it after a few days (i.e. its well organized) and it also works as expected, then you are probably doing well. Javascript is actually incredibly fast on most devices, especially if you are constraining yourself to the vanilla API and not something like jQuery. Remember, every web browser's JS engine has been hyper-optimized to support decades of half-assed website implementations. It's really hard to screw up perf on document.getElementById(). There's honestly not a whole lot of ways to hang yourself with the vanilla methods unless you are trying to build something ridiculous like a raytracer or physics engine.
- azangru 6y ago> document.getElementById() Can we at least do document.querySelector? Pretty please? :-)
- snet0 6y agoJust use the 1 line jQuery: const $ = document.querySelector.bind(document)
- abhishekjha 6y agoWhat does it do?
- asddubs 6y agoi think the biggest thing for your average app is just causing a lot of layout repaints. as long as you spam requestanimationframe everywhere and group style changes and polling, you'll be good. I was really surprised how good I was able to get things on even an ancient ipad 2 I had laying around
- aryonoco 6y agoVanilla JS is pretty cool. Eleventy is even cooler, it gets you most of the things a framework gets you, but gets compiled to fast, vanilla JS and that's what served to the browser. Svelte/Sapper also has a lot of potential as it only ships the parts if the framework that are absolutely needed instead of the whole thing. But in reality, you can make plenty of very fast React sites and plenty of slow vanilla JS sites.
- j-krieger 6y agoAny modern JS Framework gets compiled to vanilla JS. That‘s exactly the problem: Because Browsers don‘t implement ES6+ Syntax natively, it has to get compiled to complicated, long winded ES5 or filled by heavy polyfills. If browsers were all spec compliant, code bundles would be way smaller.
- azangru 6y ago> Because Browsers don‘t implement ES6+ Syntax natively Erm what? What browsers are you talking about now?
- IggleSniggle 6y agoThis almost certainly means Internet Explorer, if they’re only referring to ES6. But honestly I love all the feature since then. It’s actually difficult for me to imagine not using TypeScript these days, let alone not having access to asynchronous/await or async iterables, plus all the tiny little syntax improvements it’s easy to take for granted like Array.includes()
- duckmysick 6y agoOld Android browsers, UC Browser.
- wnevets 6y agoFeel free to replace jQuery with regular JavaScript in my post.