JS Framework

Definition

What is a JS framework?

A JS framework is a pool of JavaScript libraries that offer web developers shortcuts to routine or common tasks. It provides a feature-rich foundation on which you can build your web pages.

If you want a more in-depth understanding of this topic, check out the FAQ section below:

Question #1: What are examples of JS frameworks?

There are dozens of examples of JS frameworks available online, including:

  1. Node.js
  2. React
  3. Angular
  4. Vue.js
  5. Preact.js
  6. Express.js
  7. Jest
  8. Ember.js
  9. Svelt.js
  10. Next.js

Question #2: Are JS frameworks necessary in web development?

No, JS frameworks are not always necessary in web development, especially if you are building simple websites. But if you are looking to build highly dynamic web pages, you will most likely need to use some form of JS framework to get the job done.

Question #3: What is the difference between a JS framework and a library?

A JS library (such as jQuery) is a set of codes or tasks, while a JS framework is a collection of libraries. This means that a web developer would use a JavaScript library to write more with less and use a JS framework if they want to build something with a predefined structure. 

However, because libraries can also be utilised to build the foundation of web pages, it may also be used interchangeably with frameworks.

Question #4: What do JS frameworks do?

JS frameworks serve as templates for repetitive tasks and functions that developers can call upon and customise as they like.

Check this helpful article from Techliance if you want to know more about the benefits of the JS framework.

Question #5: Is HTML the same as JS framework?

No. HTML is the markup language used to build the structure of web pages, while a JS framework is a collection of JavaScript libraries developers can use to make the static web pages built with HTML dynamic, interactive, and feature-rich.

Question #6: What are the advantages of using JS frameworks?

The main advantages of using JS frameworks are:

  1. It allows you to work with pre-written code instead of building everything from scratch
  2. There are free, open-source options available

Let us go over each one in more detail:

First, JS frameworks allow you to develop dynamic, complex, and feature-rich websites significantly faster because they give you access to pre-written, tried-and-tested, plug-and-play code instead of having to figure out how to code every single feature your websites need.

Second, you do not really have to spend a single cent to take advantage of the power and convenience of JS frameworks because there are a lot of top-notch open source options available to you, including:

  1. React
  2. AngularJS
  3. Vue.js

Question #7: What are the disadvantages of using a JS Framework?

As useful and feature-rich as they may be, using JS frameworks also comes with several disadvantages, including:

  1. Security issues
  2. Lack of support and resources
  3. Lack of innovation
  4. Bloat
  5. Compatibility issues

Let us take a closer look at each one:

First, not all JS frameworks are known for their top-notch security. Some come with vulnerabilities that you need to take into account and address.

Second, not all JS frameworks have comprehensive documentation, come with sufficient learning resources, or are backed by a thriving community, leaving you to figure everything out on your own.

Third, while being able to use pre-written code is without a doubt a massive time-saver, it can get in the way of creativity and innovation if you are not careful.

Fourth, not even the most feature-packed JS frameworks would have everything you could ever need. This means that for some projects, you might have to resort to mixing and matching libraries from different ones, resulting in bloated code.

Finally, not all libraries play well with all JS frameworks. This means that if you ever find the need to combine libraries from different sources into a single project, you may end up having to deal with all sorts of compatibility issues.