|
Web Guru concise Java explanation:
Java applets designed for pixel display and
manipulation, i.e., graphics, are an excellent way to understand just what that
mysterious thing called Java is all about. Probably everyone is confused by the
terms Java and Javascript the first time they encounter them. The vast majority
of folks will never, never, ever write either a Java program, or "applet," or a
javascript script. In statistical terms, that event would lie outside two
standard deviations from the mean and probably even three standard deviations.
Seriously , if you stop and think about it; when was the last time you heard
anyone discussing the technical subtleties of writing a Java program? We
thought so. We have never had nor heard such a discussion. We have heard
comments to the effect that one would not know it if a Java program were to
bite one on the rear. That sort of statement is false. One could not
say one would not know it if a Java program bit one on one's hind quarters. The
tactile corpuscles and/or pain receptors would elicit small electrical
impulses which would travel along nerve fibers and across synaptic junctions
between axons and dendrites, eventually registering a sensation of pain in the
brain. This happens anytime one's hindquarters are bitten. Ergo the statement
is false. Quite possibly this sort of statement would be an example of what you
earthlings call a joke. But we are not joking around about Java.
What is a Java program? That is to say, how would you know a
Java program if you saw one? It's really very easy. A Java program, which we
will henceforth refer to as a Java applet, can be recognized by the tell-tale
".class" name given to the file. Some of you may not be able to see it but,
there is a period in front of the word class. in practice there is always a
filename to the left of the period as well.
You need a minimum of two parts for a functional Java
applet. What do you need? You need your "something-dot-class" file. And you
need your "something-dot-html" file. This is the minimum. And they should be in
the same folder so that one can call upon the other without getting lost. Now
if you have other files which are used for instructions or for displaying text
as in a banner for example, you'll need to put those fies into the same folder.
Also, if you have files such as images or sounds, guess what jelly bean? That's
right, you'll need to put those files into the same folder as well. And then
when you have all these files in the same folder, you use your FTP, or "file
transfer putter," program to put it on your server where every body and their
mother can access it. So, there you have it.
Is that all there is to it? How do you make a Java applet
functional in your web page? Specifically, how do you put it in there? Ok, well
let's get more specific. Look at this stuff. You are basically just putting the
parameters into the html file. This is what the writing will look like when you
put an applet into your web page, that, "something-dot-html" file. |
|
<applet WIDTH="580" HEIGHT="25" ALIGN="BOTTOM"
CODE="Banners.class"> <param NAME="alignment" VALUE="Left">
</applet>
The basic pattern is:
<applet something="this" something="that"
CODE="something.class">
and then in the middle you have a long string of parameters
like this:
<param NAME="something" VALUE="something">
<param NAME="something" VALUE="something">
<param NAME="something" VALUE="something">
and then at the bottom of it all you have the most simple part, the end of the applet stuff.
</applet>
Ok, so now that you know the big secret, you have to do the
most important part in order to be a real Java Guru. You have to cop an
attitude. Whenever you put a cool applet into your page, you never, never, ever
let anybody know how easy it is. There's nothing really hard about it. More
people will use these Java applets in the future. In fact we'd say that just
about everyone will. But we need to wait another year and a half for fat pipes
because the something-dot-class files have to download before the gizmo will
work. That means we need faster lines so we don't have to sit and wait. Even
now you see more and more sites, and that includes e-commerce sites, which are
very "download time sensitive," using java applets.
We have several pixel manipulating Java applets which were
given freely to us by a dude named Fabio Ciucci who lives in Italy where people
don't think that name is particularly unusual. You can have the applets and use
them and change them around if you want. But you have to read the dot-txt files
and do just what they say so everything will be kosher, ok? If you go to
Fabio's web site page, you can easily get all the parts and the text files and
use these applets to learn about graphics Java applets. Then you'll understand
why Java applets are easier to put into your pages than Javascript scripts,
even though writing the applet itself is much more difficult. With the
Javascript scripts, sometimes they go in the header, sometimes in the body,
sometimes in both. With applets, you don't have to wonder where to put the
parameters for the applet. It goes somewhere in between the <BODY> and
the </BODY> tags. Get it?
Thanks to Fabio Ciucci and
the Anfy team,  Java has become more well known and popular.
Back to Graphics Java Applets index |