Web and Java *

Insight into the history of text *

Animated elements on Web-sites *

Java Script *

Java history *

Why it is called Java? *

The Java Programming language. *

Java and applets *

Animation with Java: artistic effects *

Java as a tool to add electronic brains (applets) to your electronic book (Web-site) *

Example 1: Java-written Calculator embedded into Web-page *

Example 2: 3D graphics *

Example 3: Do you know well Europe geographic map? (jigsaw puzzle) *

Example 4: Java for Education *

JAVA Technology in the Real World *

Sorry, your browser doesn't support Java *

  Getting started with Java *

Books *

Visual Cafe *

FrontPage, Symantec Visual Page *

Resources: Web authoring *

Java Resources: Places to Go *

Glossary of Java Related Terms (Likbez) *

  Working with Java: general notes and common errors solving *

Long Filenames Truncation and Letter Case Change *

UNICODE *

Bug Reports *

  Web-master *

 

 

  Web and Java

Insight into the history of text

First "books" were written on clay tablets (Babylon, Assure) . The eyes of the reader had an easy access to any part of the tablets at hand, but it was difficult to handle many tablets.

Clay tablet - direct access to text

Next stage was connected with using of papyrus. Separate sheets of papyrus were glue together and rolled over a hinge. This enabled to compose and handle long texts, but the access through the text was sequential - you need to scroll all intermediate part of text to jump e.g. to next chapter. The compendium of Juice sacred books was handled in this way. Torah scroll, parchment scroll of the Pentateuch in Hebrew was mounted on wooden rollers.

 

Torah scroll, parchment scroll of the Pentateuch in Hebrew mounted on wooden rollers;
sequential browsing of text

Later on more convenient way of handling text consisting from many pages superseded Torah-like texts. In Rome sheets of leaves were again "liberated". A treatise occupying numerous sheets or leaves was fastened together at one edge called the back, so as to be opened at any particular place; the whole was protected by binding or covers of some kind.


Book.
Sheets or leaves are fastened together at one edge so as to be opened at any particular place.
Book allows browsing

This organisation of text gives an easy way to "jump" from one place of text to another. You can read the book sequentially or just jump to the end and learn how the story was ended. The same approach used in modern databases is called index-sequential access.

The next revolution was connected with the rising of computers. Hyperreferencies turn the ordinary text into so called hypertext. Mass storage devices and World wide web made this hyperreferencies omnipotent. Usually most Web-sites are just e-printed books with pictures and hyperreferencies. Modern Web-pages use both Torah (look at the scrolling bar at the right) and book (look at the left frame index) approach to handle texts. The special language for creating of Web pages is called HTML(Hypertext Mark-up Language). The functions of HTML in contemporary Web-publishing; HTML describes how traditional text is structured and styled.

Old-fashioned "material" books, provided with detailed table of contents, index, bibliography and other navigation tools are still competitive with "virtual" electronic books, even supplied with multimedia. Electronic books will made material books obsolete only being computer and net powered. And Java programming language seems to be the key point at this revolution, mainly due to its ability to write so called Applets.

 

Applet Paradigm

Java applets may be compared with some electronic chip which can be glued to your Web-page. So it is a tools to provide your electronic book with "electronic brains"!

Animated elements on Web-sites

We continue our story. Applets are still ahead.

Multimedia gave new impetus for electronic books. Not only pictures, but sound and animation. To convert text into hyper text HTML (Hyper Text Mark-up Language) is used.

Animated GIF is a file containing a series of GIF (Graphics Interchange Format) images that are displayed in rapid sequence by some Web browsers, giving an animated effect (flip-flop animation). This animated GIF sample is an excellent instantiation of such kind of animation:

 

This FrontPage Logo is another (artistic) example of animated GIF picture:

 

Actually this animated image is a suite of 13 ordinary images stored in one file, here are some of these images:

 

Image …

Image № 3

Image № 4

Image № 5

Image № 6

 

Image …

 

Many contemporary Web-sites are plumped with animated GIF consisting from a banner and illustrative picture, this allows also to spare the space on the page.

HTML itself contains some tools for animation. This is an example of scrolling line (marquee in HTML language):

Telematics on the turn of the Millennium Web needs you! Java is fun!

 

Of course, if there is a predefined set of desirable effects which are necessary to make good looking, informative, easily handled Web-sites, all these elements will be sooner or later introduced in new multimedia and HTML standards.

Let us remind our self the story from the Bible, which can be interpreted in such a way that it is better to learn the people how to catch fish, that just gave them some fish. So it is necessary to add some programming language which will enable implement any algorithm; Web needs its universal high-level programming language.

Java Script

Now Java script is widely used on the Web. Java script, created by Netscape, is different from Java language; Java is more powerful than JavaScript, that is a script/batch language written directly in .html document. Other script languages (J-script, Visual Basic, … ) are also widely used.

BUT! All of these script languages can't compete with modern object oriented languages, so it is practically impossible to create complicated program using them. The only modern programming language, supported by main browsers, is Java programming language.

JavaScript - The scripting language for Web browsers:

Java - Sun Microsystems's programming language for the Web:

Java history

Just a short passage from the book "Hooked on Java".

Why it is called Java?

The Java language was originally called Oak by James Gosling. His inspiration for this name was a large oak tree outside of his office window at Sun Microsystems.

Later, the Java development team discovered that Oak was the name of a programming language that predated Sun's language, so another name had to be chosen. It is surprisingly difficult to find a good name for a programming language, as the team discovered after many hours of brainstorming. Finally, inspiration struck one day during a trip to the local coffee shop. (Java is not an acronym. Despite popular belief, if does not mean "Just Another Vague Acronym."

The Java Programming language.

Java is a high-level programming language, similar to C, C++, Pascal, and Modula-3. … Java is simple, object-oriented, statically typed, compiled, architecture neutral, multithreaded, garbage collected, robust, secure, and extensible, and well understood. And, the most important,

 

IS FUN!

The above logo is a trademark of Sun Microsystems

Java and applets

The Java language was developed at Sun Microsystems in 1991 as part of a research project to develop software for consumer electronics devices - television sets, VCRs, toasters, and the other sorts of machines. Java as a language has some advantaged over other languages; Java allows to write any kind of program, from very simple to very complicated; but at the moment Java is one of the biggest buzzwords in the Internet due to its using for writing applets.

Java applet is a Java program that can be included in an HTML page, much in the same way an image is included. When you use a Java-compatible browser to view a page that contains a Java applet, the applet's code is transferred to your system and executed by the browser.

( application + diminutive suffix LET; wavelets, used in signal processing, are moulded in the same way Wavelet = wave+let )

Animation with Java:
artistic effects

The applet given above, which we used to work with the inscription STACCIS, is coded by Fabio Ciucci. We have placed here this and other applets of Fabio Ciucci using his kind permission. Visit his Web-site (www.anfiteatro.it/javedev/fabioc/indexen.html) and you’ll probably find another interesting artistic applets to spruce your Web-site or just for fun. For FREE!

 

  My favourite:

Sorry, your browser doesn't suppor Java.

Fluid wavings simulation by Fabio Ciucci.

Some ohter applets of Fabio Ciucci

 

Tunnel

TmapCube

Wormhole

Plasma

 

 

Java as a tool to add electronic brains (applets) to your electronic book (Web-site)

To this moment first time reader may thought that the main Java destination is to construct very interesting animation. You can use Java to spruce up your Web pages - it works quite well for that, but that's not the main purpose of Java.

Books, including electronics books, are mainly used to learn something. E.g. you want to learn what is 2 x 2? To help the client you can simply put on your Web-page some Math TABLES, and create a fancy interface to handle such request, so that the user will not see the whole table but just get the desirable value 4 (if there are no guff in your Web-site).

So Java applets may be compared with some small electronic chip which can be glued to your Web-page. The user got your electronic book with pictures, animation and with such embedded chips (like calculator). He uses this book spending resources of HIS computer.

 

Another solution to serve the client interested in 2 x 2 problem is to use YOUR server. Both solutions have their advantages and disadvantages. (But it is clear that if you have a million of clients your server will be overloaded with calculations.)

