Hacker News new | ask | show | jobs
by alfredxing 2945 days ago
I agree jQuery was very useful early on, especially since it abstracted cross-browser differences and APIs.

However in my experience, a couple of things were key to creating a negative view of jQuery:

1. Security and unsafe defaults, for example: evaluating remote JavaScript by default [1]; and unsafe DOM parsing by default [2]

2. Not really to blame on jQuery, but its ease of use for DOM manipulation led to programming patterns that aren't easily scalable, for both code and performance

[1] https://nvd.nist.gov/vuln/detail/CVE-2015-9251 [2] http://api.jquery.com/jQuery.parseHTML/

1 comments

To be fair, when jQuery was growing up PHP with magic auto global variables was the fury.

Times were different

I think by 2006 magic auto globals was already off by default (4.2, which was released in 2002, was the one that turned it off, and though 4.2 was still widely used by the time jQuery came about, register_globals was considered bad practice in general by at least 2004, if not even earlier).
good point. Your timeline is accurate, and while PHP installs tend to be out of date and people following tutorials would just turn off security features, by 2006 the trend should have been in decline, yes.

More than anything, the crazy thing for me is that jQuery seemed to have been there from the wake of the web, when it came out only one year before the iPhone.