Archive for the ‘ajax’ Tag

Choosing a Javascript Framework

Javascript frameworks have come a long way since I started working with them around 4 years back. There are a lot of frameworks available out there now which provides developers the ability to fight the cross-browser problems and enable them to do work more efficiently.

Here are some points to keep in mind when deciding which Javascript framework to use for your project:

  • Active community: This is very essential as when you run into some problem with the framework, you need some place to post your problems or search for solutions posted on similar problems. For this, there needs to be an active community.
  • Project requirements: Does the framework provides most of the functionality that your project requires ? One more thing to keep in mind is that you should not choose a heavy framework when your requirements are very light. For example, if your project requires very small DOM manipulation and no features like autocomplete or datatable, then avoid using a very heavy framework like YUI.
  • Support A-Grade Browsers: More than 90% of people in the world use A-grade browsers to browse the internet. So it is essential that the framework support all these browsers.
  • Framework History: Is the framework mature ? Does it have a dedicated core team developing it ? How often are the fixes/updates released ?
  • Documentation: This is essential to cut back on the learning cycle. If the framework is well documented and has a decent set of examples, the it becomes easy to adopt.
  • Framework Extensibility: If the project requires a feature not provided by the framework, can you implement that feature by extending the framework ? This also forms a community of developers around the frameworks, who releases their extension for others to use.
  • API Syntax: You get to notice this after you start writing code using the framework.

Some of the frameworks which follow most of the points above:

  • JQuery: This is the best framework in my opinion. It is light, easy to learn and easy to extend. There are lot of plugins available for any functionality that you may require. It has got a good following with even Google using it.
  • Yahoo UI Library (YUI): This is also a very good framework which provide lot of read-to-use javascript components like data table, autocomplete, in-window popups (Panels), etc. I have written about some of the problems in this framework in a separate post here. It is being used by Yahoo themselves and LinkedIn.
  • Mootools: This is also a nice framework like jQuery, but I have not used it myself. Here is a review on it.
  • Dojo Toolkit: It is one of the oldest framework out there with lot of ready-to-use components like YUI. Only downside with Dojo has been its documentation.
  • Prototype: Prototype is a popular framework and one of the oldest like Dojo. I have used it initially just for its AJAX part, but it is more than that. There are lot of plugins available to extend its functionality. Development with prototype forces you to work in an object-oriented way by way of providing its own classes.

Overall, I will recommend everybody to explore jQuery for their project requirements. I have been using it very extensively in LifeMojo and will be writing about some of its good plugins in my next post.

Advertisements