JS Introduction

What is Javascript ?

JavaScript is also called JS is an object oriented programming language which is mostly used for web development for scripting webpages. Now a days JS is also used for several other platforms like Desktop Applications, server side applications etc. JS is an interpreted language which allows to apply client side interaction to web pages. On a webpage JS is applied to HTML document.

JS was developed in 1995 by Brendan Eich. Initially it was used on the Netscape Navigator browser later on it was adopted by other web browsers. JS enables to develop modern web applications with the help of client side interaction. When we say client side interaction that means we can interact without communicating to backend server side we can implement dynamic functionalities on the client side. JavaScript is a case-sensitive language.

Features of Javascript

Client side Interaction

JavaScript is a client side technology. It allows basic interaction on the browser without interacting to the server every time. This feature is useful for maintaining performance in the scenario where continuous operations are to be performed. Since communicating each time with the server for each action reduces the site performance therefor interaction on client side is the best feature of JavaScript.

Input validation

JavaScript is very useful when we need to validate user input. In HTML forms we can validate user input to a great extend. JavaScript checks the user input on the HTML form and validates it and makes sure it is in the expected form and then sends the data to the server. e.g If an input field is supposed to have email address we can validate this user input using JavaScript Regular expression and we can check that the value is a correct email address. After successful validation we can send the data to the server.

Validating input on the server side improves performance Imagine validating each input from server side every time will slow down the performance this is where JS is powerful in validation.

Platform Independent
JavaScript is interpreted on the browser thus it is not dependent on the server. This makes JavaScript compatible across all the platforms. We can also include JavaScript in HTML that runs on all the browser thus JS also runs without platform dependency.

HTML contents
JavaScript can generate dynamic HTML contents on the web page. Using JS we can add Images, tables, Text in the HTML form on occurrences of JS events.

Platform Detection
JavaScript is powerful enough to detect users browser and OS information. We may need to know users browser before executing a script in such scenario we can detect platform and write browser specific code. Detecting Browser and platform enables to maintain good control over the web browsers.

Applications of Javascript

  • Websites and Web Applications
  • Server side Applications
  • Web servers
  • Games
  • Smartwatch Apps
  • Mobile Apps

About the Author: allcodebuzz

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *