Webmastering: Week 4


4-1      Webmastering Secrets: CGI/JAVA
 
This 8-week class covers state-of-the-art authoring
secrets to make an AWESOME Web page on the Internet!
 
Tonight is the second class in a series of eight:
 
   Apr 18: SSI:  Add modification date & templates
   Apr 25: CGI:  Create/process a form & image map
   May 2:  Perl: Create a guestbook and/or BBS
-> May 9:  Java: Getting it and using it <-
   May 16: Java: Animating your page
   May 23: Perl: Analyze stats for who/what/when
   May 30: Perl: Add a search engine to your page
   June 6: Java: Games and other fun stuff!
  
Any overview questions before we dive in?

4-2       Webmastering: TONIGHT'S PLAN
 
Most of you should already be familiar with basic
HTML authoring.  This class will push your page to
the edge of technology and make it fun for visitors:
  1) Create dynamic pages using templates & dates.
  2) Let guests add content via forms to your page.
  3) Use Java animations to spice up your page.
  4) Master the basics of the Java language.
 
Tonight, we will introduce Java, the new language
which is taking over the Internet:
  1) What is Java?
  2) Who is using Java?
  3) How do I get Java?
  4) How do I use Java?
  5) How do I learn more about Java?
 
Any questions about what we will cover tonight?

4-3      Webmastering: WHAT IS JAVA?
 
Java is a simple, robust, object-oriented,
platform-independent multi-threaded, dynamic
general-purpose programming environment.
 
It is best for creating applets and applications
for the Internet, intranets and any other complex,
distributed network.
 
Alot of hype has surrounded Java's introduction,
some of it deserved.  We will cover how you can
use Java to improve your page.  We will also 
give a general introduction to Java programming,
but we will not go in-depth into programming.
 
Two other Java-related items that may confuse:
1) Javascript is a scripting version of the Java
   language created by Netscape that allows you 
   to imbed limited Java code directly in HTML.
2) Hot Java is a browser WRITTEN IN Java by Sun
   as proof you can write a serious application
   in Java.  I would stick with Netscape...
 
Any questions about what Java is?

4-4      Webmastering: HOW JAVA WORKS
 
Java is run by the client, not the server.
 
This is different than the previous technologies
we have looked at that operate on the server such
as SSI, CGI and other scripts.
 
This also means you can work with Java, even if
you do not have access to a Web server!
 
How Java works:
  1) You reference a Java applet in your HTML
     document with the 

     tag.
      2) The applet code is downloaded to your machine
         from the web server, if needed.
      3) The applet code is run through the Java 
         interpreter (which is built into Netscape 2.0).
      4) Netscape runs the Java code and displays the 
         result inside the designated area in your
         otherwise normal Java document.
     
    Any questions about how Java works?

4-5     Webmastering: WHO IS USING JAVA?
 
Java is used by many web sites to add animation, 
sounds and other dynamic programming to their
web pages, including actual games.  Java is also
used by companies as an interface to their
database systems.
 
Here are some interesting pages that show Java
being in action:
 
1) Animation of horses at various gaits (my page): 
   http://dqsoft.com/java/
2) A business using Java for client-server:
   http://www.cadis.com/
3) A halfway decent Pacman imitation:
   http://www.csd.uu.se/~alexb/
4) Lots of other sample applets from Sun:
   http://www.javasoft.com/applets/applets.html
5) *The* Java Applet Directory with 1000+ applets
   http://www.gamelan.com/
6) For the adventurous a multi-user environment:
   http://www4.informatik.uni-erlangen.de/
          IMMD-IV/Projects/como/
 
Any questions about who is using Java?

4-6      Webmastering: SECURITY NOTE
 
Java is extremely concerned about security and you
can be assured that when you use Java it CANNOT
write to your hard drive or access local data.
 
This helps provide piece of mind, but it also 
sometimes creates additional difficulties.
 
Because of this, Java usually requires direct DNS
(name service) to work properly.  If you get a
security violation message when trying to access
some of the Java sites, you should make sure DNS
is enabled and set to your ISP's DNS server.
 
