|
QBase Technology - Java Script
At the beginning of the 90', World Wide Web become
so popular, that there came out a need for
developing better HTML pages, to make them more
interesting, original and opened for user
interaction. In case of commercial web page,
attractive layout could influence company's
customers and eventually the profits. The need had
been born. The question was - how to do it?
Netscape Communications Corporation participated in
the WWW creation and popularisation from the early
beginning. This company released web browser, free
for public use. Soon, Netscape created scripting
language named LiveScript, to introduce
interactivity into static web documents. LiveScript
had been implemented in the first versions of
Netscape Navigator and become very popular. At the
same time, engineers from Sun Microsystems created
a programming language with clear structure and
platform independency - Java.
In result of the agreement between Netscape
Communications Corporation and Sun Microsystems
the idea of LiveScript had been combined with Java
technology into one environment (code name "Mocha")
enabling creation of web applications and dynamic
WWW pages. It was an open project and was designed
as platform independent solution. After this
project had finished in 1995 JavaScript was born.
Great interest in JavaScript from different
companies moved Microsoft to implement JavaScript
in its Internet Explorer web browser. Since this
even JavaScript career began.
At the present moment there are five different
versions of JavaScript: 1.0, 1.1, 1.2, 1.3 and 1.4
(beta). It is very important to provide
compatibility of the web browser with appropriate
version of JavaScript standard. Imagine that one
uses functions of JavaScript 1.2 in browsers
supporting JavaScript 1.0 only. This will result
with an error message displayed at the user's
screen and the browser will stop execution of the
rest of the JavaScript program - no matter if
the rest of it is defined in the older standard or
not.
The table below shows compatibility of two most
commonly use web browsers i.e. Netscape Navigator
and Internet Explorer with all previously mentioned
versions of JavaScript.
|
JavaScript Version
|
Netscape 2.0
|
Netscape 3.0
|
Netscape 4.0
|
Netscape 5.0 (Beta)
|
Internet Explorer 3.0
|
Internet Explorer 4.0
|
Internet Explorer 5.0
|
|
1.0
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
|
1.1
|
No
|
Yes
|
Yes
|
Yes
|
No
|
Yes
|
Yes
|
|
1.2
|
No
|
No
|
Yes
|
Yes
|
No
|
No
|
Yes
|
|
1.3
|
No
|
No
|
No
|
Yes
|
No
|
No
|
No
|
|
1.4 (Beta)
|
No
|
No
|
No
|
Yes
|
No
|
No
|
No
|
One must always remember that JavaScript is NOT
Java. Java is a complex, efficient and flexible
objective programming language, used by the
professionals, while JavaScript is rather a
specialized package used by web developers to
program behaviour of such HTML pages elements like
forms, buttons, pictures or even menus. JavaScript
programs are interpreted when the web page is
loaded into the browser's window, what effects its
effectiveness. Although, one has to admit that Java
Script can relieve WWW server very much by handling
small, but common-used functions like user-entered
data validation.
JavaScript makes WWW pages behave more "alive" and
enables to put into a WWW page a button, open new
browser's window, handle a form or create a simple
game. By the use of Java Script data format
validation in HTML form, web page layout
modifications, layers manipulation or creating
small but functional programs at the client's side
is relatively simple and first of all - it is
possible. JavaScript unlike applets is not limited
to a special part of the page and can effect
virtually whole HTML document and browser's window.
Finally JavaScript is easy to learn and easy to
use.
At the other side, simplicity of JavaScript does
not allow to create large and complex programs -
in such situation it is better to use Java applets
instead. Second thing is JavaScript code
visibility. Due to scripts are embedded into HTML
page its code cannot be hidden, so every Internet
user can copy someone's work and use it as his own.
Finally there are not many tools supporting work
with JavaScript, especially debuggers. In result,
programmer is pushed to test or even guess if his
script works well and than eventually guess what
was the reason for an error. Not mentioning the
differences between implementations of JavaScript
in Netscape Navigator and Internet Explorer what
sometimes makes developers to detect browser's type
and to create two different versions of the same
script for two different browsers.
Despite these disadvantages there are no
alternatives for JavaScript for now, especially
that this language becomes more and more popular.
|