JavaS­cript (or JS for short) is a scripting language used to make HTML content in­ter­act­ive in the web browser. This language can be used for both object-ori­ent­ated pro­gram­ming as well as pro­ced­ur­al and func­tion­al pro­gram­ming. JavaS­cript contains pre­defined objects (i.e. data elements with special prop­er­ties, methods, or functions) for accessing a web page, but they are sometimes cum­ber­some to use. To help users in writing JS, collected in­form­a­tion has been made public. These in­struc­tions and tools come in the form of various JavaS­cript libraries and frame­works, with the aim to make pro­gram­ming easier. We will go through the best and most well-known tools below.

Library vs. framework

It’s important to keep the two terms separate. Often 'library' and 'frame­work' are used as synonyms even though this is wrong, strictly speaking. Even though the trans­ition is seamless in many ways, there are basic dif­fer­ences between the two of them.

Library

A JavaS­cript library is a library of pre-written JavaS­cript that enables an easier de­vel­op­ment of JavaS­cript-based ap­plic­a­tions. Libraries always ac­com­mod­ate sub­pro­grams which, along with support functions, help with the pro­gram­ming process. In contrast to a framework, a library is more developed to one par­tic­u­lar use, meaning it has functions that are co­ordin­ated to each other. For example, the JavaS­cript library D3.js is used for data visu­al­isa­tion – with this library you can implement small tables, diagrams, and stat­ist­ics, as well as more complex graphs (including an­im­a­tions and in­ter­ac­tions). Libraries are always in­teg­rated by a software program: the program accesses the cor­res­pond­ing functions of a program library when they need a specific function. As a result, libraries can only work within a program and can’t run in­de­pend­ently.

Framework

A framework is also not an autonom­ous program, but rather a special form of class library. A framework provides the software ar­chi­tec­ture (i.e. the basic structure) of an ap­plic­a­tion and es­sen­tially de­term­ines the de­vel­op­ment process. Frame­works have certain design patterns with different functions (often in the form of many libraries) and are used to develop new, in­de­pend­ent ap­plic­a­tions. An example is the Zend framework for PHP, which is used in Magento’s online shop software and web analytics tool Piwik.

Inversion of Control (IoC)

Another dif­fer­ence between a framework and a library is how they are managed. With libraries, the code is accessed by pro­gram­mers through a software program’s pro­gram­ming interface. Frame­works, however, carry out an inversion of control: The code is embedded in fixed struc­tures and called up when needed. To summarise, you can say that libraries are called up by programs, whereas frame­works make spe­cific­a­tions to the program.

JavaS­cript libraries and frame­works

The core of JavaS­cript is a rather simple pro­gram­ming language that lends itself par­tic­u­larly well for use within a browser. Many pro­gram­mers face problems with their website interface, or DOM (Document Object Model). Here JavaS­cript frame­works and libraries come into play, making work a little bit easier for de­velopers, re­gard­less of their pro­gram­ming field. The JavaS­cript ex­ten­sions in­tro­duced in the next section can all be down­loaded for free.

Popular JavaS­cript libraries

JavaS­cript libraries are reusable codes through which certain features and functions for a website are assigned. jQuery is the most well-known JavaS­cript library and offers many useful features, although other libraries can be just as helpful.

jQuery

The very extensive jQuery library is the most-used JavaS­cript library. This is due to the fact that you can write simple cross-browser jQuery code, with lots of plugins available for use. jQuery’s open source library is part of many content man­age­ment systems like WordPress, Drupal, or Joomla!. jQuery also functions as an interface for DOM, offering some of the following functions: CSS3 selectors make it easy to select and ma­nip­u­late website elements. jQuery is also par­tic­u­larly valued for its ability to integrate Ajax requests (HTTP requests without reloading the website).

Ad­vant­ages Dis­ad­vant­ages
Ajax support Can be slow compared to CSS
Very popular Leans toward spaghetti code
Extensive library Is quite su­per­flu­ous due to new JavaS­cript features
Easy to use
Numerous plugins

jQuery UI

jQuery UI is a free extension for jQuery. Its purpose is to define and implement a user interface (UI) from sources like websites or web apps. The focus here is on simple design and in­ter­ac­tions. The functions jQuery has to offer include the pos­sib­il­ity to implement in­ter­act­ive elements (e.g. drag and drop, zooming in and out), an­im­a­tions, effects, and widgets (like auto­com­plete, sliders, date picker, etc.). The graphic editor, Them­eR­oller, can be used to create original themes, or existing themes can be used to adapt for your own purposes. True to its simple design con­fig­ur­a­tion, the modular structure of Them­eR­oller allows only the necessary com­pon­ents to be im­ple­men­ted.