At the moment computers in the Web are used mainly as a tool for telecommunication and as a tool for running browsers, which interprets HTML (Hypertext Murk-up Language) to present it to the client. Two computers are involved: client and server. So if we want to provide Web-site with the power supplanted by a computer we can use client and/or server computer. Java programming language is so important, because it is definitely the main way of using power of the client computer.

Example 1: Java-written Calculator embedded into Web-page

It is not surprisingly that many people starting learn Java language as their first not drilling exercise code calculators . (To write calculator for complex number is more valued task than to write real numbers calculator.) If you query the popular search engine AltaVista to search for “complex calculator”, you’ll got references to a score of such calculators. Some half a dozen with expressions ( which means that they can process e.g. ( (1 /√ 2 + 2i ) 3 ) ).

The basic usage of applets may be better understood on simple examples. The next two examples are taking with kind permission of the young author from his Moscow secondary school N91 Web-site (http://www.91.ru/Trusov/index.html or http://www.user.cityline.ru/~shtssv ).

 

 

ABACUS 2000. - Complex and Real Expression calculator.

 

Example 2: 3D graphics

  • 3D Graphics in Java. 3D graphics Simple wired model of the cube but with some original effects to taste the flavour of 3D modelling with Java.

    (press DRAW button, than use arrow keys)

     
  • Example 3: Do you know well Europe geographic map? (jigsaw puzzle)

    The key to any game is getting it to as many people as possible. There are many competing languages, systems and methodologies out on the market, but Java provides the mechanisms to reach virtually every major platform. This cross-market potential of Java allows any game to be executed on virtually any system that supports a Java-based browser, including the Windows platform, UNIX and Macintosh. Java's ability to write once and run anywhere is truly a blessing for game programmers.

    The following applet is an animated jigsaw puzzle:
    JigSaw puzzle

    Example 4: Java for Education

    The following applet is an animated, step-by-step explanation of the famous geometric proof of the Pyphagoras's Theorem, in which the square of the hypotenuse of a right angle triangle is equal to the sum of the squares of the other two sides. This applet, written by Jim Morey, was the grand-prize winner of the applet contest sponsored by the Java development team. It was selected for its educational value and its excellent use of Java.

    Animated step-by-step proof
    of Phypagoras's Theorem

    Java applet may give, e.g. access to retrieving information from a data base. Working with the applet user may give a query in a fuzzy form (high value of parameter N 1, average value of the parameter N 2, etc.).

    JAVA Technology in the Real World

    Aerospace, Education, Entertainment, Financial/Banking, Health Care/Medical, Insurance, Manufacturing, Media/Publishing, Research, Retail/Distribution, Service/Consulting, Telecommunications, Transportation, Travel etc. - periodicals about using Java Technologies in the real world are in the subsection.

    Sorry, your browser doesn't support Java

    Probably you are thinking: what people without Java browsers will see instead of the applets? Sometimes users of World Wide Web encounter messages like "Sorry, your browser doesn't support Java".

    A short excursion into standardisation problem. In Russian army there is a standard for gunpowder cartridges 7.62mm; the same cartridge is used in all Kalashnikov systems; the barrel from Kalashnikov system may be used in another. This standardisation provides effectiveness, cost reduction of the support etc. The level of standardisation in software busyness is much less, which is a regular scourge for common users. But at the same time this situation stimulates rapid progress. A slogan from Chinese classical history reads: “Let a hundred flowers bloom and a hundred schools of thought contend.” In any case we must handle compatibility problem in software.

    Microsoft, Sun and other developers permanently provide new tricks for World Wide Web. Step-by-step new tricks became the standard. There is a way to write WWW-pages which will take into account the differences between browsers. From inside of the HTML page you can determined the type of the browser used by your client, and to modify the contents of the document correspondingly using Java script snippet of code.

    No Java - no problem, each applet may be provided with alternative message like "Sorry, you browser doesn't support Java". You can place an alternate text, or image, or a whole html segment.

      Getting started with Java

    Books

    There are many really good books to learn Java. These four books can meet the needs of anyone, from first-time programmer to experienced C or C++ programmers.

    Teach yourself Java in Cafe in 21 days. Dan Joshi, Laura Lemay, and Charles Perkins. Excellent introduction textbook.

     

     

    Hooked on Java (Creating Hot Web Sites with Java Applets). Arthur van Hoff, Sami Shaio, Orca Starbuck.

    The books from the members of the Java development team. CD-rom includes: sample applets ready to plug into your home page; examples of Java-powered HTML pages; plenty of Java source code.

    Java in a Nutshell (a Desktop Quick Reference). David Flanagan. O'Reilly.
    This best-selling book is an indispensable quick-reference for Java programmers. If you are already a Java programmer (or if you are really experienced programmer in C or C++) this book contains everything you need.

    Java: the Complete Reference. Patrick Naughton, Herbert Schildt. Osborne McGraw-Hill.
    In-depth coverage of Java provided with many examples.
    Translation into Russian is available.

     

    Library of Moscow STACCIS Informational Demonstrational Center - a repository of the main Java hits. The list of the books can be found on the STACIS major Web-site (www.ednes.org/staccis) http://www.ednes.org/staccis/bookslib.htm

    Visual Cafe

    You have learned already the origination of the name of this programming language. So it is not surprising that one of the most popular visual tools for the creation of Java programs is called VisualCafe (Symantec Corporation). May be it is not also very surprisingly that many programmers are fuelled mostly by coffee and cigarettes.

    Even a first time user may very soon to build some applets. Have a look at this two applets.

    Plasma

    Firework

     

    FrontPage, Symantec Visual Page

    Starting writing applets you'll soon wish to include them into Web-page. This can be easily done even if you have now experience in Web-authoring. Microsoft FrontPage will help you easily create and edit HTML files and will facilitate introducing applets in them.

    For simple Web-pages you can start preparation in MS-Word 97; then save document in HTML format. Then using FrontPage you can improve the appearance of the Web-page and spruce it with applets.

    Symantec Visual Page is another great tool for authoring Web-pages.

    Resources: Web authoring

    To handle animated GIF you can purchase Ulead GIF Animator, Ulead Systems, Inc. (http://www.ulead.com/webutilities).

    Don't reinvent the bicycle! If you need some gadgets to improve the appearance of your Web-site visit www.grapholina.com.

     

    You can create Web-site by your own or with a help of a techie friend of yours. To install a Web-site you need a help from system administrator in your office; in other cases you can address some Internet provider, e.g. in Russian you can appeal to www.cityline.ru (section FAQ), and get some address like
    http://www.user.SomeBigInternetProvider/~MyHumbleWebSite
    It is more prestigious to have your own so called DNS (Domain Name System) address, like:
    http://www.MyCoolCompany.com
    If you do want to have your own DNS address contact the Technical service of "Guild of Heads of Science" (visit http://www.ednes.org/guild, write e-mail to Web-master); their motto

    QUALITY: high enough to fit VIP;
    PRICES: small enough to fit your budget

    Java Resources: Places to Go

    These are excellent places to get inspiration for creating your own Java-powered pages.

    http://ariel.cobite.com/ultram/tetris/tetris.html Java Demos.

    http://info.infoseek.com

    http://java.sun.com:8081/nav/used/index.html 98+

    http://java.sun.com:8081/openstudio/index.html 98+

    http://java.wiwi.uni-frankfurt.de/ 98+

    http://javaboutique.internet.com/ The Java Boutique. A collection of applets, Java news, links to other Java resources, and more.

    http://javasoft.com/ Visit Sun Microsystems' Java/HotJava home page. The most up-to-date information on Java, Java applets, and HotJava. The source for Java technology.

    http://langevin.usc.edu/~permadi/java/javap.html Floating Point Java Applets. Free Java applets, some with source code, including games, effects, fractals and other applications.

    http://reality.sgi.com/employees/sameers_csd/puzzle.html Java Demos.
    The 15 Puzzle

    http://users.aimnet.com/ 98+

    http://www.aereal.com/ VRML

    http://www.anfiteatro.it/javedev/fabioc/indexen.html Check!

    http://www.awinc.com/users/rreichle/puzzle/index.html Java Demos.
    Jigsaw Puzzle 98-

    http://www.celticedge.com/hermit/ Java Hermit. Free applets for non-commercial use from a UK hermit with attitude.

    http://www.chami.com/ Chami.com. Collection of Java applets and Java Web IDE -- an integrated online development interface. Web development shareware and freeware for download.

    http://www.comp.lang.java FAQ list

    http://www.csiro.au:8000/steve/stuff/slider/Slider.html Java Demos. 98-

    http://www.DavidFlanagan.COM/ Contains a number of Java programming resources, including commercial and shareware tools and "beans" written by David Flanagan.

    http://www.demicron.se/ Swedish developer of Java(tm) effects and tools for Web sites with online gallery.

    http://www.dimensionx.com/ Good starting point for finding new applets. We-have found this to be a good source of Java applets and information on Java. (not operational in 1998)

    http://www.earthweb.com/java/Netris Java Demos.
    3D Tetris (not operational in 1998)

    http://www.gamelan.com
    Gamelan: Earthweb's Java Directory. Gamelan is an index that organises and focuses the growing world of Java resources on the Internet. This archive of Java resources is a great place to find Java applets, Java libraries, and other Java programming tools.

    A complete Java resource site containing thousands of Java samples. The site includes articles and resources for Java and related technologies. If you are looking for sample Java programs that can help you design your own Java programs, you can probably find existing source code here. A search engine is provided to help locate resources on the site. 98+

    http://www.geocities.com/SiliconValley/Lakes/8849/tableof.htm Aglets Workbench Tutorial. Opinions, a newsletter, resources and a tutorial on aglets: small applets that serve as a mobile agent of services in a computer network.

    http://www.infoseek.com/

    http://www.io.org/~mentor/J___Notes.html This Web site has a summary of the traffic on the Java mailing lists and newsgroups. You'll find concise information on the Java issues that people are talking about. Please note the URL has three underscores.

    http://www.ior.com/~creation/java/java.html Java Demos. 1998- ?

    http://www.jars.com
    Java Applet Rating Service (JARS). Best of breed Java applets are rated and reviewed here. A Java resource site with thousands of Java samples. This site also includes articles and resources for Java and related technologies. A search engine is provided to help locate resources on the site. 1998+

    http://www.javacats.com/US/search/index.html Digital Cats' Java Resource Center. Large directory of Java-related information and sites.

    http://www.javasoft.com/applets/ Good starting point for finding new applets. 1998+

    http://www.javasoft.com/applets/ Links to scads and scads of Java applets and Java-powered pages can be found at this tasty site. It's an excellent place to get inspiration for creating your own Java-powered pages.

    http://www.javasoft.com/applets/AppletSites.html Good starting point for finding new applets.

    http://www.javasoft.com/applets/archive/beta/LED/index.html 1998+

    http://www.macromedia.com/ Java Demos.

    http://www.netscape.com/ Naturally, Netscape Communications Inc.'s home page is the best source of up-to-date information on Java support in Netscape Navigator. Good starting point for finding new applets.

    http://www.ora.com/ O'Reilly@ Associates, Inc.
    Get examples from their books via FTP (e.g. Java in a Nutshell):
    ftp.ora.com login: anonymous, password: your email address
    or
    point your web browser to: ftp://ftp.ora.com

    http://www.osborne.com

    http://www.planet9.com VRML

    http://www.sun.com/ visit the Sun Microsystems home page for the latest details on Sun products and support information.

    http://www.tdb.uu.se/~karl/java/iceblock.html Java Demos. 1998-?

    http://www.trl.ibm.co.jp/aglets/ IBM Aglets Workbench: Programming Mobile Agents in Java. Download the Aglets Software Development Kit here.

    http://www.virtpark.com/theme/proteinman/home.html VRML

    http://www.w3.org The home page for the World Wide Web Consortium is an excellent starting point for finding information on the World Wide Web, HTML, protocols, browsers, etc.

    http://www.yahoo.com/ If you are looking for information on a specific topic, visit Yahoo.

    http://www-groups.dcs.st-and.ac.uk/~history/Java/ Java Demos.
    Famous Curves Applet. Provides graphs of complex curves. Allows the user to alter the parameters to the equations that calculate the curves. Source code is available

    news:comp.lang.java The Internet newsgroup is a fount of information for Java programming language issues. Check it out if you have questions about Java and Java applets.

    Glossary of Java Related Terms (Likbez)

    Only a couple of terms in this text, a comprehensive glossary is placed in special section GLOSSARY.

    Applet. Java applet is a Java program that can be included in an HTML page, much in the same way an image is included. When you use a Java-compatible browser to view a page that contains a Java applet, the applet's code is transferred to your system and executed by the browser.

    Browser.
    A software program for observing the Web; a synonym for a Web client. (Source: Presenting Java, Sams.net Publishing, 1996) A program used for reading, displaying, and interacting with objects on the World Wide Web. (Source: Using Java, Que Corporation, 1996)

    JDK. JDK is the Java Developers Kit. It is a set of tools that are needed to develop Java applets.

    Likbez.
    Some Russian words sputnik, apparatchik are widely known abroad; some other interesting words, like Likbez, are not known. This word denotes the educational campaign launched after revolution. I like this word for its determination, it use the same word which is Russian for extermination (execution) - Extermination of ignorance.

      Working with Java:
    general notes and common errors solving

    Long Filenames Truncation and Letter Case Change

    Many MS-DOS users still use PKUNZIP to decompress zip archives, and haven't in mind the difference between FiLe.ExE, ILE.EXE and fILe.eXe. This is bad, for a couple of reasons. The first is "long file names" usage: msdos (and old 16 bit win 3.1 programs) are able to support files 8 chars long with a suffix 3 chars long. Newer systems are able to support long file names, for example MyNiceApplet.class, that has a suffix of 4 chars. If you unzip with pkunzip the applets archives, or upload the .class files on the server with an old win 3.1 FTP program, etc., you will TRUNCATE the filename, and the result will be MYNICEAP.CLA ! Then, remember to unzip with winzip 32 for win95 or similar, and to copy/upload files with new programs that don't truncate filenames. Be careful on case of letters, too, since internet (Unix) is case sensitive. So, write MyNiceApplet.class and not Myniceapplet.class, for example. Most common mistakes are on images filenames, since win95 is not case sensitive and it loads an image even if the case is different. For example, save an image as Image1.jpg, and you will be able to load it in Netscape also if called as IMAGE1.JPG, image1.JPG, IMAGE1.jpg. This will not work online, so be sure the name of images you load from an applet is exactly the same.

     

    <applet code="MyApplet.class" width=150 height=150>

    <param name=param1 value="1234">

    <param name=param2 value="5678">

    <IMG ALT="*" ALIGN=center SRC="alternateimage.gif" border=0>

    </applet>

    So, for example, you can display a normal image if Java is not present, otherwise a Java manipulation of the image.

    UNICODE

    ASCII character set is used to represent English characters on many computers. The ASCII character set is a subset of the Unicode character set used by Java to represent characters from most of the world's languages. For more information on the Unicode character set, visit the World Wide Web site: http://unicode.org

    Bug Reports

    Don't save .JPG images from Adobe PhotoShop 4, since some Java implementations aren't able to read them. Use PhotoShop 3, or another program, like Paint Shop Pro.

      Web-master

    This Web-site is a Technology-Watch Web-site, so we decided to develop some distinguished technogenic style for this side. It was also decided that we will use such elements as Java JDK 1.1 applets, which are supported by standard Windows 98 browser Microsoft Internet Explorer 4.0. During the course of the Web-site exploitation those applets not supported by another popular browser Netscape will be backed by animated GIF pictures, which will imitate applets effects.

    Please send your comments and suggestions about the contents of the Web-site and its design to:

    Webmaster (troussov@wdcb.rssi.ru)

     

    Acknowledgements:

    On this Web-site we used some graphical elements from www.grapholina.com:

    Some applets of Fabio Ciucci (http://www.anfiteatro.it/java.html) were used.

    The basic construction of the source Java code of the applet "Lavatron", printed in "Java: the Complete Reference" by Patrick Naughton, Herbert Schildt. Osborne McGraw-Hill, were used.

    Other applets and animated GIF pictures were developed by the author. Olesja Snastina provided valuable help in collecting and preparing materials.

    Alexander Troussov