Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask YC: jQuery vs Prototype
3 points by martythemaniak on March 31, 2008 | hide | past | favorite | 7 comments
I'm curious what people here use for their projects, especially ones making heavy use of javascript.

I recently started doing a lot of JS and found prototype to be a lot more useful. I've used jQuery only a little bit, but Prototype v1.6 seems to be able to do everything jQuery is good at (DOM traversing and manipulation) and has other useful things like a extended arrays, hash maps, ranges, classes/inheritance etc.




jQuery. I don't need classes and inheritance (I use closures for pretty much everything you would use a class for, and on the occasions that I do need either classes or inheritance it really isn't that much trouble to roll them from scratch) and philosophically I much prefer jQuery's approach of only adding one global symbol to my namespace v.s. Prototype adding global symbols all over the place.


Side thought:

The web framework that I use (Weblocks) is built on prototype, but it only uses a small subset of the code with no reason to send 120K (uncompressed/unminified) over the wire. I think the next step is to use a code coverage tool to strip out all the unused code, which is a project I'm hoping to get a little time on soon. This should (back envelope calculation) reduce it to less than 25K.

jQuery also plays well with Prototype, so, with stripping, I'm hoping to try using both. Best of both worlds?


I'd love to see this for prototype. Let us know if you ever get around to it.

Mootools lets you do it; you can even choose the type of compression you want (although I prefer to minify things myself): http://www.mootools.net/download


been discussed before. won't get into the gritty details of one versus the other. you can find those via some google searches on HN or on the web in general. here's a start for you: http://www.google.com/search?source=ig&hl=en&rlz=...

but to add some value to the discussion with my post, i'd like to show you some metrics. usage numbers have them essentially tied, when last year prototype was far in the lead. http://ajaxian.com/archives/nitobi-survey-results-on-ajax-de...



We use Proto/Scripta simply because it has better integration with Rails. I do like jQuery's syntax, however.


I use jquery because it's easy and a lot of plugins




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: