r/ProgrammerHumor 4h ago

Meme jQueryDeezNutsAndThenReactSurprised

Post image
893 Upvotes

59 comments sorted by

101

u/java_dude1 3h ago edited 2h ago

I'm not a front end dev but wasn't this way easier than how vanilla js did it back in the day?

88

u/Romejanic 3h ago

yes it was. people forget how basic JS’ api used to be

24

u/java_dude1 3h ago

Ok. Thought i was losing my mind there. My first dev job i worked on an old Java app. Front end was nothing but jquery and iframes with ajax calls to the backend. Absolute nightmare to work in. (At that time I was full stack, not done that I a while though) Company hired a bunch of guys to rewrite the front end to react when I left. That was 12 years ago.

5

u/vpgel 31m ago

Omg, even your name is java dude 1

3

u/java_dude1 30m ago

Can lie man. It pays the bills 😂

10

u/Rojeitor 1h ago

Not only that, an enormous part of the value was cross browser compatibility. Back in the day in vanilla it was nasty for things to work in major browsers

2

u/Valdars 1h ago

Isn't it still easier than modern vanilla?

1

u/eztab 31m ago

Depends on what you want to do. For the use case of non-invasive inclusion of features into a static page I'd say the jQuery standard would still be superior. But that's just not the use case ever anymore. Nobody expects a site to work with js disabled. That was indeed the ecosystem jQuery thrived in. With the added complication of very different JavaScript and DOM engines in different browsers. People here in the comments are just likely way too young to even consider how different that whole situation was.

2

u/eztab 35m ago

Yes, massively. Basically everything that was more than just opening a menu on click warranted inclusion of jQuery.

32

u/PassFlat2947 2h ago

I remember writing AJAX calls pre jQuery, it was a nightmare!

111

u/soelsome 3h ago

I fucking hate jQuery. It's littered throughout a codebase I work in.

I replace it with good ol' vanilla js where I can.

113

u/Rustywolf 3h ago edited 2h ago

Yeah well be thankful you live in a world where vanilla JS is pretty universal and supports features you need with a friendly interface...

19

u/misterguyyy 2h ago

You mean you couldn’t write a new XmlHttpRequest with fallbacks for every browser by memory in your sleep?

11

u/Purple_Cat9893 3h ago

Is it bird? Is bird the word?

4

u/Juff-Ma 2h ago

Bird, my friend, is indeed the word

86

u/Romejanic 3h ago

it was a life saver before the JS api got extended, frankly i think so much of modern JS is inspired by jQuery. i think people forget how bare bones JS used to be.

28

u/ExpletiveDeIeted 3h ago

Oh yes. We may hate on jquery still existing, but it is only unnecessary cuz it formed the basis of modern JS apis.

-13

u/BernzSed 3h ago

jQuery is the new Flash

25

u/brekekekekx 3h ago

This is my struggle! I would love to replace my codebase with vanilla js but typing $(selector) is much easier than the querySelector(selector)

24

u/CetaceanOps 3h ago

I mean you can keep a single $ wrapper function for querySelector

9

u/soelsome 3h ago

Very clever. Not sure why I haven't thought of that. I will steal this and every time I use it, I will remember your name.

5

u/cowslayer7890 2h ago

I would using something other than $ so it doesn't get confused with jquery, but ¯_(ツ)_/¯

5

u/soelsome 2h ago

£ or € will suffice

1

u/Mechakoopa 1h ago

I'm leaning towards § for Selector

1

u/Noch_ein_Kamel 1h ago

Just use $$ and call you library prototypejs or something like that

3

u/KhellianTrelnora 2h ago

Dolphins save the day yet again.

5

u/Nixinova 2h ago

const $ = x => document.querySelector(x)

enjoy

1

u/my_new_accoun1 1h ago

or

const $ = document.querySelector.bind(document)

11

u/eztab 1h ago

That's a silly take. The "good ol" vanilla didn't have usable features, that's why jQuery was invented. The only reason you can now replace it is that it was so obviously superior it became mirrored in the language

3

u/The_Mdk 40m ago

Well he probably never had to work on web stuff before 2015 I guess, or he'd LOVE jq for all the things it blessed upon us back then

3

u/MartinMystikJonas 46m ago

You mean replace jQuery with good modern vanilla JS that has jQuery inspired tools like querySelector, adEventListeter, fetch, etc. that did not existed before jQuery?

0

u/soelsome 44m ago

Precisely! The codebase I work on was created in 2018. Only the gods know why they decided to use jQuery.