Ad­vant­ages Dis­ad­vant­ages
Easy operation due to widgets Slow de­vel­op­ment
Them­eR­oller Requires jQuery

Dojo Toolkit

The Dojo Toolkit is good for im­ple­ment­at­ing web ap­plic­a­tions and dynamic web content. As one of the oldest JavaS­cript libraries that is still relevant on the market, it offers a wide range of functions – the most important com­pon­ents of the toolkit are the main program (Dojo), and Dijit, a toolkit for graphical user in­ter­faces. In addition, you can use pre-defined widgets to integrate elements into the website you are creating. Dojo can also handle both DOM and Ajax.

Ad­vant­ages Dis­ad­vant­ages
Easy operation due to widgets Not so easy to learn
Ajax support Slow de­vel­op­ment
Extensive, modular library

React

React was first used in 2011 in Facebook’s newsfeed. It was then released on an open source basis in 2013. It is another JavaS­cript library with which you can create user in­ter­faces. What sets this library apart from the rest is that the website elements (views) aren’t solely rendered on the client, but also on the server – which makes a more powerful rendering possible. This is due to the use of virtual DOMs, which also makes the testing of web ap­plic­a­tions easier. In addition, the JavaS­cript library scores with many de­velopers because of its one direction data flow: This tech­no­logy ensures stable code since changes in lower-level code cannot influence the higher-level code. Changes can only have an impact in the other direction.

Ad­vant­ages Dis­ad­vant­ages
Virtual DOM Hard to learn
One-way data flow
Server-side rendering
Ap­plic­able for mobile apps

Zepto

Zepto is a real light­weight: While jQuery is im­press­ive for its size, it is also a factor that deters many de­velopers. The best-known JavaS­cript library is too bulky for some users. The min­im­al­ist­ic Zepto is much slimmer, should load faster and take up less space, which is why it is mainly used for mobile apps. In order to keep the file size small, Zepto saves on com­pat­ib­il­ity with older browsers. To make Ajax and an­im­a­tions possible, you also have to use ad­di­tion­al modules.

Ad­vant­ages Dis­ad­vant­ages
Very slimline Doesn’t support older browsers
Easy to learn Ajax and an­im­a­tions only possible using ad­di­tion­al modules
No extra ad­vant­ages compared to jQuery

CreateJS

Not just one, but several libraries: CreateJS is a suite con­sist­ing of four different libraries: EaselJS (graphics & in­ter­activ­ity), TweenJS (an­im­a­tions), SoundJS (audio), and PreloadJS (pre­load­ing). These are not in­ter­de­pend­ent. This means that you don’t have to implement all four libraries in one project if you happen to only need one library, for example. There are also some tools to make it easier to work with JavaS­cript libraries. The focus is on the de­vel­op­ment of HTML5 and Flash ap­plic­a­tions. In general, the CreateJS team works closely with Adobe, which is why there are tools to ensure that the suite works seam­lessly with Adobe products.

Ad­vant­ages Dis­ad­vant­ages
In­de­pend­ent libraries Small community
Ad­di­tion­al tools
In­teg­ra­tion in Adobe Animate

JavaS­cript libraries at a glance

jQuery jQuery UI Dojo Toolkit React Zepto CreateJS
Year of release 2006 2007 2005 2013 2010 2012
Operator JS Found­a­tion JS Found­a­tion Dojo Found­a­tion Facebook Thomas Fuchs gskinner.com
License MIT MIT BSD/AFL MIT MIT MIT
GitHub con­trib­ut­ors approx. 270 approx. 300 approx. 100 approx. 1,100 approx. 180 approx. 40
Special features Best-known library Focus on GUI Focus on web apps Virtual DOM Min­im­al­ist­ic In­teg­ra­tion in Adobe Animate

Popular JavaS­cript frame­works

There are con­sid­er­ably more JavaS­cript libraries than frame­works. The latter are es­pe­cially suitable for complex web ap­plic­a­tions. If de­velopers embrace the concepts and spe­cific­a­tions of re­spect­ive frame­works, they will be able to work very ef­fi­ciently with them.

AngularJS

This Google-main­tained framework has by far the largest community among the JavaS­cript frame­works. AngularJS is used (like its main com­pet­it­or: Facebook’s library, React) to create single page web ap­plic­a­tions (web apps, which consist only of HTML documents). Due to the MVVM concept (model-view-viewmodel) of this framework, web ap­plic­a­tions can be developed that are highly adaptable to user in­ter­ac­tion. (The man­u­fac­tur­ers of the JS framework, however, prefer to cat­egor­ise AngularJS as MVW: model-view-whatever). Here AngularJS renders the web ap­plic­a­tion on the client side. The framework is based on jQuery Lite – a slimmed-down version of the well-known JavaS­cript library, jQuery.

