Skip to content

What is a framework?

As a programmer, you don’t need to start from scratch when you have tools designed to help you with your projects. Frameworks are software that is developed and used by developers to build applications.

JavaScript (or client-side) framework is a technology providing us the right tools to build a web application while also defining how it should be designed and how the code should be organized.

Most JavaScript frameworks these days are opinionated, meaning they have their own philosophy of how the web applications should be built and you may need to spend some time to learn the core concepts. Opinionated for those wondering means frameworks are making a lot of decisions regarding how code is written, the location of files, and possibly even the name of said files.

Wikipedia

“In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software.

It provides a standard way to build and deploy applications and is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate development of software applications, products and solutions.”

Frameworks provide a structure (like a skeleton, or a scaffoldin) to base your entire project around. This structure is created through page templates (provided by the framework) with specific areas set aside for inserting framework code (versus the library format, where the developer decides where to implement library code).

With a code library, a developer generally calls upon the library whenever they feel it is appropriate. A framework generally requires that the developer is fully immersed in its workflow.

lib vs framework
Libraries plug into your code, Your code plugs into a framework.

TL;DR

  • JavaScript frameworks are tools for making JavaScript coding faster and more efficient
  • Framework is usually a set of libraries and tools that help to build a web app

framework collage

Tip

When you’re trying to define frameworks in the context of JavaScript framework vs library, think of it this way:

  • JavaScript libraries are like pieces of furniture that add style and function to an already constructed house.

  • Frameworks, on the other hand, are a template you use to build the house itself.

The basic principle of a framework: Not having to reinvent the wheel. And doing away with foreboding, low value added tasks (for example, the development of generic components) in order to fully focus on the business rules.

As an example, a framework will keep the developer from having to spend 2 or 3 days creating an authentication form (which is not a specific task). The time that is saved can be dedicated to more specific components as well as to the corresponding unit tests; giving you solid, sustainable and high quality code.


Guaranteed upgradability and maintenance

In the longer term, a framework ensures the longevity of your applications. If a development team works as they please, only that particular team will be able to maintain and upgrade the application with ease. The way that a publisher supports a proprietary solution.

On the other hand, the structure that a framework provides for the application makes it possible to avoid this pitfall altogether and it gives any developer - whether they participated in its development or not – the ability to easily “adopt” an application, to maintain it over time and to upgrade it both quickly and neatly, whenever necessary.

Advantages of using a software framework:

  • Assists in establishing better programming practices and fitting use of design patterns.
  • Code is more secure.
  • Duplicate and redundant code can be avoided.
  • Helps consistent developing code with fewer bugs.
  • Makes it easier to work on sophisticated technologies.
  • One could create their software framework or contribute to open-source frameworks. Hence, there is a continuous improvement in the functionality.
  • Several code segments and functionalities are pre-built and pre-tested. This makes applications more reliable.
  • Testing and debugging the code is a lot easier and can be done even by developers who do not own the code.
  • The time required to develop an application is reduced significantly.

Summary

  • A framework is not an absolute necessity, but nonetheless it is very useful.
  • A framework is a pledge of quality, upgradability and maintainability of applications at lower cost.
  • Applications developed using a framework are interoperable with market standards.

Read more