As I’ve started doing more JavaScript programming, I’ve been looking at different libraries and frameworks for the language.

It seems like one of the first things people look at is the size of the minified and compressed code. Even the first table on the Comparison of JavaScript frameworks Wikipedia page talks about size; the feature comparison doesn’t come until later.

I get that size matters. The JavaScript code is going to have to be downloaded before the application is fully functional. The bigger the code, the longer it takes the application to start up. That affects the perceived responsiveness, which is a big deal. The downloads also affect bandwidth costs. These are important considerations.

But the size of the underlying framework isn’t the only thing that matters. It is important to consider the size of the application code as well. For a big enough app, that size should dominate the framework size.

The framework can have a large impact on the size of the application code. A full-featured framework should provide tools that allow us to write a lot less of our own application code.

Unfortunately, it’s hard to know up front just how big the application is going to get. But it is worth comparing the features of the various frameworks with the features we need for our application in order to make the best decision about which one might be the best fit.

Just as we take shipping costs into consideration when deciding where to buy an item online, we should also consider total code size (framework + application) when deciding on a JavaScript framework.