Publishers of technology books, eBooks, and videos for creative people

Home > Blogs > Choosing a JavaScript Framework

Choosing a JavaScript Framework

Whether you program in JavaScript regularly or not, sooner or later you're likely to try out a JavaScript framework to add much needed functionality to your Web site. But with so many frameworks available, how do you choose one? In this post, I'll provide some guidelines for how to select the best JavaScript framework for you and your project.Ten years ago JavaScript was considered to be a "toy" language, primarily used for browser-based eye candy and special effects that add little to a site's usability. Today, JavaScript is one of the building blocks for Rich Internet Applications (RIAs), used by almost every top Web site. This change in JavaScript's use and perception has caused, and is simultaneously because of, the creation of several fantastic frameworks. Just a partial list of these, in no particular order, includes:
So how do you select from among these? The fact is that pretty much every framework is good (I'm not the kind of person to argue that there's a "best" one). Here, then, are my criteria, in order of importance:

1. Features
The first criteria is obvious: will the framework do whatever it is you need it to do? If you're considering a framework, you probably have a specific use in mind, so make sure that you can accomplish your goal using a particular framework. To find out, turn to the framework's...

2. Documentation and Demonstrations
Maybe it's because I'm primarily a writer or maybe I'm just slow to learn things, but I think that good documentation is as important as the software itself, if not more so. That may sound like hyperbole, but if you can't figure out how to use something, then nothing else about it really matters. So, can you find clear instructions for doing X? Are there visible demos available? How about good tutorials? Your experience in looking through documentation and demos while researching a framework is an indicator of the experience you'll have when it comes to using the framework.

3. File Sizes and Inter-dependencies
One of the primary drawbacks in using frameworks is bloat. Even with the increased number of broadband users, there are still limits as to how many kilobytes of non-content are prudent to send to every client. Related to this, is the inter-dependencies of a framework: how many components are required for simple tasks? I personally like a framework with a small core feature set that can be expanded on an as needed basis. This approach reduces the download size for the user and simplifies the code for you.

4. License
My final criteria is one that doesn't get mentioned often. Just as it's shocking to discover somethings found online that you're expected to pay for, not all frameworks are free, either. Some are universally free, some require a license for certain uses. Look into this and understand the framework's terms (or costs), prior to using it in a live site.

And that's it! That's my criteria. I'm sure there are others that you have and I'd love to hear them. In fact, I expect to hear people surprised to see the omission of browser-support as a criteria. I didn't forget about this, it's just that browser-support isn't the JavaScript concern that it used to be, especially among frameworks. Any decent framework supports all the major browsers. Period. Is it worth double-checking? Certainly. Will it be a mitigating factor in your decision? Probably not.

If you agree or disagree with my list, or have any other suggestions, please let me know. If you have a specific framework you'd like to recommend (something I purposefully don't do here), please also say why you like it, with respect to whatever criteria being met.

Thanks for reading!