Tuesday, August 10, 2010

Java Applet Programming


History

  • It was originally called Oak, developed by SUN Microsystems, in a project called FirstPerson for smart appliances, such as set-top-box (interactive TV) 1992, lead by James Gosling.
  • It adopted C++ syntax but get rid of pointer, memory management, and multiple inheritance, which are main causes of programming errors.
  • It failed to be adopted by Timer Warner in Spring 93's ITV trial.
  • 1993 Marc Andreesen developed Mosaic Web Browser, started the web revolution.
  • Oak found its reason for existence. A Web browser called WebRunner was developed for demonstration.
  • January 1995, Sun adopted Java name due to trademark issue.
  • Marc Andreesen saw the demo and license it for use in its browser.
  • Nov. 1995, 1st Beta release with developer kit and source code.

What is Java Applet

  • Java is a general purpose programming language.
  • A Java program is created as a text file with .java extension.
  • It is compiled into one or more files of bytecodes with .class extension.
  • Bytecodes are a set of instructions similar to machine code of a specific machine but it can be run on any machine that has a Java Virtual Machine (JVM). JVM interprets bytecodes.
  • JVM was first implemented on Sparc/Solaris and PC/Win32. Now ported to many other platforms.
  • Java applets are Java programs that are retrieved and executed by web browsers through the JVM under tight secure environment.
  • Web browsers retrieve Java applets according to following tags in the web pages:

  • deprecated or the new more general,

    height=500>

  • are used to specify parameters for the applet. For example,
    -- the height (in pixels) of the tallest frame
    -- the directory that has the animation frames (gif, jpg)
  • All other types of java programs are called Java applications.
  • Examples:
  • Network Restoration Applet: User specifies two end node of a failed link. The applet retrieves the simulation results of two network restoration algorithms (twoprong and rreact) in two corresponding files at original web server site, and plot the results.
  • SUN Java demos:
    • MoleculeViewer
    • SimpleGraph
    • SortDemo
    • BarChart
    • Animator
    • JumpingBo

No comments:

Post a Comment