Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera116408yWell. jQuery is convenient but of cause you can do without.
jQuery is built in js.
You just have to do more boiler plate for your self. -
May as well just give up now and use whatever bit of jQuery you need. I've needed it for some little stuff but all I did was pretty much import jQuery code and then copy a few functions from Stack Overflow to make it work how I want. No actual learning of jQuery occurred.
-
jqlite is good for the core functions and not all of the crap that should be done using CSS or vanilla js
-
What I'm learning is it's not so much the framework/library that's the issue as much as the underlying idea about how to handle the DOM. I started getting more into the newer frameworks like Vue.js and how it handles DOM manipulation. It presents a new way of thinking about the state of your interface/application and how the DOM is changed to reflect the changing state(s).
-
arekxv10548yIsn't the whole point to write less code? When you use vanilla js, you will be jquery free... but whats the result? More code to remake all those things you need which are present in jquery. That way you'll end up with even more (possibly buggy) code, but congrats, you didn't use jquery. I still cannot see why all the hate for a perfectly valid library.
-
@arekxv my argument against it is that most new developers go straight to it and use it for basic stuff that can be done in regular js but instead they add extra bandwidth to a site that wasn't needed in the first place. now if jquery is actually doing alot use it but if you are using it for toggling a div just use js and cut down on 16kb of extra crap
-
arekxv10548y@jckimble For small projects and those things I might agree, but for bigger projects it makes sense to use such a robust and tested library especially with so many device quirks (jQuery does not cover just IE problems anymore) nowadays. :)
-
@arekxv I started on dialup before I got stuck on edge, along with that I learned how to write cross browser vanilla js before jquery was around. so even with Internet speeds rising just about everywhere I can't justify including unused code into a website unless it saves bandwidth by making other scripts shorter then it would have been in vanilla js which in the few cases that it is for me is when you are working on effects, if you are copying your logic into the frontend, or your site is live reloading
-
Voxera116408y@jckimble on the other hand. If you include jquery from some common cdn as googles. Odds are that the visitor already got a cached copy localy and dont have to downloaf it.
Also, vue and other frameworks sets limits by requirering another template format that gives tje framework controll over what is chaned when.
This makes it easier to make more efficient changes.
Jquery cannot make the same assumptions but you as a programmer can do some of it by building new nodes completely before appending them.
Also, working with document fragments speed up things since no redraw events are called on fragments.
Related Rants
SO: How to ... in JavaScript?
Answer: use jQuery!
SO: How to ... in JavaScript without jQuery?
Answer: use jQuery!
Me: ffffffffffffffffuuuuuuuuuuuuuuuuu I hate j-f*cking-query, I don't want to learn it!!
undefined
why
fffffffuuuuu
jquery all the time