JavaScript library

Short description: Package of JavaScript code

A JavaScript library is a library of pre-written JavaScript code that allows for easier development of JavaScript-based applications,[1] especially for AJAX and other web-centric technologies.[2] They can be included in a website by embedding it directly in the HTML via a script tag.

## Contents

* 1 Libraries
* 2 Frameworks
* 2.1 Capabilities and Trade-offs in Modern Frameworks
* 3 Packages
* 4 See also
* 5 References

## Libraries

With the expanded demands for JavaScript, an easier means for programmers to develop such dynamic interfaces was needed.[3][4] Thus, JavaScript libraries and JavaScript widget libraries were developed, allowing for developers to concentrate more upon more distinctive applications of Ajax.[5] This has led to other companies and groups, such as Microsoft and Yahoo! developing their own JavaScript-based user interface libraries, which find their way into the web applications developed by these companies.[6] Some JavaScript libraries allow for easier integration of JavaScript with other web development technologies, such as CSS, PHP, Ruby, and Java, while others provide utilities, often in the form of JavaScript functions, to make repetitive and complex tasks less taxing.[7][8] Many libraries include code to detect differences between runtime environments and remove the need for applications to allow for such inconsistencies. Almost all JavaScript libraries are released under either a permissive or copyleft license to ensure license-free distribution, usage, and modification.[9]

## Frameworks

Some JavaScript libraries, such as Angular, are classified as frameworks since they exhibit full-stack capabilities and properties not found in general JavaScript libraries.[10][11]

### Capabilities and Trade-offs in Modern Frameworks

JavaScript-based web application frameworks, such as React and Vue, provide extensive capabilities but come with associated trade-offs. These frameworks often extend or enhance features available through native web technologies, such as routing, component-based development, and state management. While native web standards, including Web Components, modern JavaScript APIs like Fetch and ES Modules, and browser capabilities like Shadow DOM, have advanced significantly, frameworks remain widely used for their ability to enhance developer productivity, offer structured patterns for large-scale applications, simplify handling edge cases, and provide tools for performance optimization.[12][13][14]

Frameworks can introduce abstraction layers that may contribute to performance overhead, larger bundle sizes, and increased complexity. Modern frameworks, such as React 18 and Vue 3, address these challenges with features like concurrent rendering, tree-shaking, and selective hydration. While these advancements improve rendering efficiency and resource management, their benefits depend on the specific application and implementation context.

Lightweight frameworks, such as Svelte and Preact, take different architectural approaches, with Svelte eliminating the virtual DOM entirely in favor of compiling components to efficient JavaScript code, and Preact offering a minimal, compatible alternative to React. Framework choice depends on an application’s requirements, including the team’s expertise, performance goals, and development priorities.[12][13][14]

A newer category of web frameworks, including enhance.dev, Astro,[15] and Fresh, leverages native web standards while minimizing abstractions and development tooling.[16][17][18] These solutions emphasize progressive enhancement, server-side rendering, and optimizing performance. Astro renders static HTML by default while hydrating only interactive parts. Fresh focuses on server-side rendering with zero runtime overhead. Enhance.dev prioritizes progressive enhancement patterns using Web Components. While these tools reduce reliance on client-side JavaScript by shifting logic to build-time or server-side execution, they still use JavaScript where necessary for interactivity. This approach makes them particularly suitable for performance-critical and content-focused applications.[12][13][14]

## Packages

All npm packages are JavaScript libraries, but not all libraries are packages. Npm serves as a package manager for packages used in Node.js runtimes.[19][20] However, some npm packages offer CDN support for use of the library in both Node.js runtimes as well as the browser.[21]

## See also

* Ajax framework
* Widget toolkit
* List of JavaScript libraries
* Comparison of JavaScript-based web frameworks

## References

