Live data from Hacker News

Ask HN: Is jQuery on its way out?

news.ycombinator.com

21–30 of 60 posts

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

#21
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…

Actually HHVM had a huge impact. Having competition is always a good thing. It forced the devs to go into overdrive and improve the product.

What came out of it was PHP 7 and the gap closed significantly. There were even rumblings about a PHP JIT complier. So I would say the impact was a good one.

As for PHP growth, what's there to replace it? Golang, Exlir, Node, Crystal, Ruby, Python? They all have their own pros and cons.

With laravel being a great framework and much easier for developers to use rather than symfony. I would say the future of PHP has never looked better.

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

#22
Honestly, yeah. Whereas in the past I would reach for jQuery for low-effort "spicing up" of a webpage with javascript, now I reach for Vue. It's very easy to just include Vue in the header, plop down a bit of markup, a bit of JS, and you're on your way, plus it offers a bridge from there into a more full-featured Vue application. It's almost as lightweight as jQuery, and it's not work you have to "undo" later if you wanted to work towards a SPA or more-advanced functionality.

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

#23
post #12

It is quick and easy to access and work with the DOM using jQuery. Both React and Angular are heavyweight libraries that require a lot of bondage and discipline to work as intended. React is from and linked to Facebook and Angular is from and linked to Google. Both of these social media ad companies are broadly considered to be corrupt and potentially best broken up by force of law. There is not particular corporate…

> It is quick and easy to access and work with the DOM using jQuery

I think the actual medium-term risk to jQuery is not the heavyweight alternatives that you identified. It's that browsers are much better and providing standard and consistent API support for many necessary DOM interactions.

When I need a lightweight solution, I find myself using MDN documentation more often than jQuery documentation. For me, jQuery was much more about providing a single API that was usable across a wide array of browsers. That's less necessary today than it was a decade ago.

All that being said, I don't think jQuery will die out anytime soon. It still has a niche that it can usefully fill for a long time, and still has a ton of existing dependencies that rely on it.

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

#24
I use Vue[1], luxon[2], markdown-it[3], Vue Form Generator[4], and a localhost "backend" written in Go. (No browser-local storage, thank goodness.)

I started this project one year ago; Jquery never crossed my mind for it.

[1] https://vuejs.org/v2/api/

[2] https://github.com/moment/luxon

[3] https://github.com/markdown-it/markdown-it

[4] https://github.com/vue-generators/vue-form-generator

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

#25
post #16

I think jQuery is still a relevant tool for building dynamic websites—animations, carousels, pop-ins, etc. However, for building SPAs, jQuery has been eclipsed by Angular and React. And thank god for that, jQuery was always an ill-suited tool for the job. Even bad Angular applications are better than good jQuery applications, in my experience.

> I think jQuery is still a relevant tool for building dynamic websites—animations, carousels, pop-ins, etc.

I think that vanilla and CSS3 is a better option. Ten years ago there weren't the options. Now all browsers are up to speed and standards compliant there is not the need. It takes less time to learn how to do something properly the vanilla than it does to hack older jQuery code into shape for one's own use case.

If I do something the vanilla way I feel as if I have learned something. When copying and pasting some jQuery module I don't get that feeling.

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

#26
I think for creating a messy Proof of concept, or creating a simple tool with minimum UI and complexity, I will always be grabbing JQuery. It's just so simple and I've got all of it memorized for so long...

Which makes me curious, actually, how basic can you get with Vue and React? I only know the large "boilerplate" versions with Redux and bells and whistles. Anybody prototyping on React/Vue/Angular?

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

#29
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…

Even if most people don't use HHVM, I claim it increases use because it allays fears about what happens if your project / company does need scale.

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

#30
The best advertisement for jQuery, ironically, is this site: http://youmightnotneedjquery.com/ Look at how simple things are in the left column, and how much more code is needed in the right column.

jQuery has many convenience features such as chaining, for example: item.addClass('selected').siblings().removeClass('selected'); and you don't have to check for nulls after each selection.

Many functions such as closest() and remove() have no equivalents in IE11, and other things such as replaceWith() and before() are not available even in Edge.

For simple sites it is easy enough to remove jQuery, but for more complex javascript applications, especially apps that have a lot of interactivity, removing jQuery will result in more code, or you will end up writing a lot of utility functions thereby creating your own little clone of jQuery.

Post reply on HN