POSTS

Javascript Framework Wars or Why Can't We All Just Get Along?

I don't understand why Javascript frameworks have to have a "my way or the highway" mentality about them. I love Mootools. Nice, simple, very compact (36k for the full version with documentation if you gzip it), promotes OO code, but it doesn't play well with others.

I use Selenium to create tests for web applications. It allows you to record a series of actions, then replay the actions again and again later to make sure nothing's broken. It's a very, very useful tool, but it uses Prototype which doesn't get along with Mootools. Basically, the second Moo is loaded, Prototype freaks out and takes Selenium down with it.

The solution is pretty easy. Javascript makes namespacing easy with little overhead. It'd be so easy to have Moo.Ajax and Prototype.Ajax so they could work together without issues. As Valerio righly pointed out, having to prefix everything with "Moo." is pretty redunant, but you add in a CompatibilityMode that's off by default. It gives those of us who like to mix our frameworks the ability to do so by adding additional code and doesn't change anything for those who don't care.

I won't go so far as to say it's arrogant on the part of the framework developers to assume that they're the only thing I'll ever use, but by not playing well with each other they sure limit their usefulness.