Live data from Hacker News

jQuery 4

blog.jquery.com

271–280 of 313 posts

Re: jQuery 4

#271
I remember the first time I tried jQuery -- which was 2009.

Before jQuery, I had vanilla JS code that factored in Safari, Firefox, Opera... and... IE6, IE7, and then IE8 which was (from memory) recent at the time.

Trying to design a visual drag n' drop editing interface on the web was a chore at the time especially with the differences in IE browsers! It was suprising how many customers were still using IE6!

A lot of this is purely by memory, now. I even have shivering memories reminding myself I was using VB.NET with ASP.NET Web forms. I really HATED it!

I remember ASP.NET provided dynamic web pages with things like Placeholder tag, etc. Again, It felt bloated even back then but I made it work. It was a balance of using what was recommended by other developers, and trying to ensure performance is good.

By around end of 2009, I tried jQuery as an experimental branch and very impressed with its capabilities. Despite being a decent Javascript developer at the time I was inexperienced with AJAX (Technically I was a Junior dev in ways) but jQuery shows me the way. It was not long before I ditched certain features of .NET Web Forms for jQuery.

At the time, there may have been a little overhead replacing various javascript code I am written with jQuery but the rewards were high. It was cleaner frontend and backend code, thanks to simple AJAX calls.

Since then I've always had huge respect for jQuery! While I don't consider myself a decent javascript as I don't use it much. However, when I do come back to web development, I cannot be asked with the modern ways. To me it's bloat. I just stick with htmx, now. If I have do some fancy things visually then I will use jQuery.

Re: jQuery 4

#272

For the record, JQuery is NOT to blame for the so called spaghetti code. Most people seem to blame JQuery for their own short coming. Most people also do not seem to understand the genius that was contained in JQuery. See " http://eyeandtea.com/crxcmp " for an example of what could already be done with JQuery in the IE8 era. A lot of the things later invented in the browser were to mask these shortcomings instead of…

Dont get me wrong - I really like and appreciate your comment.

However, and adding to other replies, by SDL I assume you mean the Simple Directmedia Layer?

SDL looks rather strong from my perspective and still my typical goto when having fun making a game. You could argue SDL lost some customers in favour of other libraries like RayLib - or moving away from making things from scratch to Unreal, Unity, etc.

SDL still seems popular - as SDL version 3 was officially released less than a year ago (or it feels like it) However, I guess it depends what you need to do.

Re: jQuery 4

#273

What is the usecase for this in the age of React, NextJS? And for static sites we have Astro etc. And even if you need something simple why use jQuery? Vanila JS has better API now. Am I missing anything?

Hobbyists don’t want to learn every new framework. Someone can have a small business website for their activity and have been happy using jQuery since 2010.

Got it. Maintenance of Legacy websites is a big chunk of internet.

Re: jQuery 4

#274
JQuery is cool because it does not try to replace the HTML. Progressive_Enhancement / Graceful Degradation is possible with jQuery, something which the new Frameworks, Svelte, React, etc., have forgotten / never learned.

Re: jQuery 4

#275

For the record, JQuery is NOT to blame for the so called spaghetti code. Most people seem to blame JQuery for their own short coming. Most people also do not seem to understand the genius that was contained in JQuery. See " http://eyeandtea.com/crxcmp " for an example of what could already be done with JQuery in the IE8 era. A lot of the things later invented in the browser were to mask these shortcomings instead of…

> JQuery already had a feature that rendered the shadow DOM unnecessary, but it would require discipline that most developers did not have nor understand.

Could you explain this please?

Re: jQuery 4

#276

JQuery is cool because it does not try to replace the HTML. Progressive_Enhancement / Graceful Degradation is possible with jQuery, something which the new Frameworks, Svelte, React, etc., have forgotten / never learned.

Vue can do progressive enhancement.

Re: jQuery 4

#277

Earlier quoted context omitted.

How is it overly verbose? I find it very intuitive, with the exception of useEffect.

React: import { useState } from "react"; function Counter() { const [count, setCount] = useState(0); return ( setCount(count + 1)}> Count: {count} ); } ---------- Svelte: let count = 0; count += 1}> Count: {count} --------------- React: function Editor({ initialText }) { const [text, setText] = useState(initialText); useEffect(() => { setText(initialText); }, [initialText]); return ( setText(e.target.value)} /> ); }…

Seeing Svelte 3/4 code always warms my heart. The ergonomics of `$:` are amazing.

Re: jQuery 4

#279

Earlier quoted context omitted.

https://rxjs.dev/guide/observer

True but rx was even more niche than redux. It was much easier to hire redux devs

you got to the crux of it. Redux became a trend, surfing on its popularity at a time React wasn't providing the reactive piece it needed, plus the time machine demo just amazed everyone. The author got his job at Facebook. It carried millions of developers to use that lib, the author even said it isn't necessarily the go to mechanism, but hiring manager stuck with the idea that all projects redux magicians, since all projects needed React.

For the anecdote, I remember my manager admitting we can't fix the legacy app, but we can put lipstick on the pig with React.

Re: jQuery 4

#280
post #265

Earlier quoted context omitted.

> You upgrade the libraries your website depends on, or add a dependency, and this new code happens to depend on that native prototype. Only you replaced it with your custom method, and that method likely doesn't have the exact same behavior. You broke that new code and fixing this might not be trivial because uses of your custom method are sprinkled everywhere in your code. He was suggesting adding a prototype metho…

I'm discussing the "adding a prototype method" case and I'm explaining in my comment why this can be, in fact, an issue.

Thanks for the feedback. But you did recommend a method that takes the node as a parameter. What protects me from that method name being claimed by some library later in the exact same way?
Post reply on HN