Hacker News new | ask | show | jobs
by osrec 3107 days ago
Disagree with this somewhat. I think jQuery still has a place in web app development, especially when you need something done fast. You just need to be careful not to over-bloat your js. jQuery has helped my team get stuff done really fast more than a few times in the last couple of months.
2 comments

Depends on the context, I guess. While working on a code base employing DOM manipulation it's absolutely fine. Having said that I would think long and hard before starting a new project with jQuery, and then probably used another library. There are other ways to get things done quickly, efficiently and in a way which promotes maintenance.
> I think jQuery still has a place in web app development, especially when you need something done fast

I never got this argument and am curious - what exactly does jQuery do faster?

I've left it behind for CSS animations and native Dom selectors years ago and haven't looked back.

It's certainly easier to just include JQ on an existing site and get to work for simple stuff, but I just deal with Angular now. Easy enough to get up and running with ngcli, and a year down the road the codebase won't look like the abortion which is loads of jquery.
To a certain extent I have left it behind as well, but jQuery does add an extra level of convenience that is well suited to prototyping (and even getting things done quickly in prod). One example is the each function that works on object properties. Getting that to work on an older browser without jQuery is a bit convoluted, but with jQuery it's easy. Not saying it's the only/best way to do it, but it is probably the easiest.
It's definitely less necessary than it was a few years ago.

I find it useful when you just want to add a little bit of interactivity to a mostly static page, and you're not sure who's going to be maintaining the page in the future or trying to use it as a template.

A lot of people who know a decent amount of HTML and CSS but aren't that familiar with straight JS dom manipulation, or what functionality works cross-browser, can tweak jQuery-based code more easily. That's really a tribute to the jQuery project--the documentation is simple and a lot of the methods (e.g., show, hide and append) are very intuitive.