Use-cases of JavaScript

Dipali kelwade
8 min readJun 26, 2021

JavaScript, often abbreviated as JS, is a programming language that
conforms to the ECMAScript specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class
functions.
As a multi-paradigm language, JavaScript supports event-driven,
functional, and imperative programming styles. It has application programming interfaces (APIs) for working with text, dates, regular expressions, standard data structures, and the Document Object Model(Dom).

JavaScript engines were originally used only in web browsers, but they are now core components of other software systems, most notably servers and a variety of applications.
JScript was first released in 1996, alongside initial support for CSS and extensions to HTML. Each of these implementations was noticeably different from their counterparts in Navigator. These differences made it difficult for developers to make their websites work well in both browsers,
leading to widespread use of “best viewed in Netscape” and best viewed in Internet Explorer” logos for several years.

JavaScript Usage by Industry

Front-End

There are three main components when it comes to front-end development: HTML, CSS, and JavaScript. HTML is the structure and content of the site, CSS (Cascading Style Sheets) makes it look pretty, and JavaScript is what powers its interactivity. It powers the site’s general interactivity and makes it possible to build rich UI components such as image sliders, pop-ups, site navigation mega menus, form validations, tabs, accordions, and much more. Various banner ads have chat support, suggest content, have formed or offers social sharing they are powered by a 3rd party JavaScript plugin.

Facebook

Almost every website uses JavaScript, even if we try to use facebook’s website after disabling JavaScript, it wouldn’t allow us to log in, this may show the importance of JavaScript in Facebook. The dynamic aspect to its website is provided by JavaScript, even if we inspect the code, we will end up getting only JavaScript code. These multiple scripts help to render various other pages of Facebook quickly. Additionally, Facebook is the one who created React.js, the most reactive framework of JavaScript which is also used in Facebook, Instagram, and WhatsApp.

Google

Google of course uses JavaScript, whenever we start typing in the search box, it gives us suggestions. It’s all because of JavaScript. Nobody can ever imagine using the Internet without Google and the dynamic nature of Google is provided by JavaScript. Google is also the creator of one of the most popular front-end frameworks, Angular.

Back-End

Backend developers use a type of JavaScript called Node.js for backend work. The Node.js framework allows a developer to handle data updates from the front end and build scalable network applications able to process many simultaneous user requests, amongst other things. Node.js is the most popular backend framework; it is used in MERN, MEAN, and MEVN stacks.

Walmart

Walmart is one of the largest retailers across the globe, their adaptation to changing technology has always been a positive highlight for them, Initially, they used Java but to operate in a small power machine i.e, mobile phone they shifted to JavaScript and used Node.js for the backend. Walmart can serve some very sophisticated features to mobile users on the client-side using Node. It’s saving mobile shoppers a ton of time by customizing content based on device type and browser capabilities.

Mobile Applications

Mobile Applications are classified into three categories Native, WebApp, and Hybrid. The Hybrid applications can be deployed in a native container that uses a mobile WebView object. When the app is used, this object displays web content thanks to the use of web technologies (CSS, JavaScript, HTML, HTML5). It is displaying web pages from a desktop website that are adapted to a WebView display. The web content can either be displayed as soon as the app is opened or for certain parts of the app only i.e. for the purchase funnel. Many JavaScript frameworks for Mobile Apps are jQuery Mobile, React Native, NativeScript, Apache Cordova, Ionic, Titanium.

Gmail

One of the Google products is a hybrid application that is so high performance that we use it daily. The features of native and web are combined to create a hybrid app.

Instagram

Instagram is one of the most popular applications used extensively by every 14–45 years old. But due to its high performance, no one realizes that it is a hybrid mobile application. The hybrid approach allows Instagram to support the data in the offline mode and process tons of media. By the way, Facebook that bought Instagram is still Native.

Desktop Applications

Now JavaScript Developers can build Desktop applications utilizing their website knowledge and, there are various frameworks available for the same like Electron, NodeGUI, NW.js, Meteor, Proton Native, etc.

Microsoft Edge

Microsoft Edge is one of the most used web browsers and, it needs to work closely with JavaScript to build the web browser. All browsers need to process and execute JavaScript efficiently, so Microsoft has developed and maintains its JavaScript engine for Edge. All the dynamic aspects and various features on the web page need JavaScript to function efficiently.

Google Chrome

All web browsers need JavaScript to function and Chrome is created using HTML, CSS, Python, C, C++, and JavaScript along with 25 different libraries. Google created its browser and that is one of the most widely used browsers because of its dynamic and reliable features.

These are some of the use-cases of javaScript.

Web Development

Javascript is a client scripting language which is used for creating web pages. It is a standalone language developed in Netscape. It is used when a webpage is to be made dynamic and add special effects on pages like rollover, roll out and many types of graphics. It is mostly used by all websites for the purpose of validation. In addition to validations, it supports external applications like PDF documents, running widgets, supporting flash applications etc. It can also load content into a document whenever the user requires it without even
reloading the entire page.

Web Applications

With technology browsers and personal computers have improved to the extent that a language was required to create robust web applications. When a user explores a map in Google Maps then the user just needs to click and drag the mouse. All detailed views are visible by just a click. This is possible
due to JavaScript. It interacts with the browser without sending messages to and fro to the servers. JavaScript uses Application Programming Interfaces(APIs) that provide extra powers to the code.

Presentations

JavaScript also provides the facility of creating presentations as a website. JavaScript provides RevealJS and BespokeJS libraries to build a web-based slide deck. Reveal.js creates some of the most beautiful and interactive decks
using HTML. A user can easily insert nested slides. Even if the user is not aware of programming language then they can easily build a site with so much help online. These presentations are touch optimized and work great
with mobile devices, phones, and tablets. With all this JavaScript also
provides different transition styles, themes, and slide backgrounds. It supports all CSS color formats. JavaScript also provides Bespoke.js plugin with a wide variety of features. These include responsive scaling, animated bullet lists,
and syntax highlighting for code examples. It provides themes which are polished and not too flashy. The quickest way to start Bespoke.js is using a generator. It allows the user to set titles to your presentation and go through a set of questions to get the plugins required.

Server Applications

Node JS is built on Chrome’s Javascript runtime for building fast and scalable network applications. It uses event-driven, lightweight and efficient applications which are to be distributed over the systems with the help of a server. Javascript is used to handle HTTP requests and generate content.

When a user is writing thick applications in JavaScript on the client then a user may even write the logic in JavaScript on the server so that cognitive leaps can be done from one language to the other.

Web Servers

Using Node JS a web server can be created. The advantages of Node JS are that it is event-driven and would not wait for the response of the previous call.
It moves to the next call and takes advantage of events to get notifications when a response is received for a previous call. The servers built on Node JS are very fast and do not use buffering and transfers chunks of data. In
addition to this, it is single threaded with event looping which is used in a non-blocking way. The HTTP module can help in creating a server by using the createServer() method. This method is executed whenever someone tries to access port 8080. In response to this, the HTTP server should display HTML and should be included in the HTTP header. It can be installed easily by typing
npm install -g http-server’ and it can be started by typing http-server command.

Thankyou for reading.

By Dipali Kelwade, Prabhat Kumar, Gargi Somani, Vaishnavi Kamekar, and Yash Bhosale

--

--