3 ms·
The one that makes everyone's lives easier: jQuery. Its not sexy, but it gets the job done for pretty much everyone.
by hayksaakian 14y ago
The one that makes everyone's lives easier:
jQuery.
Its not sexy, but it gets the job done for pretty much everyone.
- gbog 14y agoI did prefer prototype.js in the time of ol'. Never understood why jQuery took over it, sadly.
- JungleGymSam 14y agoI think it was because of the lack of documentation. Back then prototype had none and jQuery had a lot. They had a rich site and prototype had a single spartan page.
- gbog 14y agoThis is not what I remember. I even have a printout of the full prototype doc hidden somewhere, it had clean and straightforward explanations for all the API. Scriptaculous, built upon prototype.js, was nice too.
- wwweston 14y agoMy guess is that jQuery targeted and solved a problem that was bigger for a broader base of people doing JavaScript development: the DOM API (and some other browser APIs) was both pretty awkward and inconsistent. Prototype.js seemed to be targeting the problem of providing a familiar class system, standardizing some functional features, and some utility functions. It was something else, and I loved experimenting with it and reading the source, but ultimately, I think fewer people were finding this to be their pain point with the language or that using it made them significantly more productive. Of course, considering the fact that they seem to solve different problems, it may be an interesting question why they were fighting for mindshare in the same space.
- darkchasma 14y agoI never looked that close, but I thought that prototype extended the base objects with the prototype property? If this is the case, then it wasn't a great idea. Meta programming is acceptable when you control the compiler or spec of the language, but as ECMA specifications move forward, and those functions are added, you'll get conflicts. And you can't control what browser is interpreting your javascript. Maybe I just didn't understand it well enough.
- gotofritz 14y agoBecause Prototype does what the name says, i.e. pollutes the prototype chain. Also, Prototype tries to monkey 'classical inheritance', whereas jQuery encourages chaining, which obviously people like more.
- sandis 14y agoI'd say jQuery is pretty sexy for what it does. That's one of the main (if not the main) reasons it took off.
- hayksaakian 14y agoI was referring to the underlying code in jquery.js and all the hacks required to make it work in most browsers. You do have a good point though
- illyism 14y agoI always preferred to use MooTools http://MooTools http://MooTools net because it felt lighter than jQuery and the code you write is often less-hacky and sexier.