Subscribe to this feed
Mar
14

Why Not To Exclusively Use One Javascript Framework

posted under industry lampooning, web projects

Since I began using Ruby on Rails I’ve never really thought of using any other javascript framework except the standard Prototype/Scriptaculous pair regarded as the rails standard. I mean, who could blame me, with all those JavaScriptHelpers and fancy RJS templates to entice you. But, don’t get suckered it by these mere facades, as a result, your application may suffer. I’ll explain…

While programming some additions to my photo hosting application, 72photos, I found the need to add functionality that was particularity difficult to do in Prototype. I’ll spare you the actual details, but as a result of this conundrum, I turned to another Javascript framework, which was, what I believed was the enemy, until now…Mootools. Sure, I heard the hype surrounding mootools of late, however, my loyalty to Prototype/Scriptaculous clouded my judgment to explore it more throughly. When I decided to give a decent look through mootools documentation, I noticed it’s very elegant syntax and it surely made more sense in areas such as event handling.

Where am I going with this exactly? Well, If you’re currently loyal to one Javascript framework and it works for you, I’m not suggesting to break out of your current comfort zone. However, I wouldn’t suggest putting aside features or avoiding them because your framework doesn’t support what your trying to do or would take more time then desired to implement. There are other options and I advise you have a look around regardless. Theres no problem using 2 or even 3 separate frameworks in 1 application, surely you’ll have to watch out for incompatibilities, but theres always a workaround.

Personally, I love Ajax/Javascript, it gives life to what would otherwise be a stationary application. A word of advice…If you’re one who relies on RJS and JavascriptHelpers in rails, I highly recommend learning exactly what those helpers do and how to reproduce that particular code in pure javascript unobtrusively. You will benefit with such knowledge in future endeavors.



  1. Gurpreet October 4th, 2008

    Well, I know that using a ready made javascript framework will speed up your development process, but they do not give you raw control over what you develop. For example, almost no framework supports form validations, slide show making etc. Over that, some of the framework use specific looks and don’t allow you to change their looks to a great extent. So, they do leverage the work but really fail to give you the raw javascript control.

  2. Eric October 12th, 2008

    @Gurpreet

    That’s surely true. On larger, more specific applications it could definitely be negative to use a bloated framework when, if time and resources permit, you can code from scratch and to specifics of the application.

    I personally, am slowly removing my requirements of frameworks to fulfill my needs and it does indeed grant a certain level of freedom and in some cases, much needed control.


Sorry, comments are closed for this article.


72photos

Liquid error: execution expired

About

The contents of this blog are highly ambiguous, so I’ll forego the typical "about" paragraph and rather invite you to explore the contents of this blog and cultivate your own opinions of what it's "about". Hopefully some will ultimately use it as a backdrop for inspiration.

Regardless of it’s ultimate purpose, this blog remains for all nonetheless.

- Eric

Recent Tweets



Copyright © 2009 From Two 2 Twelve. Valid XHTML & CSS.