JavaScript, Java, VB Script, 
Visual Basic, and CGI 
By Miguel Hidalgo & Ed. Rios, Alamo PC

First, we would like to clear the confusion that we perceive when talking to people about JavaScript, Java, VB Script and Visual Basic. Constantly, we hear people interchanging terms like JavaScript and Java as if they were the same. So the news is, JavaScript and Java are not the same thing, neither are VB Script and Visual Basic.

 JavaScript is a script language created by Netscape and Sun Microsystems. This language is embedded (typed-in) in the HTML code and is interpreted by JavaScript capable browsers such as Netscape 2.0 and above, and MS Internet Explorer 3.01 and above.

 Java is a full Object Oriented Programming (OOP) language created by Sun Microsystems. Java comes in two flavors, Java as an OOP language such as C++, and Java Applets. Java as an OOP language becomes platform dependent (it can run only in the operating system in which the program was created) and it can be used just like C++. On the other hand, Java Applets are platform independent (Applets can run in any operating system browser which support Java Applets) not caring whether the applet was created in UNIX, or Windows 95, etc. 

Java Applets are binary programs (they are not scripts that you can see in the HTML code such as JavaScript) that are generated in a generic format called bytecode which can be interpreted by any Java capable browser such as Netscape 2.0 and above, and MS Internet Explorer 3.0x and above. At this moment, Java Applets require Multithreading (operating systems that can run more that one program at a time) operating systems to run, such as Windows 95, UNIX, OS2, etc. Java Applets will not run in MS Windows 3.x.

 Generally speaking, the only similarity between JavaScript and Java is in parts of the syntax (how you type commands) and that both are run in the browser.

 VB Script is a script language created by Microsoft. This language is embedded (typed-in) in the HTML code and is interpreted by VB Script capable browsers such as Netscape 2.0 and above with plug-in, and MS Internet Explorer 3.0x and above.
 
 

Visual Basic (VB) is a rapid development programming language created by Microsoft. VB is platform dependent language. VB is used heavily in the Internet to write CGI programs.
 
 

CGI stands for Common Gateway Interface. CGI is an interface used to pass information to a web server.

 Normally, a CGI program is an executable program or script, which is run on the web server as a request from a browser (i.e. submitting a form). After the browser requests the execution of a CGI program, the program runs in the Web Server computer and then sends the results back to the browser.

 All JavaScript, VB Script, and Java Applets run on the browser, while the CGI programs are run in the web server. Although many people are saying that CGI is a thing of the past, we disagree with them. At this moment on the Internet, the only way to transfer information between browsers and servers independently of what browser is used, is CGI, so if you do it with CGI, you know it will work for all. Also, comparing CGI with JavaScript, or VB Script is like comparing apples with oranges, since they actually compliment each other (i.e. Use JavaScript to validate all fields in a CGI form before the CGI program is executed.)