4 ms·
Although the comparison isn't perfect, you can think of jQuery as PHP in the late 90s and early 00s. PHP made web development accessible to the masses. Becau
by donw 10y ago
Although the comparison isn't perfect, you can think of jQuery as PHP in the late 90s and early 00s.
PHP made web development accessible to the masses. Because PHP is embedded in the HTML itself, it is way easier to work with than Perl or Java, especially in the context of The Web In 1999.
In the same vein, jQuery filled a very important niche when the web was just getting started. It made Javascript accessible, by smoothing out the differences between browsers, and by providing a useful set of abstractions over the mountain of quirks that is client-side Javascript.
Most importantly, jQuery made hard things that people wanted to do stupidly simple.
But in 2016, there are fewer differences between browsers, and more importantly, our knowledge of How To Build Software has massively improved through lots of trial, error, and iteration.
And things that used to be really hard in Javascript are now a lot easier, thanks to improvements in browsers, languages, and tooling... well, the tooling still needs work, but that's a different discussion.
The world that jQuery served no longer exists, and it has largely been replaced by more effective abstractions. It will never truly go away, but neither will it be the choice for most people that are looking to create something new.
- dispose13432 10y ago>PHP made web development accessible to the masses. Because PHP is embedded in the HTML itself, it is way easier to work with than Perl or Java, especially in the context of The Web In 1999. PHP didn't make it easy. It made it possible. Until fairly recently, getting a VPS was insanely expensive, so any learner, hobby, startup went to shared hosting. As a result, any tech which required starting servers or elevated permissions was out, so Java and ISAPI (remember that?) were out. So the only choice was PHP/ASP or perl/C/tcl cgi scripts. cgi scripts had to be located in the /cgi-bin directory, so they looked ugly in the URL and simply wasn't designed for the web (so no url_parsing libraries (but no register_globals!)) and no git/github/blogs/stackoverflow whee to just go and download them. So one had a choice between PHP and ASP. ASP costed quite a bit more for the license, so PHP took over the internet.
- kalleboo 10y agoCGI scripts were also a lot harder to secure on shared hosting. I remember the hosts supporting them required security review before being installation. Then PHP came along with safe_mode and open_basedir, and if there were commonly-deployed solutions for CGI after that, I sure didn't see them because everyone was already using PHP.
- dispose13432 10y agoI was lucky. I was able to upload cgi myself. It was just too much hassle for little gain (whatever security exploits you'd get in PHP, you'd get writing your own C code). Oh, and how can I forget, mod rewrites were a terrible pain, so if you wanted your website to be dynamic (so you can have, say, your login name at the top corner), you'd have to make your website look like http://www.example.com/cgi-bin/main.pl?url=/directory/page5 http://www.example.com/cgi-bin/main.pl?url=/directory/page5
- 500carrots 10y agoNo. You could give CGIs any filename, in any directory, on many shared hosting environments in the 90s. I know because I did it. Some shared hosting providers allowed persistent processes. Also, in the 90s, many small businesses self-hosted on tower PCs connected by fractional T1s. Many hobbyists self-hosted on dorm Ethernet (which had publically routed static IPs then) or got a corporate network administrator buddy to give them bootleg colocation. PHP was successful because it was embedded in the HTML which lowered the barrier of entry. That's the only reason.
- dispose13432 10y ago>Also, in the 90s, many small businesses self-hosted on tower PCs connected by fractional T1s You were lucky you weren't on a 14.4 kbps modem sharing a phone line with the family, on a dynamic IP, and had an extra PC to devote to hosting a website which could stay on 24/7. Oh, and weren't scared that someone would hack into your home network just for fun. > Some shared hosting providers allowed persistent processes Most didn't. > PHP was successful because it was embedded in the HTML which lowered the barrier of entry. That's the only reason. No. That's not the _only_ reason. Right now, unless $5/10 a month is too much, you can get root on a VPS on DO. How much did these features cost back then?
- dispose13432 10y ago>PHP was successful because it was embedded in the HTML which lowered the barrier of entry. That's the only reason. JSP also allowed Java code in HTML (The new syntax came later). Yet, it never took off (though being a memory hog back then definitely didn't help it).
- aindhaden 10y agoThere were a few CGI script websites around, like Matt's Script Archive and his (in)famous FormMail.pl. There were also URL libs, eventually, as well as other CGI-specific tools, like counters, banners etc. You are right that PHP was the logical simpler choice, and it did take off in the second half of the 90s. But for the best part of the decade the web was built on CGI. I would argue that the CGI era was a good one. Writing a CGI required low-level knowledge of HTTP, HTML, how web servers worked, and very likely knowing your way around a UNIX system. Solid skills, that are still useful today, marked a high bar which raised the overall level. Furthermore, the nature of CGIs made for better architectures. Simple entry and exit points, dedicated services. Connecting them to something else required careful consideration. They made you gravitate naturally towards KISS, REST and other best practices which are still observed today. I would also add that there were several other hobbyist fields popular at the same time, like MUDs (usually built in C) or IRC servers/clients/bots (also Perl/C/TCL) to name just a couple. Knowledge gained in one of them lent itself fairly easily to another.
- Eric_WVGG 10y agoI apologize in advance and mean no disrespect, but I think this analogy is terrible. PHP was browser-agnostic. PHP was a flawed tool that existed alongside other tools, and survived based on various merits and despite various drawbacks. jQuery was a life preserver. Javascript is wholly browser dependent, and at the time of its inception, browser compatibility was a jungle full of king kongs and velociraptors. Before jQuery, your javascript might work. With jQuery, it would work. Since then, browser compatibility has gotten better, and the language has advanced. Much of what was previously speculative has become basic. Pour one out for jQuery, but don’t feel sorry for it’s demise; be grateful for where it brought us.
- aindhaden 10y agoI'd like to point a possible flaw in your counter-argument: jQuery wasn't the only choice and it wasn't the first. PrototypeJS, which came before it, did an arguably better job since it didn't have many of jQuery's design flaws, like hijacking 'this' or silent selector errors. The PHP analogy is therefore spot on IMHO: both it and jQuery (and I'd like to throw MySQL in there while we're at it) were tools that achieved success by lowering the quality bar in exchange for feature abundance and "if it works why do you care how".
- Eric_WVGG 10y agoI overlooked the fact that PrototypeJS was first (in fact, I was one of the unfortunates who backed that horse), but I still disagree. I don't think the jQuery lowered any kind of quality bar, it made absurd and redundant work irrelevant. If you're referring to those legions of people who "don't know javascript, but know jQuery," without jQuery they simply would have been lousy javascript developers instead of lousy javascript developers, that doesn't change anything.
- dahauns 10y agoYou bring up prototype of all things as an argument for having less design flaws than jquery...sorry, I really don't want to sound snarky, but that made me chuckle. Their moronic choice of directly extending the DOM was a more fundamental and far-reaching flaw than any of the - definitly numerous - problems and bad choices jquery has and had in the past, and it's one of the reasons it's has all but vanished for years now.