How does JavaScipt work?
A client-side script is a programming language that performs its tasks entirely on the client’s machine and does not need to interact with the server to function. For instance, if you have a Web page loaded on your computer and your Internet service provider goes down, you are still able to interact with the Web pages already loaded on your browser. You will not, however, be able to navigate to new Web pages or access any data located remotely.
- Loading new content or data onto the page without reloading the page
- Rollover effects and dropdown menus
- Animating page elements such as fading, resizing or relocating
- Playing audio and video
- Validating input from Web forms
- Repairing browser compatibility issues
Take a search engine for example. Today, search engines almost all have an autocomplete function. The user begins typing a word into the search box and a list of possible search terms or phrases appears below. The experience is seamless. Suggested search terms appear without reloading the page.
Only once the user selects a search term does the entire page reload and produce the search results. Engines such as Google have reduced or eliminated the need to reload, even for that step. They simply produce results using the same asynchronous process.
Like PayPal, Netflix started out using Java for just about everything. They too ran into problems with Java’s size and the time it required to develop.
Over time, Netflix moved away from its more traditional structure into the cloud and started to introduce NodeJS. With Node, Netflix was able to break down pieces of their user interface into individual services. This more distributed approach was able to speed things up an alleviate stress on their servers. Today, a large portion of Netflix’s interface is running on Node.