Both frameworks and libraries are reusable code written by someone else that is used to help solve common problems.
A library is like going to IKEA. You already have a home, but you need a bit of help with your funiture. You pick and choose the furniture, you are in control.
A framework is like building a model home. You have a set of blueprints and a few limited choices when it comes to architecture and design.
What is the technical difference between library and framework
Library: You are in charge of the flow of the application. You decide when and where to call a library.
Framework: The framework is in charge of the flow. It provides places for you to plugin your code, but it chooses when to call this code.
A collection of reusable methods for a particular purpose.
It allows easier and faster development of JavaScript-based applications, especially for AJAX and other web-centric technologies.
jQuery as well as other JS libraries were born into a world with cross-browser quirks and standardization issues.
With JavaScript on its own many time-consuming workarounds were needed. And testing was very frustrating.
jQuery, Mootools, Prototype and other libraries helped developers with that by creating an abstraction layer.
Name | Since | Market share | Popularity | Example |
---|---|---|---|---|
jQuery (UI + Mobile) | 2006 | 95.5% of all websites | 34.4% of JS developers | pascualprestige.com |
React JS | 2013 | 2.9% of all websites | 40.1% of JS developers | criticaltechworks.com |
jQuery is a feature-rich JavaScript library.
It is not a framework.
With our knowledge of JavaScript so far it will be quite easy to grasp jQuery.
Today a lot of the features, e.g. CSS selectors syntax and AJAX, which made jQuery so valuable can be done with pure JavaScript.
Some say jQuery is a relic of the past, others still use it day to day.
You might not need any more, but you certainly need to understand it.
Mostly because of Wordpress
Library is a collection of classes and functions that helps to develop an application or website.
Plugin is an extension that improves the capabilities of your application or website by adding one specific solution.
It is useful to add common functions you will reuse in your website project to your own library, e.g.
addClass
removeClass
hasClass
triggerClass
Name | Since | Usage | Popularity | Example |
---|---|---|---|---|
Vue.js | 2014 | 0.7% of all websites | 18.9% of JS developers | umwelt.schweiz.ch |
AngularJS | 2010 | 0.4% of all websites | 22.9% of JS developers | lamborghiniporrentruy.ch |
Electron | 2013 | ~1'600 desktop apps | - | Slack / WhatsApp Desktop |
It includes everything you need to execute a program written in Javascript.
It moved Javascript from websites to standalone applications.
e.g. Electron JS uses node.js and Chromium to build and run Desktop apps.
All companies use a set of technologies to build applications (web, mobile, desktop), a combination of programming languages, frameworks, libraries, servers, tools and so on.
= tech stack.
Most commonly used stacks are:
Even so called full stack developers cannot cover all stacks.
Today developers usually need to specialize. Switching jobs as a web developer might require for you to learn a new tech stack.