Industry Usecase of JavaScript
Harshita Kumari
DevOps Engineer | Terraform/RHCSA/AWS/Azure Certified | AWS,Docker, Ansible, Kubernetes ,Terraform ,Python ,Jenkins,
INTRODUCTION
JavaScript is a lightweight, cross-platform, and interpreted scripting language. It is well-known for the development of web pages, many non-browser environments also use it.
JavaScript can be used for Client Side developments as well as Server side developments. JavaScript contains a standard library of objects, like Array , Date , and Math , and a core set of language elements like operators, control structures, and statements.
- Client-side: It supplies objects to control a browser and its Document Object Model (DOM). Like if client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation. Useful libraries for the client-side are AngularJS, ReactJS, VueJS and so many others.
- Server-side: It supplies objects relevant to running JavaScript on a server. Like if the server-side extensions allow an application to communicate with a database, and provide continuity of information from one invocation to another of the application, or perform file manipulations on a server. The useful framework which is the most famous these days is node.js.
Industrial Usecase:
Javascript plays a major role in the development of the web as well as the Mobile App of Facebook. The most popular framework, I guess you all must be aware of is React Js which was initially released by Facebook and has undergone tremendous growth in the time since.
React JS:
It is an open-source front-end library used for the development of single-page or mobile applications. It was introduced by Facebook, it was created for the purpose of targeting specific needs at Facebook for the news feed section, and continues to be maintained.
The need for the ReactJS library is to implement virtual DOM, where it allows us to update the changes without rewriting the entire HTML doc virtually. This makes React much faster and ensures fast performance despite whatever the size of the app is. React uses one-way binding, while designing a react application developers often nest child components within higher-order parent components. One-way binding makes the code more stable and also makes debugging easy.
React approaches building UIs by breaking them into components. Each component manages its own state and passes those states through props. whenever you are implementing react you will need multiple integrations and supporting tools such as,
- Redux: A state container that speeds up the work of reacting in large apps.
- Babel: Converts JSX into JavaScript for the app to be understood by browsers.
- Webpack: A standard module bundler.
The company’s development team used React Native to create their current mobile applications for both iOS and Android. Both mobile apps were created by the same development team using a single JavaScript language, so they share common features and work in the same intuitive manner.
The deployment of native applications has improved Facebook’s user experience. Real-time events on the user dashboard now load twice as quickly and the app has fewer bugs than before. Just as importantly, Facebook’s users love their new native apps and improved user experience.
NETFLIX
Netflix is one of the most popular video streaming services. Since launching globally in 2016, the company has found that many new users are not only signing up on mobile devices but are also using less-than-ideal connections to do so.
By refining the JavaScript used for Netflix.com’s sign-up process and using prefetching techniques, the developer team was able to provide a better user experience for both mobile and desktop users and offer several improvements.
- Loading and Time-to-Interactive decreased by 50% (for the logged-out desktop homepage at Netflix.com)
- JavaScript bundle size reduced by 200kB by switching from React and other client-side libraries to vanilla JavaScript. React was still used server-side.
- Prefetching HTML, CSS and JavaScript (React) reduced Time-to-Interactive by 30% for future navigations
Netflix is the world’s supplier of flowing broadcast and television. Netflix is the world’s top supplier of flowing broadcast and television. The company decided to embrace fast and easy Node.JS.
Earlier, Netflix was using Java on the back end and JavaScript on the front end, which required the developers to be proficient with languages.
As a result, they had to do double work for error handling, activity tracking and debugging.
Netflix is now among companies using Node.JS due to the following reasons:
- A common language both for the server-side and browser side.
- High performance — now the page loads within seconds.
- A great number of modules and their open-source nature.
- An easy way of writing, debugging and engineering the API.
Netflix initially used Node.js to enable high-volume web streaming to over 182 million subscribers. Their three goals with this early infrastructure were to provide observability (metrics), debuggability (diagnostic tools), and availability (service registration). The result was the NodeQuark infrastructure. An application gateway authenticates and routes requests to the NodeQuark service, which then communicates with APIs and formats responses that are sent back to the client. With NodeQuark, Netflix also created a managed experience — teams could create custom API experiences for specific devices. This allows the Netflix app to run seamlessly on different devices.
CONCLUSION:
Over the last decade, JavaScript has become the most popular language for webapp development , mobile application development and many more. 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.
THANKYOU FOR READING!
Senior Associate, Infrastructure Specialist
3 年Inspiring
PriceFx Certified Configuration Engineer
3 年nice