JavaScript Libraries


JavaScript libraries - jQuery, Prototype, MooTools.


JavaScript Framework (Library)

JavaScript advanced programming, especially the complex handling of browser differences, is often difficult and time-consuming.

In response to these adjustments, many JavaScript (helper) libraries have emerged.

These JavaScript libraries are often referred to as JavaScript frameworks.

In this tutorial, we'll look at some of the most popular JavaScript frameworks:

  • jQuery

  • Prototype

  • MooTools

All of these frameworks provide functions for common JavaScript tasks, including animations, DOM manipulation, and Ajax processing.

In this tutorial, you'll learn how to get started using them to make JavaScript programming easier, safer, and more fun.


jQuery

jQuery is by far the most popular JavaScript framework.

It uses css selectors to access and manipulate html elements (DOM Objects) on a web page.

jQuery provides both a companion UI (user interface) and plugins.

Many large companies use jQuery on their websites:

  • Google

  • Microsoft

  • IBM

  • Netflix

For a more in-depth look at jQuery, visit our jQuery tutorial.


Prototype

Prototype is a library that provides simple APIs for performing common web tasks.

API is an abbreviation for Application Programming Interface. It is a library of properties and methods for manipulating the HTML DOM.

Prototype implements enhancements to JavaScript by providing classes and inheritance.


MooTools

MooTools is also a framework that provides APIs that make common JavaScript programming simpler.

MooTools also includes some lightweight effects and animation functions.


Other Frameworks

Here are some other frameworks that were not covered above:

YUI - Yahoo! The User Interface Framework, a large library that covers a large number of functions, from simple JavaScript functionality to a complete internet widget.

Ext JS - Customizable widget for building rich Internet applications.

Dojo - Toolkit for DOM operations, events, widgets, and so on.

script.aculo.us - Open source JavaScript framework for visual effects and interface behavior.

UIZE - Widgets, AJAX, DOM, templates, etc.


CDN - Content Delivery Network

You always want the web page to be as fast as possible. you want the page to be as small as possible, and you want the browser to cache as much as possible.

If many different websites use the same JavaScript framework, it makes sense to put the framework inventory in a common place for every web page to share.

CDN (Content Delivery Network) solves this problem. A CDN is a network of servers that contain a code base that can be shared.

    FREE CDN RESOURCES ARE:

    To use a JavaScript framework library in your web pages, simply reference it in the <script > tag:

    Reference jQuery

    <script src="https://cdn.staticfile.org/jquery/3.4.0/jquery.min.js"></script>

    Use Frameworks

    Before you decide to use a JavaScript framework for your web pages, it's wise to test the framework first.

    JavaScript frameworks are easy to test. You don't need to install them on your computer and don't have an installer at the same time.

    usually you only need to reference a library file from a web page.

    In the next chapter of this tutorial, we'll walk you through the testing process for jQuery in its entirety.