15 June 2005

On a Foray into HTML-4

In part 3 I mentioned Java and JavaScript and explained how they are different. Now I need to introduce a difficult concept. I mentioned that Java was developed by SunSoft/JavaSoft to be readable by all computers, regardless of operating system or browser flavor. That was through something called the Java Virtual Machine (JVM). Java itself can be used to write any application you like; there are word processors written in Java, databases, and so on. A huge benefit is this: suppose you have a cool program of scientific or intellectual benefit, and you want everyone to be able to use it. You can write it in Java, and anyone can run it, even if they don't have the program installed on their computer. No one has to configure anything, or wait for 20 minutes to launch the installshield, or reboot the computer, or even open another window. It just works.

There is another kind of web-delivered application called common gateway interface (CGI). CGI programs are frequently written in PERL, and they are not designed to run from anything like a JVM. If someone comes to your website, they aren't going to be able to access any of the programs you have hosted in your server's cgi bin. CGI applications fill a need for a program that runs from the cgi bin itself, and whose output is HTML/JavaScript. (NOTE: for you linguists reading this, OOC, C++, Java, and PERL are all derivatives of ["hacks"] of C; whereas C enabled the Internet, HTML, PERL, and Java enabled the Web)

Code written in PERL is called "script." The most common CGI application is personal web publishers, like Movable Type and TypePad. An example of a CGI program is the one implementing a wiki: you hand it the name of an entry, and it will retrieve the source of that entry's page (if one exists), transform it into HTML, and send the result back to the browser. Or tell it that you want to edit a page. All wiki operations are managed by this one program. CGI applications are also used to administer databases. Google is a CGI application.

The one big thing that a CGI application does is generate HTML. For example, suppose you need to register visitors so you can distribute secure data online. This means you need a template for a form (like a form in MS Access); a query, that retrieves the data stored in the backend of the database based on whatever the user put in the form; and reports, which may include an invoice, directions to St. James Cathedral, or an encyclopedia entry. The CGI also requires templates, which are mostly HTML plus some PERL script that actually inserts the retrieved information.

In addition to the language used to create CGI applications (PERL), there is the application that people use. Frequently the application is customized; for example, Wikipedia is an encyclopedia (a database back end) and the application that delivers that data (the database front end). Google is another. However, there are a few programs you can get to install on your webpage that are analogous to MS Access. I already mentioned personal publishing (blog) software; not surprisingly, most bloggers are not technically inclined, and even those who are have no desire to code their own publishing software! So they download it from BigNoseBird, or other sources.

Macromedia Dreamweaver is a software that allows one to create a web page with no HTML knowledge (or at least, very little). Also, Dreamweaver allows one to create very simple CGI applications with limited knowledge of either CGI or PERL.

Labels: , , , , ,

0 Comments:

Post a Comment

<< Home