Ad­vant­ages Dis­ad­vant­ages
Very large community Has been replaced by Angular
Part of the MEAN software stack Com­plic­ated initial hurdles

Angular

Angular – sometimes also called Angular 2 – is the successor of AngularJS. The JS framework is still primarily intended for the de­vel­op­ments of single-page web ap­plic­a­tions. However, Google has made some very big changes in the second version. The biggest dif­fer­ence is probably that JavaS­cript is no longer used for pro­gram­ming, but rather TypeScript is. However, since Microsoft’s pro­gram­ming language is based on JavaS­cript, it doesn’t result in a direct re­stric­tion when it comes to JS de­vel­op­ment. In addition, Angular has now been adapted so that the de­vel­op­ment of ap­plic­a­tions across multiple platforms (desktop, mobile, tablet) is no problem.

Ad­vant­ages Dis­ad­vant­ages
More pos­sib­il­it­ies thanks to TypeScript Not easy migrating from AngularJS to Angular
Cross-platform de­vel­op­ment Initial hurdles more com­plic­ated than with the pre­de­cessor

Ember.js

Ember.js is also a client-side framework that is used for im­ple­ment­ing single page web ap­plic­a­tions, with which you can also create desktop ap­plic­a­tions. A further dis­tin­guish­ing feature is that the creators of Ember.js in­tens­ively involve the community in the framework’s de­vel­op­ment process; for instance, dis­cuss­ing sig­ni­fic­ant framework changes with them before they are im­ple­men­ted. Ember.js is marketed as a framework for creating ambitious web ap­plic­a­tions – so it is primarily aimed at de­velopers who already have ex­per­i­ence with designing web ap­plic­a­tions.

Ad­vant­ages Dis­ad­vant­ages
Developed by the open source community Very demanding, es­pe­cially for beginners
Can also be used for desktop ap­plic­a­tions

Vue.js

Vue.js is also a JavaS­cript framework for de­vel­op­ing single-page web ap­plic­a­tions re­min­is­cent of Angular and React. The de­velopers of this re­l­at­ively young and ambitious project de­lib­er­ately designed Vue.js in such a way that beginners find it re­l­at­ively easy to get started. For example, it’s possible to integrate templates into HTML. In addition, Vue.js is also said to be much more flexible than many other frame­works, which usually strictly dictate the way the framework is handled.

Ad­vant­ages Dis­ad­vant­ages
Quick to learn Less complex
Supports HTML & CSS Com­par­at­ively small community
Flexible de­vel­op­ment pos­sib­il­it­ies

Meteor

Meteor – sometimes called MeteorJS – is a JS framework that is par­tic­u­larly well suited for cross-platform de­vel­op­ment. It enables de­velopers to create both web ap­plic­a­tions and mobile apps with the same code. Another advantage is that changes in the code can be forwarded directly to clients thanks to the specially developed Dis­trib­uted Data Protocol (DDP). In addition to the free framework, the man­u­fac­tur­ers of Meteor also offer Galaxy, which is a paid platform. De­velopers can use the cloud service to publish and host their projects. The JavaS­cript framework runs on a Node.js basis so it makes sense to know a bit about the de­vel­op­ment en­vir­on­ment when de­vel­op­ing with Meteor. Meteor enables you to create both backend and frontend at the same time without changing the language – a re­volu­tion­ary concept that has not yet become es­tab­lished.

Ad­vant­ages Dis­ad­vant­ages
Cross-platform de­vel­op­ment Works only with MongoDB and not with other database types
Hosting platform Galaxy Backend migration required
Can be combined with Angular, React, and other frame­works/libraries Problems with search engine and per­form­ance

JavaS­cript frame­works at a glance

AngularJS Angular Ember.js Vue.js Meteor
Year of release 2009 2016 2011 2014 2012
Operator Google Google Ember Core Team Evan You Meteor De­vel­op­ment Group
License MIT MIT MIT MIT MIT
GitHub con­trib­ut­ors Approx. 1.600 Approx. 570 Approx. 700 Approx. 700 Approx. 370
Ar­chi­tec­ture MVVM/MVW MVC MVVM MVVM MVVM
Special features Can also be used for mobile and desktop apps Can also be used for mobile and desktop apps Can also be used for desktop apps Easy in­teg­ra­tion Combined backend and frontend

Useful tools for many areas

Frame­works and libraries can con­sid­er­ably smooth the JavaS­cript pro­gram­ming process. Those mentioned above are only a small portion of the tools that are available. Ad­di­tion­al resources for JavaS­cript frame­works, libraries, and plugins include GitHub and Java­S­cript­ing. Here you can find suitable JavaS­cript ex­ten­sions for various purposes.

Go to Main Menu