1. ↑ David Sawyer McFarland (2014). JavaScript & JQuery: The Missing Manual. O'Reilly Media. p. 106. ISBN 9781491948620. https://books.google.com/books?id=0oWMBAAAQBAJ.
2. ↑ "What is a JS library?". https://www.khanacademy.org/computing/computer-programming/html-css-js/using-js-libraries-in-your-webpage/a/whats-a-js-library.
3. ↑ Peters, Siem (2019-04-08). "A Brief History of JavaScript: from Netscape to Frameworks" (in en). https://blog.bitsrc.io/a-brief-history-of-javascript-from-netscape-to-frameworks-74bf4774eeef.
4. ↑ AsyncBanana (2021-04-21). "A Short History of JavaScript and Its Evolution" (in en). https://javascript.plainenglish.io/a-short-history-of-javascript-and-its-evolution-6f254cc016ee.
5. ↑ Andy Harris (2009). JavaScript and AJAX For Dummies. Wiley. p. 240. ISBN 9780470417997. https://books.google.com/books?id=iILJ_KIyxkgC&pg=PA240.
6. ↑ Jake Rutter (2011). Smashing JQuery. Wiley. p. 21. ISBN 9780470977361. https://books.google.com/books?id=owKwLfAll6QC&pg=PR21.
7. ↑ Walsh, David (2007-09-05). "6 Reasons To Use JavaScript Libraries & Frameworks" (in en). https://davidwalsh.name/6-reasons-to-use-javascript-libraries-frameworks.
8. ↑ "40 Useful NPM Packages for Node.js Apps in 2021" (in en). https://leanylabs.com/blog/npm-packages-for-nodejs/.
9. ↑ Shelley Powers (2010). JavaScript Cookbook. O'Reilly Media. pp. 389–412. ISBN 9781449395926. https://books.google.com/books?id=kW0s1IrlbnIC.
10. ↑ "The Difference Between a Framework and a Library" (in en). 2019-02-01. https://www.freecodecamp.org/news/the-difference-between-a-framework-and-a-library-bd133054023f/.
11. ↑ "What is the difference between Library vs Framework?" (in en). https://dev.to/rohitrana/what-is-the-difference-between-library-vs-framework-174n.
12. ↑ 12.0 12.1 12.2 JavaScript Frameworks for Modern Web Development: The Essential Frameworks, Libraries, and Tools to Learn Right Now. ISBN 978-1484249949.
13. ↑ 13.0 13.1 13.2 Building Native Web Components: Front-End Development with Polymer and Vue.js. ISBN 978-1484259047.
14. ↑ 14.0 14.1 14.2 Hands-On JavaScript High Performance: Build faster web apps using Node.js, Svelte.js, and WebAssembly. ISBN 978-1838821098.
15. ↑ "Javascript Based Web Framework Astro". https://www.heise.de/en/news/Web-framework-Astro-5-9-arms-itself-against-XSS-attacks-10438354.html.
16. ↑ "Enhance". https://github.com/enhance-dev.
17. ↑ "Astro framework". https://github.com/withastro/astro.
18. ↑ "Fresh". https://github.com/denoland/fresh.
19. ↑ "A Clear Definition of npm and What it Does" (in en). 2022-01-20. https://css-tricks.com/a-clear-definition-of-npm-and-what-it-does/.
20. ↑ "Node.js NPM" (in en-US). https://www.w3schools.com/nodejs/nodejs_npm.asp.
21. ↑ Grosselle, Alessandro (2019-11-12). "The JS library distribution dilemma, NPM or URL?" (in en). https://medium.com/thron-tech/the-js-library-distribution-dilemma-npm-or-url-c63aa5842a4c.

* v
* t
* e

JavaScript

Code analysis|

* ESLint
* JSHint
* JSLint

Transcompilers|

* Babel.js
* CoffeeScript
* LiveScript
* Dart
* Emscripten
* Google Closure Compiler
* Google Web Toolkit
* Morfik
* TypeScript
* AtScript
* Opa
* Nim
* Haxe
* ClojureScript
* WebSharper
* PureScript
* Reason
* Elm

Concepts|

* Client-side
* JavaScript library
* JavaScript syntax
* Unobtrusive JavaScript

Debuggers|

* Firebug
* Komodo IDE
* Microsoft Script Debugger
* Microsoft Script Editor
* Opera Dragonfly
* Web Inspector

Doc generators|

* JSDoc

Editors (comparison)|

* Ace
* Cloud9 IDE
* Atom
* CodeMirror
* Light Table
* Brackets
* Koding
* PhpStorm
* Orion
* Visual Studio
* Visual Studio Express
* Visual Studio Code
* Visual Studio Team Services

Engines|

* Comparison of engines
* DOM support
* List of ECMAScript engines

Frameworks|

* Comparison of JavaScript frameworks
* List of JavaScript libraries

Related technologies|

* Cascading Style Sheets
* Document Object Model
* HTML
* Dynamic HTML
* Ajax
* JSON
* WebAssembly
* asm.js

Package managers|

* npm

Application Bundlers|

* Webpack

Server-side|

* Active Server Pages
* CommonJS
* JSGI
* Node.js
* Wakanda

Unit testing|

* Jasmine
* Mocha
* QUnit
* List of JavaScript unit testing frameworks
* Jest

People|

* Douglas Crockford
* Brendan Eich
* John Resig

* v
* t
* e

ECMAScript

Dialects|

* ActionScript
* Caja
* JavaScript
* engines
* asm.js
* JScript
* JScript .NET
* QtScript
* TypeScript
* WMLScript

Engines
(comparison)|

* Carakan
* Futhark
* InScript
* JavaScriptCore
* JScript
* KJS
* Linear B
* Narcissus
* QtScript
* Rhino
* SpiderMonkey
* TraceMonkey
* JägerMonkey
* Tamarin
* V8
* ChakraCore
* Chakra
* JScript .NET
* Nashorn

Frameworks|

| Client-side|

* Chaplin.js
* Dojo
* Echo
* Ext JS
* Google Web Toolkit
* jQuery
* Lively Kernel
* midori
* MochiKit
* MooTools
* Prototype
* Pyjs
* qooxdoo
* Rialto
* Rico
* script.aculo.us
* SmartClient
* SproutCore
* Spry
* Wakanda Framework

|

Server-side|

* AppJet
* Jaxer
* Node.js
* WakandaDB

Multiple|

* Cappuccino
* Objective-J
* PureMVC

Libraries|

* Backbone.js
* SWFObject
* SWFAddress
* Underscore.js

People|

* Brendan Eich
* Douglas Crockford
* John Resig
* Scott Isaacs

Other|

* DHTML
* Ecma International
* JSDoc
* JSGI
* JSHint
* JSLint
* JSON
* JSSS
* Sputnik
* SunSpider
* Asynchronous module definition
* CommonJS

Lists
JavaScript libraries
Ajax frameworks
Comparisons
JavaScript frameworks
server-side JavaScript

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/JavaScript library. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=JavaScript_library&oldid=4344597"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template