HELP! * YELLOW=global GREY=local Full HTML for

GLOBAL foilset Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript

Given by Geoffrey Fox at CPS616 spring 1997 on Feb 10 1997. Foils prepared 20 February 97
Abstract * Foil Index for this file Secs 48.9 See also color IMAGE

Discussion of 2 Examples -- Hello World and WebWisdom
General Overview of JavaScript and comparison with Java
Importance of Client Side Interpretation of Forms
Is JavaScript a Standard?
Interpreters versus Compilers
Comments on Performance

Table of Contents for full HTML of Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript


1 CPS 616 JavaScript Lectures
with Audio February 10 97
What is JavaScript!
See:
http://www.npac.syr.edu/users/gcf/cps616-97feb10

2 Abstract of CPS616-97 Lecture of February 10
3 Web Wisdom Dissemination System (This is Help Page)
4 Hello World JavaScript Example
5 Abstract of CPS616 JavaScript Presentatation
6 General Remarks on JavaScript - I
7 General Remarks on JavaScript - II
8 Java / Interpreter Structure
9 Some Performance Comments
10 We need to know HTML!

This table of Contents Abstract



HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 1 CPS 616 JavaScript Lectures
with Audio February 10 97
What is JavaScript!
See:
http://www.npac.syr.edu/users/gcf/cps616-97feb10

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * See also color IMAGE
Secs 48.9 Full HTML Index
Instructor: Nancy McCracken
teamed with Meryem Ispirli, Geoffrey Fox,
Tom Scavo, John Yip
Syracuse University
111 College Place
Syracuse
New York 13244-4100

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 2 Abstract of CPS616-97 Lecture of February 10

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * See also color IMAGE
Secs 48.9 Full HTML Index
Discussion of 2 Examples -- Hello World and WebWisdom
General Overview of JavaScript and comparison with Java
Importance of Client Side Interpretation of Forms
Is JavaScript a Standard?
Interpreters versus Compilers
Comments on Performance

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 3 Web Wisdom Dissemination System (This is Help Page)

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. *
Secs 83.5 Full HTML Index
See Original Foil

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 4 Hello World JavaScript Example

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. *
Secs 79.2 Full HTML Index
See Original Foil

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 5 Abstract of CPS616 JavaScript Presentatation

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * See also color IMAGE
Secs 380.1 Addon Full HTML Index
Java versus JavaScript versus HTML Issues
Some Simple Motivating Examples
Language Features and Syntax
The Peculiar Object Model -- Functions Properties and Methods
Arrays in old and new JavaScript
Arguments of Functions
with and other object related syntax
The JavaScript built in Math String and Date Objects
The Navigator Objects -- Frames Windows Document Form
Event Handling including Function object
Cookies
User Objects and Examples including using JavaScript for frames

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 6 General Remarks on JavaScript - I

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * Important Information in IMAGE
Secs 155.5 Full HTML Index
Historically JavaScript was called LiveScript and developed by Netscape with some of the same goals as Java but focussed on a "smaller world" -- manipulation of text and options connected with Netscape Clients
TEXT ............................................. COMPUTER Language
HTML --> JavaScript Java <--- C++
Now we can use it under some circumstances as an alternative to Java where the "rapid prototyping" of a fully scripted language is helpful
  • We expect somebody to develop a fully interpreted Java -- equivalently to extend JavaScript to support more built-in objects (e.g. networking, images)
  • JavaScript is "either" active text (HTML) or a focused language!
JavaScript can be thought of as Java with the AWT (Abstract Windowing Toolkit) replaced by Netscape Client
  • JavaScript is a domain specific Interpreter for "Web Document Domain"
  • e.g. Postscript is a domain specific Interpreter for text layout and MATLAB is an interpreter for matrix manipulation, Mathematica is domain specific for mathematics ......

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 7 General Remarks on JavaScript - II

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * See also color IMAGE
Secs 466.5 Full HTML Index
JavaScript particularly useful for multi-frame windows and for manipulating forms without complex CGI (Server Side) scripts
Here it can be much faster as purely client side whereas a CGI based form has inevitable delays as requires server-client communication and invocation of a new process on server side.
  • Java shares this advantage
This client side processing speed can be essential in some applications as users would not accept long delays (several seconds) on "trivial" mouse clicks
Java is a broad industry standard with a careful well documented design
JavaScript comes from Netscape but is supported by Microsoft.
  • It has a poorly documented (and thought through ?) basic design

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 8 Java / Interpreter Structure

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * See also color IMAGE
Secs 144 Full HTML Index
Typical Java Applet Structure
  • Java Source ---> javac compiler --> JavaVM Universal machine code in .class file
  • Store JavaVM .class files on Web Server
  • Download JavaVM from Server to Client.
  • Interpreter built into browser, reads JavaVM and executes on client
Typical JavaScript Structure
  • JavaScript source is included in HTML text
  • Combined JavaScript and HTML is downloaded and interpreted by browser on client to produce HTML page
  • Particular user actions on HTML page (e.g. mouse clicks and form entries) can invoke JavaScript functions on the client
  • As browser one must "understand" raw high level language, this is substantially slower than interpreting JavaVM where "just" need to map universal machine code into machine code for a particular computer
Note in each case , Java and JavaScript use "runtime" which is "compiled high performance library" (probably written in C and C++)

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 9 Some Performance Comments

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * See also color IMAGE
Secs 156.9 Full HTML Index
Execute C code Instruction -- 1 clock cycle ( 10^8 per second)
Run a client side C subroutine -- can do upto 10^6 instructions in time (few milliseconds) that is significant for user
JavaVM Interpreter -- roughly 50 times slower than C
JavaVM Just in Time Compiler (effectively compile JavaVM in real time) -- roughly 2 to 8 times slower than C
Native Java Compiler -- same speed as C
Perl Interpreter (but does process whole program before interpreting) -- 500 times slower than C except in runtime
Tcl, JavaScript "true" Interpreters - 5000 times slower than C
  • Can still do 100-1000 instructions in time that users don't notice!
Contact Host via CGI script -- Server, Network and Client HTML page regeneration delay can be measured in seconds.

HELP! * YELLOW=global GREY=local HTML version of GLOBAL Foils prepared 20 February 97

Foil 10 We need to know HTML!

From Feb 10 Delivered Lecture for Course CPS616 -- Introduction to JavaScript CPS616 spring 1997 -- Feb 10 1997. * See also color IMAGE
Secs 70.5 Full HTML Index
Note like most interpreters (look at Basic manual) JavaScript has a huge and growing number of "basic" methods and objects
To study JavaScript, we will have to use some relatively advanced HTML features including
  • Frames
  • Forms -- especially event handlers
  • Cookies

Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat May 3 1997