Live data from Hacker News

Ask HN: Is jQuery on its way out?

news.ycombinator.com

41–50 of 60 posts

Re: Ask HN: Is jQuery on its way out?

#41

You forgot to mention Vue. ;) I would say it's done. ES6 javascript replaces a lot of its functionality as well. I switched from jQuery to Vue/ES6 (last March) and would never contemplate switching back. The difference is like night and day. The next stage I'm thinking about is moving over to TypeScript for more productivity and safer development.

> The next stage I'm thinking about is moving over to TypeScript for more productivity and safer development.

Check this out if you haven't already:

https://github.com/Microsoft/TypeScript/wiki/Type-Checking-J...

Even if without any annotations, type inferencing can catch some bugs for you.

Re: Ask HN: Is jQuery on its way out?

#42
There will always be a use for jQuery. Just not every use. If you're looking to make simple, imperative changes to the DOM in a web page, and not worry about what browser it's happening on, it's still the go-to choice.

Yes, you can use the native API for some of what jQuery does. but, don't let anyone here fool you - the full API of jQuery has not been completely replaced by the "vanilla" API. And, jQuery's API is still much better designed.

Now, if you're building something Very Large, you don't want to lean on jQuery alone. If you're using a framework whose footprint includes what jQuery does (anything with a virtual DOM and automatic updates, for example), then there's no point in also using jQuery.

There's room for all of the tools. Use the right one for the right job. Do enough front end development, and you'll know which one to pull out when you need it.

Re: Ask HN: Is jQuery on its way out?

#44
I still use jQuery and won't be ditching it anytime soon.

End users don't know or care if an app uses it or React/Angular/Vue.

I've built SPAs with it and don't see why that's a problem for others who've mentioned it, but that's because I don't know what specific problems they ran into. I've not run into any.

But, I also use CouchDB as a backend, almost all my app code is JS running in the browser, and I don't use Node.js at all. I still do my server side work in Perl. So I'm not building apps like most are right now.

React/Angular/Vue, etc, might work better for some apps, and/or apps with a zillion users hitting the server a zillion times, but my apps don't have either of those issues to deal with. They barely touch my web server or the CouchDB. All the heavy lifting is done in the user's web browser.

The only real downside to that design approach, if we choose to call it that, is that we don't track every click a user makes, but as a user I really like knowing that.

The best thing about going with jQuery is I didn't really have to learn how to use it. I do that on a need to know basis and generally go to Stackoverflow where I almost always find the best way along with a few other ways to do something.

I'll offer that using a "much smaller, lighter weight library" offers a kind of a false sense of gain. You can use Service Workers to cache jQuery on the client side, or a CDN to deliver it, so it's not really costing you much (or any) bandwidth to deliver it to users, and modern web browsers are not choking on the size of it. I test my apps on a old Raspberry Pi running their latest OS and Chrome and they're plenty fast (very fast).

Here's the thing. I spent about two months looking for the "Best" way to build apps. Most of that time was going over frameworks at TodoMVC.com. When I was finished I didn't have any better idea of what was best than when I'd started, but I did have a clue about what I'd have invest to get up to speed with them, and in most cases it was lot.

So, I decided to instead explore what was the easiest way, and not just for me really, though I don't expect anyone should agree, but just generally speaking I tried to consider that.

I use the Apache web server and CouchDB, PouchDB.js, jQuery, and Bootstrap. It's a pretty amazing feature set those tools provide, and how easy they are to use together.

Almost no one I know does it this way.

Re: Ask HN: Is jQuery on its way out?

#45
Actually I still feel jQuery is still an amazing lib (and philosophy) precisely because it is not an all or nothing tool. I recently (as a non webdev) found myself overwhelmed with react/vue. I simply chose to go jQuery with decent modularization of components and got the job done. Now yes my "modularization" will asymptomatically look more and more like React as I consider the more and more usecases that React supports, but the learning curve is pretty for me.

Re: Ask HN: Is jQuery on its way out?

#46

Jquery still strikes me as being much faster to get up and running than react. Is the issue it’s speed compared to vanilla js?

jquery is something you can throw in quickly onto a page and have a few useful helper functions.

Not everyone is building web applications, sometimes we just want a simple tool to do a single job.

Re: Ask HN: Is jQuery on its way out?

#47
post #18
post #11

Not a perfect analogy, but PHP was on its way out for a while and probably would have gone all the way out -- if it had not been for one very high-profile company that essentially made it usable at scale. And the reason it did so was because even though PHP had little cachet, it was easy to hire PHP devs. Similarly, there are now a lot of things you can achieve with vanilla JS (or even vanilla CSS) that you used to o…

I would argue that Facebook's work had little impact on the "scalability" of PHP. I don't see people adopting HipHop (HHVM) in huge numbers. The problem with PHP was it's standards body wasn't doing a good job of keeping the language consistent and it lacked a package manager where Ruby, Python and Node all had solid standards bodies and it was driven by having package management. With Composer that changed and it ap…

>it's not a concurrent system. It's blocking and that's a problem for modern Web languages.

PHP has had async for a while (https://reactphp.org/) and more recently an extension (https://www.swoole.co.uk/) had brought PHP async to equal or better performance to NodeJS (https://gist.github.com/nkt/e49289321c744155484c)

I recently started working with NodeJS more intensively (heavy lifting for dozens of microservices for complex app/data). While there are many nice features NodeJS has, most people don't understand what PHP can do. In my opinion PHP is superior for many backend application and the "snob factor" is one of the reasons it's not more known beyond wordpress.

Re: Ask HN: Is jQuery on its way out?

#48
post #44

I still use jQuery and won't be ditching it anytime soon. End users don't know or care if an app uses it or React/Angular/Vue. I've built SPAs with it and don't see why that's a problem for others who've mentioned it, but that's because I don't know what specific problems they ran into. I've not run into any. But, I also use CouchDB as a backend, almost all my app code is JS running in the browser, and I don't use No…

Amen. It sounds like you have a good toolset to me.

Re: Ask HN: Is jQuery on its way out?

#49
Becoming good at jQuery is reasonably quick and easy. If you have a use case for it, Yes! Why not? (ex: legacy stuff)

Is it a valuable skill? Well, probably not! But not because of React or Angular, only because being good at jQuery is easy. Which makes it a less valuable skill and that is why I said if you have a use case for it.

Not to mention, a big part of jQuery success was the short learning curve. While simplicity is its strong point, it is also what makes it less valuable as a skill.

Unlike back-end technologies, front-end technologies have a shorter lifespan. Because of all the design evolutions, redesigning, and front-end optimizations and refactoring which is more accessible and less resource hungry for many businesses. So keep that in mind that probably you are not going to use jQuery in any customer-facing new project.

Re: Ask HN: Is jQuery on its way out?

#50
post #11

Not a perfect analogy, but PHP was on its way out for a while and probably would have gone all the way out -- if it had not been for one very high-profile company that essentially made it usable at scale. And the reason it did so was because even though PHP had little cachet, it was easy to hire PHP devs. Similarly, there are now a lot of things you can achieve with vanilla JS (or even vanilla CSS) that you used to o…

Wordpress is a big reason a lot of people will still use PHP. Also Wikimedia to some extent.
Post reply on HN