Last Modified: 1/29/08
  Computer Training
Major Concepts in JavaScript

Credit: Mulchaey et al (ST Sci/UMD/NASA)

JavaScript is potentially a fully general purpose language that could conceivably handle any type of problem, but client-side JavaScript operates within a very restricted environment which tends to specialize its operations and interactions. Specifically, it

  • operates within the domain of a Web client . As such it is restricted so that it cannot write anything to the server or client (except cookies) and cannot read anything from the server except images and JavaScript programs. However, it can read, write, and modify cookies on the client machine, and can control almost every aspect and behavior of a Web browser

  • is an interpretive language as opposed to a compiled language. As such it is not suitable for compute-intensive problems, but makes possible an ease and flexibility of programming that compiled languages lack. This is because machine codes are not generated in advance, as they are with compiled languages, but are created when a data object is encountered, and so the language can adapt itself based on what type of data it sees. Thus if the language encounters the line
         a = b + c
    
    it can generate the appropriate machine code whether a, b, and c are integers, real numbers, arrays, strings, etc.

  • is a secure language. Because it cannot write anything to the server or client it cannot usually do direct harm other than crashing your browser. However, this Cert Advisory shows you that there do exist some serious security issues

  • is an Object Oriented language . Almost all modern computer languages are, or are becoming, object oriented. Examples include C++, Java, Python, Perl, VBScript, and JavaScript. These languages concentrate on identifying a set of classes and data definitions and manipulations on objects in these classes rather than on some overall process. While not suitable for all problems, it is usually closer to the way we deal with problems in ordinary life and often brings major simplifications and flexibility to the code

  • is built around the Document Object Model (DOM) of the Web. This consists largely of classes of objects and fits easily into the object oriented nature of JavaScript

  • is an Event Driven language. The language usually operates by reacting to events that are triggered either explicitly or implicitly by user interactions with the browser, such as clicking on a button, scrolling down a page, mousing over a link, etc.
Previous Home Next

Course Topics

Major Concepts in JavaScript

Execution of JavaScript Programs

JavaScript Statements and Structures

JavaScript as an Object Oriented Language

The Document Object Model

Programming with JavaScript

JavaScript and DHTML

Using Cookies in JavaScript

Using JavaScript to Write HTML

 
Previous Home Next

©1999 UW Technology