14 June 2005

On a Foray into HTML-3

SunSoft Java[*], and Netscape JavaScript [*] are closely related ideas. They're both programming languages that are commonly associated with the internet. The similar names are just a coincidence, however, and they refer to very different things. In this blog post and others, I'm going to refer to a program and its elements as "code." You could say programs are written with code. I also will use a term, "compiler." This is a program that reads code written in a high-level language and translates it into assembly language so the computer can do what it's supposed to do.

Java was developed about the same time as Mosaic, the first Web browser. Most computers supplied since 1990 have a "Java virtual machine" (JVM) that is a compiler for Java code. This allows Java code to be read by any browser anywhere, any time, regardless of the computer on which one is browsing the web. The VM is common to all browsers, regardless of flavor (this is not STRICTLY true!).

An application is any program that you need a computer for, such as word processing or managing a database. An application written in Java is called an applet. An applet can do pretty much anything that a conventional application can do; so, for example, this list of applets includes calculators, graphers, simulators; an MP3 player; chat rooms, email programs, and spam blockers are also written in Java.
What about JavaScript? JavaScript was created by Netscape as a simple set of commands that all browsers would recognize. Unlike Java, which is a completely separate programming language, designed for autonomous applications, JavaScript is a set of commands recognized by browsers. JavaScript programs, or scripts, are usually embedded directly in HTML files. The script executes when the user's browser opens the HTML file.

JavaScript allows the person visiting your website to interact with the site. A simple script involves letting the visitor select the background color of the page. Another script can detect the user's operating system and browser type, then give instructions that are appropriate to the user's particular computer. A third type evaluates user input. Drop down menus and combination bars are things that you can do with JavaScript.

(To be continued.)

Labels: , , , , , ,

On a Foray into HTML-2

This post has been edited for accuracy

So, to recap: the Web and the Internet are similar and it's reasonable for people to use them as synonyms. It's just that the Web is what individual computer users have created with HTML, in the medium of the Internet. The Internet is older; it's th foundation and building material of the Web.

Web pages are created with HTML. This simply a file type that can be read by a browser. Web pages are "made" of HTML; HTML is a high-level computer language that explains to the browsers visiting the site how to display the text and images hosted at the website.

In addition to the HTML files that the browser reads, there are elements that the browser is told to display. Web browsers are designed to "read" (recognize the format and display accurately) JPEG images (*.jpg), GIF images (*.gif), TIF (*.tif), and bitmaps (*.bmp). They can also recognize other types of files, which I'll describe in a moment.

In addition to HTML files, the above-mentioned image files, and Java or Javascript files, you can post pretty much any type of file you want on your website. However, in order to read things like an MS Word document or Acrobat PDF, you need to have the software installed on your computer. Hence, the popularity of Adobe Acrobat. The software for reading PDF files is free; people pay to buy the software for creating *.pdf files. These files will display in a new window of the browser, or a window spawned by the browser's computer (i.e., Windows or Mac OS will launch MS Excel if you open an Excel file at a website).

WHAT ARE SOME OTHER FILE TYPES YOU CAN HAVE?
You can have MPEG's, which are files that are either audio, video, or both. MPEG refers to a standards committee (like you needed to know that!), and this committee keeps issuing new formats. MPEG-2 is the standard used for most *.mpg files. A variant is MPEG-4, which was modified to create the Windows Media Video (*.wmv, or "Wave") format; Apple Quicktime (*.mov) is a third. These file types can be created by different softwares, and they can be played back by freely ditributed playback software. Like Adobe Acrobat, the player is usually free, and the computer's operating system must spawn the player for it to be seen. The file formats are mutually incompatible, although some players can play more than one format.

In addition to these, there is Macromedia Flash/FlashPlayer. This is like the others, except that Flash allows one to create a digital image by manipulating objects in the Flash software; it's like MS PowerPoint, with the ability to animate the presentation and upload it to the web. Flash files (*.swf) are typically viewed as an animated graphic within the web page; it's not usually necessary to spawn a new window for playback. As a result, one can combine animated and non-animated elements in a single page. Also, Flash is very easy to use, in my opinion.
COOL STUFF I NOTICED LATER: Here's a blog post about new features available in the latest release of Flash (hat tip to Wikipedia's Flash entry).
(To be continued)

Labels: , , , ,

13 June 2005

On a Foray into HTML

Some terms of art for the web:

Some of you are going to hear some technical language used here that is quite intimidating. A case in point is the jargon associated with web pages, the internet, and so on. The fact that many of these terms have multiple meaning doesn't make it easier, but let us hope this does.

First, many people surfing the internet may be a little confused by the terms, "internet" and "web." These are almost, but not quite, synonyms. The internet is a network of networks that is connected (at least initially) through the telephone lines, using signals much like voice transmission. Modems used a universal standard for exchanging data through the phone lines, called TCP/IP. This format was developed in 1969 though the Advanced Research Projects Agency (ARPA), a branch of the Department of Defense. Much later, a protocol called HTML was developed that allowed web browsers to treat data sent over modems and convert this into graphical images, such as a web page. At the same time that HTML was invented, web browsers were also invented by the National Center for Supercomputing Applications (NCSA). It's easy to see why browsers and HTML had to be invented concurrently: a browser had to be able to translate data from a modem into an image that could be displayed, and there had to be a standard that allowed browsers to speak to each other.

The internet was initially useful to computer terminals connected to mainframes, running arcane software like FTP, Usenet and Gopher. I recall having a lot of friends who were familiar with these services and talked about them a lot, and finding it inconceivable that these things would ever amount to anything but costly nerd toys. In 1992, however, Mosaic emerged as the first graphical browser, thereby creating--in a stroke--the world of interconnected hypertext we know as the "Web."

(To be continued.)

Labels: , , , ,