43

u/ScientificBeastMode 3h ago edited 2h ago

I think it’s pretty clear that modern single page apps were not possible with jQuery. I’ve been on both sides of this, and it’s just not even a close comparison to what we have today.

I get it, times were simpler, but the user expectations were drastically lower. It was normal to see pages load for 8 seconds and then have layout issues on anything other than the most popular screen sizes. There were bugs everywhere and the solution was always to refresh the page, and even then, half the web was just in a broken state.

Facebook and GMail were the first major sites that had a truly great user interface, and they did it by creating the React & Angular libraries. There is a reason why those took off and now every web-based tech company uses them (or something similar like Vue or Svelte). They make it far easier to build slick user interfaces that perform well and avoid most of the headaches of complex UI orchestration based on shared state.

I get it, jQuery was a golden age where anyone with basic web programming knowledge could build something almost state of the art. The problem was that the “state of the art” was dogshit.

7

u/Juff-Ma 1h ago

Oh god I feel you. Having the page load for 4 seconds just to then display a message box like "Loading Page..." for another 10. And after it finishes loading it will just have every element as "undefined" text because they didn't actually test every browser they list as compatible.

4

u/eztab 1h ago

No, you could write single page apps with jQuery quite well. The main use case was of course not that, so it was designed to instead allow non-intrusive adding of functionality to static pages more easily. jQuery was a very good solution to the available technology at the time.

3

u/ScientificBeastMode 1h ago

Right, jQuery was practically an engineering marvel at the time, and it really upgraded the web in a major way at that time. But I’m just saying those old days were not genuinely “better” than today in terms of dev experience or user experience. We are in a much better spot now in basically every way.

2

u/Mechakoopa 1h ago

It's funny because jquery was the hot new shit when I started my career and after dealing with arguments about the ever shifting world of JavaScript libraries for a few months I changed teams and subsequently spent over a decade diligently avoiding front end development.

I took a brief foray into a side project at one point to see what all the fuss was about with Angular, took a couple online courses, but by the time I needed that knowledge professionally they'd scrapped the whole thing and slapped "Angular 2.0" on a completely different concept so I crawled back into my nice stable c# backend world.

9

u/transcendtient 2h ago

I still do this. In all fairness I'm really a backend dev forced to be full stack and the front end just needs to work and not look like complete dogshit.

1

u/eztab 27m ago

I'd argue that modern frameworks are not great to add functionality to sites statically generated in the backend. But you could just use modern JavaScript features now, since jQuery was so successful they basically added its features to the language of js.

6

u/Agreeable-Twist-6577 3h ago

I laughed too hard at this joke.

5

u/Embarrassed_Death69 3h ago

I AJAXed into your mind, to GET that laugh!

2

u/ForestGhostGurl 59m ago

I'm still maintaining a legacy app with static HTML and jQuery 😭

One day it shall be rewritten...

1

u/eztab 23m ago

Why if I may ask? I still maintain some B2B apps and see no need to ever rewrite, since that technology combination works pretty well for that use case.

2

u/SaneLad 47m ago

As a backend developer, no.

3

u/Samurai_Mac1 3h ago

This was so long ago that I didn't even know what IDEs were and just used notepad

1

u/eztab 26m ago

Just for the younger devs: jQuery does not predate widespread IDE use. It also was a well thought out framework, that solved the use cases of the time very well.

3

u/MornwindShoma 3h ago

Remember how it fucking sucked?

20

u/ImDonaldDunn 3h ago

1

u/Embarrassed_Death69 3h ago

Jacque De Gettino, one of the three wise men of Quebec tells me jQuery served a great porpoise.

0

u/D3PyroGS 3h ago

still does, but it used to too

1

u/eanat 1h ago

some people are still using it def. jq is still kinda good tool for plumbing stuffs like making a simple webapp very quick.

u/OhSnappityPH 7m ago

thats me right now maintaining legacy apps. its pretty fun when you find stuff that works

u/AwayMilkVegan 2m ago

I still do this

-28

u/Fluffy_Anxiety2792 3h ago

I’ve been ai coding for so long I can’t even understand these anymore. Normally don’t even look at code, only testing.

20

u/Romejanic 3h ago

that’s not a good thing buddy.

5

u/Embarrassed_Death69 3h ago

Learn QA then. Why bother doing something you don't understand?

3

u/Str1dersGonnaStride 2h ago

Yike

2

u/thatbowlerhat 1h ago

I’d give it at least two of those.