Please consider donating: a local project in memory of my daughter

Prototype and jQuery - going from one to the other

During a conversion with John Resig at the FOWA he mentioned it would be useful to have a tutorial that explained what jQuery doesn't do that Prototype does and visa versa, and in particular how X process is done in each library.

Below you can find the presentation I put together that goes through the core of both libraries and gives you a process by process comparison, explaining how to achieve each function in each library.

Prototype & jQuery

You can also download the Prototype & jQuery slides (mirror)

The slides should pretty much talk for themselves, but I welcome any feedback or questions you may have.

6 Responses to “Prototype and jQuery - going from one to the other”

  1. Great work! One slight change: Slide 12 says that Prototype uses
    Event.observe(window,'load',function{});
    but Prototype 1.6 uses
    document.observe('contentloaded', function {});

  2. That's the last time I use slideshare.net. I've got a few feedback items from Ajaxian and John (above), so went ahead and updated the slides.

    The embedded object (in this page) points to the updated slides, but now the URL on slideshare.net is completely dead - and I've found someone else with the same problem 6 days ago - and they're still dead.

    Worse still, is the slides seem to only update a few of the changes. It's like slideshare.net are comparing each slide and updating it if appropriate. The result is slide 9 should have been updated with $$('.dialog').invoke('show') and it's not updated.

    Very frustrating.

  3. Random. It's back again, and all the sides have been updated properly. I did a little complaining, but they said it was a coincident that it was back. Oh well, rant over...perhaps I might use them again after all.

  4. [...] Remy sharp has made a presentation about comparing JQuery and Prototype Javascript Framework, the presentation comparing utility functions, selectors, DOM manipulation, DOM walking, events, Ajax transport, and browser detection functionality between jQuery and Prototype. below is the presentation slide. [...]

  5. [...] one I found on remy sharp’s b:log which is quite good comparison between the two popular Java Script libraries.In 25 slides it shows [...]

  6. I've seen what you was shown, but still wanting to write these two things, which keep being problem for me:
    1. Protype's Ajax Object supports automated (periodically) Ajax request (Ajax.periodicalUpdate), where JQuery's Ajax Object doesn't. This adds point for Prototype.
    2. On event handling, JQuery allows to use both $(function(){$('tagname').click()}); and together, where Prototype doesn't.

    Or has something been changed and ready to download?

Leave a Reply
Not required

CODE: Please escape code and wrap in <pre><code>, doing so will automatically syntax highlight