JavaScript Libraries & Frameworks

Let’s say you want to build a really cool website. You can speed up your development time (probably) by using a library or a framework to jumpstart your development.
A framework is generally more structured than a library.

Think of a library with books – you don’t have to read all the books in the library, you can just check out the ones you need. A JavaScript library is like that. You can use some of the code, the parts you need, and ignore the rest.

A framework is more like the building that houses the books. You get a lot of the same stuff, but you can’t check the books out and take them home to your website. You have to use the whole building, and the books have to stay on the right shelf or something might break.

Frameworks are heavier than libraries, but they also give you more ready-to-use functionality right out of the box.

How Much Time Can Using a Framework Save You?

It depends. What do you want your website to do?

If you want to build a landing page to advertise your business, or even a standard five-page website: NONE.

If you want to start a blog on the other hand, using a specialized framework for blogging (better known as a CMS, or content management system) like WordPress or Drupal can save you MONTHS of development time. Just press “install” and a few minutes later you are ready to start blogging.

More complicated websites can usually benefit from using a framework. Depending on how unique your website is, there may already be a framework that can get you set up and running immediately. Developing those frameworks did not happen overnight though, it took years. A lot of developers contributed to solve problems from many different users. They have already found the best solutions to the most common problems. Building your own web application from scratch could take years as well.

The more unique your web application is, the harder it will be to find a framework that will save you time. In fact, a framework may try to lock you into doing things in a way that doesn’t fit your needs when you have a truly unique website application. That is when libraries become more useful.

You may only want functions for signing up users and making sure their data is stored securely, but don’t need to create blog posts or store listings. With a library, you can use only the bits of code you need.

Think of a framework as a manufactured home. It’s all ready to go, and you may even be able to customize it with your choice of carpet and wallpaper or an optional garden tub. You can get a lot of use out of a manufactured home, but if you want something really custom, you probably want to hire an architect and a contractor to design and build it for you!

Using a library is more like going to Home Depot and picking out some lumber and bathroom fixtures. If you are a professional, then you can get some really nice custom work done. If you are an amateur then the results might not turn out the way you hoped. And building a website from scratch? Well, you could cut down the trees and make the bricks yourself…

Comparing Frameworks

There are a lot of different frameworks available. The best one to use will almost always be the one you already know. New frameworks are born all the time. Unless there is a feature in the new framework that you really need, the time it takes for your developers to learn the new framework (or to hire one that already knows it) will cost you more than the new framework will save.

To get a good comparison of some of several frameworks, check out ToDoMVC. This project has taken many frameworks, including popular ones like React, Angluar, and Vue, and built the same basic (to-do list) application. You can run the application in each framework and see for yourself which you like the best (or perhaps how similar they really are in the end).

The to-do list is very basic. If you have a large, complicated project then you may find that there are frameworks that handle your particular needs better than others.


About Karen 124 Articles
Karen Freeman-Smith lives near Portland, OR with her partner, two grown children (in and out of the basement), and a cat named Shiva. Karen maintains two personal websites as well as several topical websites about: Programming, Web Development, Foreign Languages, International Students, Fiction Writing, and Typing.

Be the first to comment

Leave a Reply

Your email address will not be published.