Hacker Newsnew | comments | ask | jobs | submitlogin
hayksaakian 426 days ago | link | parent

The one that makes everyone's lives easier:

jQuery.

Its not sexy, but it gets the job done for pretty much everyone.



gbog 426 days ago | link

I did prefer prototype.js in the time of ol'. Never understood why jQuery took over it, sadly.

-----

wwweston 425 days ago | link

My 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 425 days ago | link

I 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.

-----

JungleGymSam 426 days ago | link

I 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 425 days ago | link

This 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.

-----

gotofritz 425 days ago | link

Because 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 426 days ago | link

I'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 426 days ago | link

I 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 425 days ago | link

I always preferred to use MooTools http://MooTools net because it felt lighter than jQuery and the code you write is often less-hacky and sexier.

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library

Search: