Hacker News new | past | comments | ask | show | jobs | submit login

I did my last small project with vanilla js and the ugliness of the native APIs reminded my how lovely jQuery is.

Do the maths - if the file size isn't a problem then go for it. Life's too short to be the victim of fashion.




Although jQuery does seem less popular as a choice for new projects nowadays, I'd like to chime in to agree here (not to knock Bootstrap; it's good that they're staying current with their developer ecosystem).

Given appropriate element names and classes, jQuery and CSS selectors can provide a straightforward and readable way to express application behaviours, and it's a well-proven and stable project at this point.


There is very little functionality JQuery offers that the modern browser DOM API doesn't provide with more robust performance.


Yeah, this is what some commenters are missing. The real alternative to jQuery isn't some fancy new framework, it's just... plain JavaScript.

Things have really gotten much better in the vanilla world. Although some things remain more verbose or cumbersome than jQuery alternatives, you really don't need a whole layer of abstraction to handle the simple tasks jQuery was designed for any more.

Unless, of course, you care about IE...


jQuery somehow gets abuse for being more bloated and slower than vanilla js despite the fact that almost nobody is ditching jQuery for vanilla js and instead running to vastly slower and more bloated SPA frameworks.


Did this comment onwards miss

"I did my last small project with vanilla js and the ugliness of the native APIs reminded my how lovely jQuery is" or am I seeing wonky here


Yes, but the native APIs are a PITA.


At they? I don't write much js but always found the native apis to be the quickest way to implement functionality when I need to


Yes, nearly every native API is uglier/longer/more inconsistent than jQuery equivalent.


not like they used to be, youngster*

* veteran of the original browser wars


So is jQuery imo, especially the nonsensical argument order for iteration.


HackerNews is back on this debate I see. Look, I still use jQuery, mostly because I comfortable with it. If I am doing a small side project or an MVP that doesn't need heavy JavaScript then why would I configure all that JavaScript tooling when I can just use something I am comfortable with? I hear, but jQuery is heavy. I wonder if any tests have been done to see how much that ACTUALLY matters. Is the difference between react and jquery file size that much? And does it actually matter? I don't think most people who drop the "its bigger" argument know the size differences, let a lone the impact. It's just a nice trope nowadays. But please link to something to educate me.

With that said, I do use the modern vanilla js api from time to time. It's gotten better. There are still some things that aren't great, but it's fine. I use it a lot when working in puppeteer actually.

But back to jQUery. If I need to add some interactivity to a site and I know some jQuery plugins. I just use that. I did it for an entire MVP just recently. I know if it takes off all that frontend work I did will be replaced. Great, jQuery (but mostly just plain old school web dev) got me there without the need for an over-engineered tooling ecosystem. I've watched people struggle with slick new shit on MVPs before. I'm already iterating on my product and testing new hypothesis.

If you are more comfortable with the newer stuff then you should use that. If you are more comfortable with jQuery you should use that. If the product you are developing specifically needs or doesn't need one, then go with what the product needs.

Edit: Also this about BootStrap. I love it, also makes my life easy for MVPs and backends. Keep going strong bootstrap!


Amen!! It reminds me of the people who used to talk down on devs who use Java, C#, Python, and basically any language that isn’t C++ “because it’s more efficient” and all the others are “terrible and bloated.”


Second that, I am also in this stage of life where having a good sleep is more important than having a pure code. Some annoying platform-specific bug is not fun any more, especially if it was solved many years ago by someone else, so yay to jquery!


Seconded. $(document).ready(fn) is far more easier and comprehensible than document.addEventListener('DOMContentLoaded', fn, false).

Even if I'm aware of the latter, I refuse to use it when former is available just for the sake of being "PureJS trendy".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: