8 Considerations For Choosing Your JavaScript Framework

By  on  

Picking your JavaScript framework is a difficult decision. There are many considerations that need to be made when choosing which JavaScript framework is best for you. These are the considerations I judge each JavaScript framework by before committing to it for a project (or all of them).

Does it do what YOU need it to?

This may seem obvious but there's always a temptation to fall in love with the cool features of a JavaScript framework before confirming that the framework provides the functionality needed for the upcoming project. Have a list of functionality you need and stick to it.

How fast is the code?

Users expect accuracy, users want speed. No matter how cool your design, content, or JavaScript effect may be, if your website is slow, your user is gone. You will need for the basic functions to be as fast as possible so that your own code can run quickly. Don't know how fast each framework is? You can always see the most up to date versions of each framework run at the MooTools Slickspeed page. Run at least five tests before concluding which is faster.

How large (file size) is the framework?

It will be important that the file size is small on two fronts: you will want the JavaScript to be a quick download for the user and you will need to worry about bandwidth if your site is popular. There are many tools to compress your JavaScript; I recommend Dean Edwards' Packer.

Is there adequate documentation?

One issue that has plagued JavaScript frameworks for a few years is that they haven't been documented well (if at all). Prototype seemed to be the most used and highly-regarded frameworks a year ago but Prototype offered little documentation. Each framework now provides more documentation, but make sure the documentation is adequate for your purposes.

How active is the community?

One of the best parts of any free, open source software is the community. The community is extremely important within the JavaScript community. The community provides help, code examples, and suggestions for the framework and others using the framework. Be sure to check out the community before you choose your framework.

How modular is the code?

Frameworks can often get quite large in file size and its likely that you don't need all of the code. A good framework will keep the code modular so that you can pick which functionalities you need.

Which professional websites use the framework?

A few of the frameworks are being used by some recognizable websites and business. For example, Digg and Apple use Prototype/Scipt.aclo.us, cNet and GameSpot use MooTools, and WordPress uses jQuery. Big company support can show the maturity of a framework.

How much time does it save you (how short can the code be)?

A major benefit to using a JavaScript framework is that they provide code structures to allow you to do what every programmer would love: code less, do more. Look for your framework to allow you to chain functionality to allow maximum functionality with as little code as possible.

Recent Features

  • By
    Vibration API

    Many of the new APIs provided to us by browser vendors are more targeted toward the mobile user than the desktop user.  One of those simple APIs the Vibration API.  The Vibration API allows developers to direct the device, using JavaScript, to vibrate in...

  • By
    How to Create a Twitter Card

    One of my favorite social APIs was the Open Graph API adopted by Facebook.  Adding just a few META tags to each page allowed links to my article to be styled and presented the way I wanted them to, giving me a bit of control...

Incredible Demos

  • By
    Drag and Drop MooTools File Uploads

    Honesty hour confession:  file uploading within the web browser sucks.  It just does.  Like the ugly SELECT element, the file input is almost unstylable and looks different on different platforms.  Add to those criticism the fact that we're all used to drag and drop operations...

  • By
    Chris Coyier’s Favorite CodePen Demos II

    Hey everyone! Before we get started, I just want to say it's damn hard to pick this few favorites on CodePen. Not because, as a co-founder of CodePen, I feel like a dad picking which kid he likes best (RUDE). But because there is just so...

Discussion

  1. Rey Bango

    In terms of SlickSpeed, be sure to run it in all browsers, not just FireFox. That will give you a better indication on how the browsers perform, especially Internet Explorer which is still the dominant browser.

  2. Agreed. Your users don’t all use the same browser, so you shouldn’t test just one.

    Thank you for posting Rey, and try to get more MooTools-related articles on Ajaxian!

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!