Use Case of JavaScript

Arnab Saha
7 min readAug 11, 2021

What is JavaScript?

JavaScript is a text-based programming language used both on the client-side and server-side that allows you to make web pages interactive. Where HTML and CSS are languages that give structure and style to web pages, JavaScript gives web pages interactive elements that engage a user. Common examples of JavaScript that you might use every day include the search box on Amazon, a news recap video embedded on The New York Times, or refreshing your Twitter feed.

Incorporating JavaScript improves the user experience of the web page by converting it from a static page into an interactive one. To recap, JavaScript adds behaviour to web pages.

JavaScript Framework consists of a huge collection of various JavaScript libraries that supplies the programmers with pre-written code and thus allows even those who don’t have a lot of programming knowledge. Some of Framework are AngularJS, NodeJS, EmberJS, etc.

Why to use JavaScript over other programming languages?

Aside from the unlimited possibilities, there are many reasons for web developers to use JavaScript over other programming languages:

  • JavaScript is the only programming language native to the web browser
  • JavaScript is the most popular language
  • There’s a low threshold to get started
  • It’s a fun language to learn

Applications of JavaScript?

Every type of software uses JavaScript, including the server code (Node.js), productivity apps, 3D games, robots, IOT devices.

Almost all the Top companies are using JS like Netflix, Uber, Wallmart, Paypal, LinkedIn & more.

Importance of JavaScript in Web Designing

There are different web designing and practical uses of JavaScript:

1. Improvement in Web Interface

In these days, what we are doing with JavaScript is we enhance the old, tired and true web interface — clicking links, entering information and sending off, etc — to be more responsive to the end-user.

For example — A sign-up form can check if your name is available when you enter it, preventing you from having to endure a frustrating reload of the page.

2. Word Suggestion in Search Box

A search box can give you suggested results when you type, based on what has been entered so far.

For example — “bi”, could bring up suggestions to choose from that contain the string such as “bird”, “big”, and “bicycle”. This usage pattern is called Autocomplete.

3. Instant Update of Information

Information that changes constantly can load periodically without the need for user interactions.

For example — Sports match results or stock market tickers.

4. Loading Information Only When User Choose

Information that is nice to have and runs the risk of being redundant to some users can be loaded when and if the user chooses to access it.

For example — The navigation menu of a site can contain 6 links but display links to deeper pages on demand when the user activates a menu item.

5. Fixing Layout Issues

It can find the position and area of the element on the particular page and the dimensions of the browser window. By implementing this information you can stop overlapping elements and other similar issues.

For example — You may have a menu with several levels by clicking and checking if there is space for the submenu to appear before showing it, you can prevent scroll bars or overlapping menu items.

6. Enhancing HTML Interface

JavaScript can enhance the interfaces that HTML gives us. While it’s nice to have a text input box, you might want to have a combo box allowing you to choose from a list to preset values or enter your own. You can enhance a normal input box to do that, using JavaScript.

7. Animation of Page Elements

JavaScript helps to animate elements on a page to show and hide information or highlight specific sections of a page and make it more usable and richer user experience.

Lets see how popular and most used apps are built with JavaScript….

🎯Facebook…!!!

Facebook continues to be one of the most important corporate supporters of the JavaScript development library.

The popular JavaScript framework React Native was developed and released by Facebook in 2015–and has undergone tremendous growth in the time since.

You’re probably aware that Facebook uses JavaScript. It’s kind of hard to miss. What’s probably not as obvious is exactly how much JavaScript goes into making Facebook and how much Facebook is involved in JavaScript development.

Try disabling JavaScript in your web browser and going to Facebook. The website will actually stop you from logging in because it won’t work without JavaScript.

You may have noticed the way that Facebook loads. Each piece of the page is separate. Facebook has invented its own way of breaking down and delivering sections of JavaScript separately. In an odd way, each section of your Facebook page is a collection of independent JavaScript applications.

It doesn’t stop there. Facebook created React, one of the most popular front end frameworks. Facebook uses React on Facebook.com as well as Instagram and WhatsApp.

Facebook created React Native (also known as RN is a popular JavaScript-based mobile app framework that allows you to build natively-rendered mobile apps for iOS and Android )to overcome user design challenge. While it was initially designed for iOS development, it is now used for both Android and Windows 10 projects as well.

React Native was created to solve a major problem with Facebook’s mobile applications. Cross-platform development allows companies to develop mobile applications that function on multiple operating systems.

However, because the code is generalized for multiple operating systems, the user interface and experience design often looks unnatural on each device.

🎯Netflix…

Netflix rapidly transformed itself from a movie rental business into one of the largest media companies in the world.

The company was originally founded as a local DVD subscription service in 1997. Today, Netflix has over 148 million subscribers across the globe and is the most popular video streaming service in the world.

So, when it came time for the company to redesign its online streaming platform in 2014, the development team turned to Node.js. By this time, the JavaScript library had already developed a reputation as a simple framework with wide applicability.

Previously, the company used Java for the server side and JavaScript for the front-end. The back-end was handled by a single large application running Groovy scripts. This forced developers to become fluent in two different programming languages. Node.js (Node.js brings event-driven programming to web servers, enabling development of fast web servers in JavaScript) eliminated this problem.

By using the same JavaScript framework on the front-end and back-end, Netflix developers 🦹‍♂️🦹‍♀️ reduced their workload and increased the quality of the final web application. By utilizing separate APIs written in Node.js, Netflix was able to reduce its total development time and improve their application’s speed.

🎯Candy Crush…

Candy Crush Saga is one of the most successful video games of all time. The free-to-play matching puzzle game was initially released as a Facebook web application in 2012 before being reworked for Windows, Android, and iOS.

Candy Crush was one of the first popular freemium games. This means that the game is free to play, although in-game purchases can help users progress faster or purchase add-ons. This model allowed the company behind Candy Crush, King Digital Entertainment, to earn more than $4 million per day in 2018.

King Digital Entertainment developed Candy Crush Saga with the JavaScript programming language…..

The flexible nature of this framework enabled developers to create a mobile application that looked and felt like the Facebook web application.

In addition, Candy Crush made use of Facebook’s React Native Javascript framework to link the mobile game with Facebook’s web application. This allowed users to invite friends to the game and compare their scores against their social network. This feature helped make the game so popular and kept users engaged past their initial download.

“The success of the Candy Crush model has transformed the mobile gaming industry. Applications like Bejeweled and Zookeeper Battle have used JavaScript to create similar ultra-successful games. Expect to see JavaScript continue to dominate the mobile gaming market because of its extensive frameworks and wide applicability.”

🎀Over the last decade, JavaScript has become, by far, the most popular language for mobile application development. This happened because of early adoption by tech giants like Facebook and Netflix and by the JavaScript development outsourcing firms who help these businesses scale their development capabilities.

If you like it please clap it.😁🤗

Connect with me on LinkedIn | GitHub

--

--