Search code examples
javascriptscriptaculous

Why would I use prototype.js with scriptaculous.js... What's the main reason?


Why would I want to use prototype.js with scriptaculous.js? What's the main reason? When would I need both libraries and when wouldn't I?


Solution

  • I've used prototype for quite some time, and scriptaculous with it ; I now use jQuery on some projects, Mootools on others, and prototype on others...

    Why do I use a JS Framework ?
    Well, three main reasons :

    • They provide lots of stuff I do not want to re-develop by myself
    • They are well-tested ; more than my own code would be
    • They provide a layer of cross-browser-compatibility (And I prefer having a framework that deals with that, instead of having to fight this war by myself !)

    As for which JS Framework you should use, that's another question - it's entirely up to you ^^


    When including prototype.js and/or scriptaculous.js :

    • prototype.js : on any page that needs some JS stuff (most pages generally)
    • scriptaculous.js : at least on pages that require effects like drag'n drop, autocompleter, etc...

    Same thing with other JS frameworks too, btw...