Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
nitwhiz1180433dYeah but does it support IE11 and has a feature or two?
Now put down authentication, geolocation stuff, actual state management and see your code expand exponentially.
Frameworks exist for preserving devs' sanity as well ya know ;)
vintprox173933dThat's because it's fit for website with few interactivity features. You know what's even faster? Loading speed after removing PHP middleware. Bring JAMstack solution and generate plain HTML at deploy time, DRY. Extending? Svelte it.
Hazarth194133d@3rdWorldPoison eh, I wrote plain XHR js authentication, using jwt tokens and with refresh token support. It's like 300 lines of code which is nothing really. (Person project, security was of little concerned at this stage)
Where Id put the real advantage of frameworks is that they do it and patch it "securely". Otherwise we would all have to constantly react to all sorta of vulnerabilities ourselves.
That being said, It's good practice to know how to do it and It's also true that frameworks do add bloat too so in the end it depends on what your priorities are for a particular project
eo287578633dChallenge: drop the CSS and PHP. Go Node for the server.
Berkmann1881533dWait till you need to interact with the DOM, states and other interactions where you'll end up having code less maintainable and one that isn't performant, that's where some libraries and frameworks shine.
It's nice to do everything yourself and not depend on library, but that comes at a cost.
i approve, but i would still want something jQuery-like, just to have the DOM selection and manipulation have sensibly short and straightworward code as opposed to the ridiculous default JS stuff.
getElementById().childNodes.getElementsByTagName().setAttribute(), anyone? XD
oh, hey, querySelector exists now! cool! still too long, would need wrapping into $(), plus some better way for attribute setting/getting.
that (and the fact that i'm too lazy to implement a mini lib that would do the above) is literally the only reason i (still) use jQuery.
c3r38r170162232d@Midnight-shcode Want my querySelector wraper? I can make a gist tomorrow.
It detects if your selector is simple, in which case it uses the specific method (getElementById, getElementsByClassnames, getElementsByName, etc.) and let's you choose to select the first match, all matches, or n matches with an optional 2nd argument. It even let's you choose the root (root.querySelector...) with the third.
Best of all, it's faster than querySelectorAll (Tested. I can't understand how if it's a freaking wrapper.).
I called it SqS (standing for Super querySelector).
turbopixel9531dumbrella.js is a very good jquery alternative. And bulma as css Framework is fine.