-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintrod.html
127 lines (112 loc) · 4.38 KB
/
introd.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<html>
<head>
<title>Introduction</title>
</head>
<body>
<b>Ongoing JavaScript Development</b>
<p>
Development of the JavaScript language and its documentation
continues. Additional features are planned; some current features
could be modified if necessary.
<hr>
<h1>Introduction</h1>
<ul>
<li><a href="#C1">The JavaScript Language</a>
<li><a href="#C2">JavaScript and Java</a>
<!-- <LI><a href="#C3">JavaScript Development</a> *** commented out until 2.1 --->
</ul>
<a name="C1"><h2>The JavaScript Language</h2></a>
<p>
<p>
JavaScript is a compact, object-based scripting language for developing client and server
Internet applications. Netscape Navigator 2.0 interprets JavaScript statements embedded
directly in an HTML page, and LiveWire enables you to create server-based applications similar
to common gateway interface (CGI) programs.
<p>
In a client application for Navigator, JavaScript statements embedded in an HTML page can
recognize and respond to user events such as mouse clicks, form input, and page navigation.
<p>
For example, you can write a JavaScript function to verify that users enter valid
information into a form requesting a telephone number or zip code.
Without any network transmission, an HTML page with embedded JavaScript can interpret
the entered text and alert the user with a message dialog if the input is invalid.
Or you can use JavaScript to perform an action (such as play an audio file, execute an applet,
or communicate with a plug-in) in response to the user opening or exiting a page.
<hr>
<a name="C2"><h2>JavaScript and Java</h2></a>
<p>
The JavaScript language resembles Java, but without Java's static
typing and strong type checking. JavaScript supports most of Java's
expression syntax and basic control flow constructs. In contrast to
Java's compile-time system of classes built by declarations,
JavaScript supports a run-time system based on a small number of
data types representing numeric, Boolean, and string values.
JavaScript has a simple instance-based object model that still provides
significant capabilities.
<p>
JavaScript also supports functions, again without any special declarative
requirements. Functions can be properties of
objects, executing as loosely typed methods.
<p>
JavaScript complements Java by exposing useful properties of Java
applets to script authors. JavaScript statements can get and set exposed properties to query the
state or alter the performance of an applet or plug-in.
<p>
Java is an extension language designed, in particular, for fast
execution and type safety. Type safety is reflected by being unable
to cast a Java <code>int</code> into an object reference or to get at
private memory by corrupting Java bytecodes.
<p>
Java programs consist exclusively of classes and their methods. Java's
requirements for declaring classes, writing methods, and ensuring
type safety make programming more complex than JavaScript authoring.
Java's inheritance and strong typing also tend to require tightly
coupled object hierarchies.
<p>
In contrast, JavaScript descends in spirit from a line of smaller,
dynamically typed languages like HyperTalk and dBASE. These scripting
languages offer programming tools to a much wider audience because of
their easier syntax, specialized built-in functionality, and minimal
requirements for object creation.
<p>
The following table compares and contrasts JavaScript and Java.
<p>
<table border>
<tr>
<th>JavaScript</th>
<th>Java</th>
</tr>
<tr>
<td>Interpreted (not compiled) by client.
<td>Compiled on server before execution on client.
</tr>
<tr>
<td>Object-based. Code uses built-in, extensible objects, but no classes or
inheritance.
<td>Object-oriented. Applets consist of object classes with inheritance.
</tr>
<tr>
<td>Code integrated with, and embedded in, HTML.
<td>Applets distinct from HTML (accessed from HTML pages).
</tr>
<tr>
<td>Variable data types not declared (loose typing).
<td>Variable data types must be declared (strong typing).
</tr>
<tr>
<td>Dynamic binding. Object references checked at run-time.
<td>Static binding. Object references must exist at compile-time.
</tr>
<tr>
<td>Cannot automatically write to hard disk.
<td>Cannot automatically write to hard disk.
</tr>
</table>
</body>
</html>
<!--
FILE ARCHIVED ON 03:54:51 Jun 17, 1997 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 18:02:15 Nov 08, 2018.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
-->