So many Javascript libraries…

Having spent two evenings looking at Javascript libraries and not being able to decide which to use (there’s so many of them!) I’m going to throw the question open: which Javascript library do you use and why?

I’ve looked at Prototype, Dojo, Mochikit, JSQuery… they all seem to imply they’re the best and yet do the same things as other libraries. I’ve heard stories about prototype polluting built-in Javascript something-or-others which does put me off. But enough of my views - what do you think?

What am I trying to do?

My goal might have some bearing on the question I guess ;) I’m retro-fitting an old template driven site with a way to specify unique page titles and meta tags and want an ‘edit’ button on each page visible when logged in as an administrator, which when clicked on will open an inline window (or modal window as they’re properly called) and allow me to edit these fields.

There’s also other parts of the site where inline editing would be very useful, for example the photo gallery captions and descriptions.

So far I’ve seen Prototype-based code that would do these, but its style of programming leaves me cold. And for the above fetching the modal window contents via XHR would be fine, but I also want to add a modal window to move images from one category to another. The number of categories in the gallery would make fetching the window contents via XHR very slow (as you’d have to transfer ~200 categories every time). I suppose the best option is to use a hidden div in the HTML page for the window, which means crud on the page.

As you’ve probably noticed I’ve made no mention of how this should degrade. That’s intentional, as I’m the only person using this application and I’m trying to keep things simple(!). Although if the libraries you can recommend would help with this, so much the better :)

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment