JavaScript & its Use-Cases
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 use.
Incorporating JS improves the user experience of the web page by converting it from a static page into an interactive one, it adds?behavior?to web pages.
What is JavaScript used for ?
JavaScript is mainly used for web-based applications and web browsers. But JS is also used beyond the Web in software, servers and embedded hardware controls. Here are some basic things JavaScript is used for :
?Major frameworks in JavaScript
A Framework refers to the set of?ready-to-use?codes written in JavaScript to build software solutions. It comes with a predetermined application design and toolset. Thus, the development process can be fast-forwarded, which in turn saves time, money, and effort for businesses. Here are a few JS frameworks which are highly influential and equally popular :
Here are some use-cases of JS
PayPal
PayPal is an?E-commerce?company that facilitates payments between parties through online transfers. PayPal allows customers to establish an account on its platform, which is connected to a user's?credit card?or checking account. Once identification and proof of funds are confirmed, users can begin sending or receiving payments to and from other PayPal accounts online or through the company's app
Paypal was one of the first company who was given a chance to use Node.js, to take the risk to make difference because at that time Node.js was not popular language.
PayPal?has decided to use?JavaScript?from browser all the way to the back-end server for web applications, giving up legacy code written in JSP/Java. The PayPal JavaScript SDK dynamically exposes objects and methods, based on components you are using. These components are configured in the?components?query string parameter in the URL you have included in the?<script>.
The online payment giant was one of the earliest adopters of NodeJS. During an overhaul of their account overview page, they decided to try building the page in Node at the same time as their usual Java development. The NodeJS version worked out so well, that they chose to use it in production and build all client-facing applications in Node going forward. That means that most of what you see in your account is running on Node.
You can develop an application in half time using Node.js compare to Java.
Netflix
Netflix?is a streaming service that offers a wide variety of award-winning TV shows, movies, anime, documentaries and more – on thousands of internet-connected devices. You can watch as much as you want, whenever you want, without a single ad – all for one low monthly price. Netflix?is one of the world’s largest online media streaming providers delivering almost 7 billion hours of videos to nearly 50 million customers in 60 countries per quarter.
Netflix is the best example who leveraged the benefit of Node.js by implementing it for production and they achieved the tremendous result-economically and in performance.
Earlier Netflix was using Java on server side and javascript on frontend side so developer had to code twice, which required them to understand both the languages. They had to write everything twice for error handling, activity tracking and debugging.
Netflix is now among companies using Node.JS due to the following reasons:
领英推荐
?LinkedIn?is a social network for professionals to connect, share, and learn.
This professional networking platform is also among websites using Node.JS. The server side of the LinkedIn mobile app was built by using Node.JS. They actually moved the back end of the mobile application from Ruby on Rails to Node. Two key reasons for this switch were efficient performance and scalability.
The Ruby on Rails app was a synchronous app that the clients used to make several calls for a single page. All of the calls occurred sequentially, with each thread handling a single request. Node.JS allowed LinkedIn developers to move to an asynchronous event system where the client made a single request per page.
LinkedIn is now among companies using Node.JS due to the following reasons:
Twitter is?an online news and social networking site where people communicate in short messages called tweets.
In April 2017, Twitter released Twitter Lite, a mobile app with minimum functionality that can work with slow Internet connections. The app minimizes the data usage, is resilient on unreliable mobile networks, and takes up less than 1 MB on any device.
The Twitter team used Node.JS to build, test, and deliver this application. Before Node.JS, the company had a different technology on the back end and spent lots of time-solving the operational issues. Node.JS allowed the engineers to have the same technology and thus be more productive, spending more time on actually building the app than resolving the problems.
Uber
Uber’s matching system creates an enormous amount of supply notifications for drivers and demand requests for passengers. Besides, a ride request helps to choose the driver through the matchmaking process.
The drivers are stored in a geospatial database that is continuously updated by each active driver on the network as they move around the city.Uber needed a system to be reliable both to passengers and drivers and named the 3 key reasons for choosing Node.JS:
As a result, Uber now can process over 2 million remote procedure calls (RPCs) per second.
JavaScript is Everywhere !
Hope you all will find this article helpful
Thank you !