영문/Concept

What is JavaScript Library?

로이327 2023. 1. 28. 14:53

 

JavaScript library

A JavaScript library is a collection of pre-written JavaScript code that allows developers to easily add common functionality to their projects without having to write it from scratch. These libraries can include things like:

  • Commonly used utility functions and objects
  • Cross-browser compatibility shims
  • DOM manipulation and traversal
  • Animation and transition effects
  • Event handling
  • AJAX (Asynchronous JavaScript and XML) and networking functionality
  • Data visualization and charting
  • And many more

JavaScript libraries are usually open-source and available for free to use and modify. Some examples of popular JavaScript libraries include jQuery, Lodash, and Moment.js.

 

Difference JavaScript libraries and frameworks

JavaScript libraries are different from frameworks, frameworks are more complete and opinionated, they provide a structure and conventions to follow, libraries are more focused on providing specific functionality. While a framework may dictate the overall architecture of an application, libraries are meant to be used in conjunction with a developer's own code, and are typically used to add specific features or functionality to an application.

 

Conclusion

In summary, libraries are a set of pre-built scripts that you can use to help you solve common problems and make your development process more efficient, whereas frameworks are more comprehensive and dictate the structure of your application.