ALL > Computer and Education > courses > university courses > undergraduate courses > An Overview of Computer Science > zstu-(2019-2020-1) class >
homework5.1_ 2019529628044 PATIENCE FERO Version 0
👤 Author: by patiencefero7gmailcom 2019-11-05 13:57:26
COMPUTER LANGUAGE

What is jav ascr ipt?

jav ascr ipt is a high level computer programming scr ipting language which is lightweight and commonly used as a part of web pages, and allow client-side scr ipt to interact with the user so as to make dynamic pages. It is an interpreted programming language with object-oriented capabilities. Traditional languages such as C++ are compiled before they’re run into executable binary form, with the compiler checking for any errors in the entire program before the process is complete. scr ipting languages, by contrast, are executed one line at a time by another program called an interpreter. scr ipting languages got their start as simple series of shell commands used to execute other programs, but their flexibility and ease of use made them a popular type of programming language in their own right, and they particularly became important with the rise of the Web.

jav ascr ipt was first known as Live scr ipt, but Netscape changed its name to jav ascr ipt, possibly because of the excitement being generated by Java. jav ascr ipt made its first appearance in Netscape 2.0 in 1995 with the name Live scr ipt. The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers.

The ECMA-262 specification defined a standard version of the core jav ascr ipt language.

  • jav ascr ipt is a lightweight, interpreted programming language.

  • Designed for creating network-centric applications.

  • Complementary to and integrated with Java.

  • Complementary to and integrated with HTML.

  • Open and cross-platform


Differences between Java and jav ascr ipt

In Java, to define a variable, you have to say what type of variable it is: a number, a word, a letter, or more. In jav ascr ipt, this is not necessary.

In jav ascr ipt, functions are stored as variables (unlike Java). This makes the following code okay in jav ascr ipt

Advantages of jav ascr ipt



  • Less server interaction − you can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.

  • Immediate feedback to the visitors − they don't have to wait for a page reload to see if they have forgotten to enter something.

  • Increased interactivity − you can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.

  • Richer interfaces − you can use jav ascr ipt to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.


Disadvantages of jav ascr ipt



  • Client-side jav ascr ipt does not allow the reading or writing of files. This has been kept for security reason.

  • jav ascr ipt cannot be used for networking applications because there is no such support available.

  • jav ascr ipt doesn't have any multi-threading or multiprocessor capabilities.


Once again, jav ascr ipt is a lightweight, interpreted programming language that allows you to build interactivity into otherwise static HTML pages.

Client-side jav ascr ipt extends the core language by supplying objects to control a browser and it’s Document Object Model (DOM). For example, 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.

Server-side jav ascr ipt extends the core language by supplying objects relevant to running jav ascr ipt on a server. For example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.

This means that in the browser, jav ascr ipt can change the way the webpage (DOM) looks. And, likewise, Node.js jav ascr ipt on the server can respond to custom requests from code written in the browser.

 

 

Please login to reply. Login

Reversion History

Loading...
No reversions found.