JavaScript Ecosystem

four main categories of the JavaScript ecosystem that we will discuss: frontend, command-line interface, mobile, and backend

JavaScript Ecosystem
Javascript ecosystem

There are four main categories of the JavaScript ecosystem that we will discuss: frontendcommand-line interfacemobile, and backend.

  • Front-end JavaScript is used for user-facing websites.
  • Command-line interface (CLI) JavaScript is used for building command-line tasks to assist developers.
  • Mobile development JavaScript is used to build mobile phone apps.
  • Backend JavaScript is used to build web servers and services.

For a language that was created originally to embed simple applications in browsers, JavaScript has come a long way.

Frontend JavaScript

Frontend JavaScript is used for creating complicated and dynamic user-facing websites. Websites such as Facebook, Google Maps, Spotify, and YouTube rely heavily on JavaScript. In frontend development, JavaScript is used to manipulate the DOM and handle events. Many JavaScript libraries, such as jQuery, have been created to increase the efficiency and ease of JavaScript DOM manipulation by wrapping the DOM manipulation APIs of each browser into a standardized API. The most prevalent DOM manipulation library is jQuery, DOM Manipulation and Event Handling. JavaScript frameworks have also been created to more seamlessly integrate DOM manipulation and events with the HTML design aspect. Two of the most common JavaScript frameworks for frontend development are AngularJS and React. AngularJS was built by and is maintained by Google, and React was built by and is maintained by Facebook.

Facebook and Google manage bug fixes and version releases for their respective frameworks.

Command-Line Interface

Command-line integration (CLI) JavaScript is generally used to create utilities to assist developers with repetitive or time-intensive tasks. CLI programs in JavaScript are generally used for tasks such as linting code, starting a server, building releases, transpiling code, minifying files, and installing development dependencies and packages. JavaScript CLI programs are generally written in Node.js. Node.js is a cross-platform environment that allows developers to execute JavaScript code outside a browser. Node.js will be discussed in more detail in a later section of this chapter. Many developers rely on CLI utilities in their day-to-day development.

Mobile Development

Mobile development with JavaScript is quickly becoming mainstream. Since the rise of smartphones, mobile developers have become a hot commodity. While JavaScript cannot be run natively on most mobile operating systems, frameworks exist that allow JavaScript and HTML to be built into Android and IOS phone apps. The most common frameworks for JavaScript mobile development are Ionic, React Native, and Cordova/PhoneGap. These frameworks all allow you to write JavaScript to build the framework and logic of an application and then compile the JavaScript down to the native mobile operating system code. Mobile development frameworks are very powerful because they allow us to build full mobile applications in our preferred JavaScript.

Backend Development

Backend development with JavaScript is generally done with Node.js. Node.js can be used to build powerful web servers and services. As stated earlier in this topic The JavaScript ecosystem is very extensive. It is possible to write nearly any sort of program in JavaScript. Despite the number of frameworks and the capabilities of modern JavaScript, it is important to remember that a framework does not replace a good understanding of core JavaScript. Frameworks nicely wrap core JavaScript to allow us to perform powerful tasks like building mobile and desktop applications from it, but if the core principles of JavaScript and asynchronous programming are not well understood, flaws may begin to appear in our applications.