Windows 95 automatic DNS MAY NOT work properly...
 
Furthermore, Java will not work through some proxy
servers, so if your company uses one, beware.
 
Any questions on Java security?

4-7      Webmastering: HOW DO I GET JAVA?
 
To be able to view Java applets, you must have a 
Java-capable browser or viewer.  Netscape 2.0 and 
the soon-to-be-release Explorer 3.0 offer Java.
 
You also must have a 32-bit operating system.  The
following platforms are know to be supported:
  Windows 95, Windows NT, SPARC Solaris, and Apple
 
Versions for other Unix and Windows 3.1 are being
developed but are not available yet.
 
To write and test new Java applets, you must have
the Java Developer's Kit which includes a compiler,
tester, and lots of sample code.  You can obtain
this directly from JavaSoft (part of Sun) at:
  http://www.javasoft.com/java.sun.com/JDK-1.0/
 
Follow the instructions to download the archive
which will self-extract into a directory.
  
Any questions on how to get Java?

4-8        Webmastering: WHAT YOU GET
 
When you extract the Java SDK, you will get the
following directories:
 
-=- bin - contains Java compiler and other utility
          executables.  Add this to your PATH.
-=- include & lib - contains Java includes & libs
          used by Java programs.
-=- demo\Animator - a generic animator you can
          use.  We talk about this next week.
-=- demo\BouncingHeads - a cute animation of heads
          moving around.
-=- demo\ImageMap - another way to do image maps
-=- demo\MoleculeViewer - a cool 3-D example.
-=- demo\ScrollingImages - a fun 
-=- demo\TumblingDuke - the original, fun animation
 
Numerous other demos can act as code samples to 
help you learn...any questions on what you get?

4-9      Webmastering: HOW DO I USE JAVA?
 
Once you have extracted the Java SDK, you can run
any of the Java demos provided, view the HTML
and Java source, all from the handy index.htm 
documents provided in each subdirectory.
 
For most of our needs of spicing up your page,
you can use the canned demos provided, customizing
them with your own images and properties.
 
The instructions for each applet are listed on the
index.htm in each directory.  You usually just
put the APPLET tag in with the parameters that
include the filenames for your images, sounds, etc.
and various other settings.
 
Any questions on how to use Java?

4-10     Webmastering: IDEAS FOR YOUR PAGE
 
Ideas for using Java:

SORRY, FILE LOST!

4-11     Webmastering: LEARNING MORE
 
1) Hooked on Java.  Good book for using Java
   to improve pages.  Not very good if you
   want to learn Java programming.
2) Teaching Yourself Java in 21 Days.  Good
   book for learning Java programming, but
   not as good for page ideas.
3) http://www.javasoft.com.  Sun's source
   site for JDK, examples, and documentation.
4) http://www.gamelan.com.  *THE* Java applet
   archive center.  Almost 1,000 applets you
   can download that do all sorts of things.
   I recommend looking for something that 
   already does what you want and modify it.
5) http://www.digitalfocus.com/digitalfocus/faq/
   Want to hire someone or sell your services?
6) http://users.aol.com/thingtone/workshop/
   Java Workshop has tips for experienced folks
7) http://www2.roguewave.com/rwpav/products/
          jfactory/jfactory.htm.
   One of many Java builders coming along...
 
Any questions on where to go for help?



4-12     Webmastering: CONCLUSION
 
This concludes tonight's class.
 
Next week's class will start promptly at the same time.
You can mail me here at box 952 or via chrisw@dqsoft.com
for questions or help with your pages.  You will find
my page w/links and samples at http://dqsoft.com/
 
Next week, we will add animation to your site:
  1) Getting the latest Java animator
  2) Creating graphics for animation
  3) Animating them together on your local machine
  4) Moving the animation and animator to your page
 
HOMEWORK: Download the SDK and try some of the
samples that come with it using Netscape 2.0.
 
Now we have an open question and answer session where
you can get me to debug your scripts for you...