JavaScript library explained

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.

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]

Packages

All npm packages are JavaScript libraries, but not all libraries are packages. Npm originally stood for "Node Package Manager", as the name implies, npm serves as a package manager for packages used in Node.js runtimes.[12] [13] However, some npm packages offer CDN support for use of the library in both Node.js runtimes as well as the browser.[14]

See also

Notes and References

  1. Book: JavaScript & JQuery: The Missing Manual . David Sawyer McFarland . 2014 . 9781491948620 . . 106.
  2. Web site: What is a JS library?. Khan Academy. 2018-01-15.
  3. Web site: Peters . Siem . 2019-04-08 . A Brief History of JavaScript: from Netscape to Frameworks . 2022-03-15 . Medium . en.
  4. Web site: AsyncBanana . 2021-04-21 . A Short History of JavaScript and Its Evolution . 2022-03-15 . Medium . en.
  5. Book: JavaScript and AJAX For Dummies . Andy Harris . 2009 . 9780470417997 . . 240.
  6. Book: Smashing JQuery . Jake Rutter . 2011 . 9780470977361 . . 21.
  7. Web site: Walsh . David . 2007-09-05 . 6 Reasons To Use JavaScript Libraries & Frameworks . 2022-03-15 . David Walsh Blog . en.
  8. Web site: 40 Useful NPM Packages for Node.js Apps in 2021 . 2022-03-15 . leanylabs.com . en.
  9. Book: JavaScript Cookbook . Shelley Powers . 2010 . 389–412 . 9781449395926 . O'Reilly Media.
  10. Web site: 2019-02-01 . The Difference Between a Framework and a Library . 2022-03-15 . freeCodeCamp.org . en.
  11. Web site: What is the difference between Library vs Framework? . 2022-03-15 . DEV Community . en.
  12. Web site: 2022-01-20 . A Clear Definition of npm and What it Does . 2022-03-15 . CSS-Tricks . en.
  13. Web site: Node.js NPM . 2022-03-15 . www.w3schools.com . en-US.
  14. Web site: Grosselle . Alessandro . 2019-11-12 . The JS library distribution dilemma, NPM or URL? . 2022-03-15 . THRON tech blog . en.