If you hate jQuery because you say it's "bulky", then please explain these modern JavaScript frameworks with a bajesus of configuration to make it just work plus the node_modules.

  • 5
    These other frameworks generally provide more utility than DOM manipulation.

    My gripe with jQuery is because it does things that native JS now does in a *slightly* prettier manner while abstracting away everything it's actually doing.
  • 7
    @Charon92 I actually think vanilla js is prettier than jquery
  • 4

    By prettier I really meant "shorter". I too prefer JS syntax. It's a little more verbose but less hideous to look at structure wise.
  • 2
    @Charon92 just look at ajax vs fetch calls. Eww
  • 1
    @devs $.ajax and fetch have very similar structure, though
  • 5
    jQuery is obsolete for several reasons:

    1) Modern vanilla JS can usually do its job for simple cases with direct DOM manipulation.

    2) Simple animations are available via CSS transitions which the browser can schedule in parallel by itself, and complex animations usually don't belong on a production website.

    3) For complex things, you don't even want direct DOM manipulation because that ends up in a mess. That's what frameworks address.

    4) Why incur another dependency if it isn't necessary?

    5) It's usually another file that is downloaded, and while http/2 makes that less of a problem, it's still one additional round trip. Especially on mobile, you don't want useless roundtrips.

    The only reason for jQuery today is if you have legacy jQuery plugins and nobody would pay for a rewrite.

    I've got a widget of medium complexity on my site, and it was written 10 years ago. Took me two days to convert that into vanilla JS.
  • 4
    jQuery is likely slower than just using the native JS due to overhead of abstracting calls to DOM functions. But the DOM functions themselves nowadays are easy to use without abstraction.
  • 2
    Most modern library only do one thing each unlike jQuery that do everything with the annoying $ syntax
Your Job Suck?
Get a Better Job
Add Comment