Teaching and Learning Forum 97 [ Contents ]
Teaching the programming language Java over the Web
Peter E. Jones and S. Lin
Electrical and Electronic Engineering
The University of Western Australia
There are many ways in which multimedia systems can contribute to effective learning. Now we have several technologies at a stage where new methods of delivery become possible. The Internet with the World Wide Web together with Java enabled browsers can provide for more interactive application multimedia systems in education. Alternative technologies lack the interactivity, cross-platform capability, ease of access and updatability. Just using the Web on its own can cause other problems. We have developed an interactive tutorial, JavaLin, on selected aspects of the language Java and we are using this to explore the use of Java Applets. A limited evaluation of its use has been undertaken and has shown that students using the tutorial showed significantly more improvement when compared to those using a more conventional approach.
The World Wide Web is growing at a rate that suggests that in the developed countries there will be almost universal connectivity in the early part of the next century (Lewis 1996). The Web allows students to remain at home and access up-to-date course materials. Already there are courses offered over the Internet, for example see Globewide Network Academy at: http://uu-gna.mit.edu:8001/uu-gna/index.html. With the almost universal adoption of Java into browsers and operating systems we wanted to explore its use in providing more interactive multimedia tutorials.
We wanted to get away from using the computer as a page turner of what amounts to an impoverished form for the display of text. Screen resolutions at 72 dpi still do not compare favourably with paper at a resolution of more than 300 lines per inch. Our earlier attempts at using Hypercard for a tutorial on operating systems failed to live up to the promise of a richer environment. It suffered from several of the common failures for such material -- but this only made us more determined to continue. It is just possible that the environment for success has now been developed. With the Internet, teachers and learners no longer need to be in the same place and at the same time -- geography and time are no longer as important.
This project depends on several underlying technologies that are coming to fruition at this time. Before discussing the development of this tutorial on Java itself these technologies are discussed. While other technologies have been adopted to use in teaching the computer is the first to be able to be used at the cognitive level. Of course, we still need to use these earlier technologies such as paper, film, radio, television and CDs until the stage where computers can be as effective as each one of these. For example, reading text off a screen is slower probably due to a number of factors. Unless a computer display can become more like a book in its many features we shall continue to need paper. The same can be said for the other technologies, but increasingly the computer is catching up on them -- for instance a PC with either an MPEG decompression chip or a TV tuner is able to display film at an acceptable quality.
In the mid 1960s the US Department of Defence Advance Research Projects Agency (ARPA) funded experiments that led to the development of packet switched networks. Their aim was for a system that would still allow communication to take place even though enemy action had disabled parts of it. In late 1969 the ARPANET was formed with four nodes, and went on to show that packet switching was an alternative to message and circuit switching. The Internet depends on packet-switching.
Meanwhile, at the University of Hawaii a network of computers on islands were linked over the seas via random access broadcast radio. Through a link with Xerox's research lab PARC came the idea of such a system over coaxial cable, with the added advantage of early collision detection. This led to the invention of ethernet for local area networking (LAN). Its widespread adoption and continued growth in speed -- originally 3 Mbps on thick coax, to 10 Mbps on thin coax and more recently on UTP and now quite commonly 100 Mbps, with 1 Gbps ethernet on the horizon. Ethernet is dominant for LANs.
The other technology that was needed was a set of protocols that could be used over different hardware and operating systems. Once more funding from DARPA, this time at the University of Stanford in the early 1970s created the flexible protocols for the interlinking of hosts and networks. This suite of protocols is referred to as TCP/IP (Transmission Control Protocol and Internet Protocol). ARPANET adopted these protocols in the early 1980s. By the mid 1980s the US National Science Foundation had developed another network for Computer Science departments that also used TCP/IP, and this net eventually replaced ARPANET as it retired in 1990. The name "Internet" then became part of common parlance to refer to the now global linking of networks. By April 1995 the growth of traffic led to the replacement of NFSNET by the current architecture in the US with higher speed backbones. Having such widely accepted and adopted non-proprietary protocols is important for the spread of the Internet.
The history of hypertext goes back to the dawn of the modern computer age. Eniac is 50 years old this year and Vannevar Bush's idea of a Memex (Bush 1945) which he explored in his paper published in 1945 predates this. In 1965 Ted Nelson coined the term "hypertext" to describe this non-linear reading of text in a computer system. In 1986 OWL released the hypertext system "Guide", based on the work at the University of Kent, which became the first widely used hypertext system. Then in 1987 Apple bundled its hypertext system "Hypercard" together with a scripting language on all Macs which allowed more people to create applications for the Apple Mac. In 1991 Tim Berners-Lee in Switzerland released the line-mode interface to the World Wide Web. However, when the graphical user interface of the Web browser "Mosaic" from the University of Illinois' National Center for Supercomputing Applications (NCSA) was released in June 1993 the Web really became usable by anyone who could point and click. The launch in 1995 of Netscape Corporation who had developed its own browser also coincided with the overtaking of Web traffic from ftp as the dominant use of the net in the US.
Hypertext, especially when applied to all media available on the computer (hypermedia), is another critical element in both the growth of the Internet and also to education.
Java (Flanagan 1996) origins go back to 1990 and were not related to the Web -- why should it have been, all we had then was mainly file transfer, news and email across the net! Sun had an impromptu review of what it was doing and this began a project codenamed Green. They were designing software to run in devices that most people would not think of as having any compute power. In 1991 they experimented with control devices and showed a prototype in August 1992. They were unhappy with any choice of language and one of the team, James Gosling, designed a new simpler language which he named Oak after the tree outside his window. At about the same time came the idea of packets of code being downloaded over the net. In 1993 Sun became involved with interactive TV as a vehicle for Oak, however this project went to another company. With the launch of Mosaic later that year the scene was set for Bill Joy in 1994 to see that Oak and the Web were made for each other. In January 1995 Oak was renamed Java and the initial application browser Webrunner was also later renamed HotJava. In August 1995 Sun delivered Java and HotJava to Netscape Communications Corp -- their first commercial customer. The speed of uptake of Java is faster than any previous language.
Java allows you to create small downloadable programs called "applets". The Sun JDK comes with an applet viewer as an alternative to using a browser or using Java to create a standalone application. The way it is used with browsers uses an extension to HTML which will be generalised to cope with similar uses as Java. In the meantime, a Web page needs to specify the applet code to be loaded as:
It is architecture neutral, in other words it is not solely aimed at one platform and runs on most existing hardware platforms and operating systems to be found on the desktop. It also has a platform independent graphics model. Java has exceptions and is multi-threaded. All programming is object-oriented. Most of the syntax is from C/C++. Unlike C++ it uses single inheritance, although it has provided packages which provide some of this functionality. All variables are initialised to a default value, bang goes another class of problems. All the sizes of the low-level types are fully defined and are independent of the platform. The advantages of these features is that both the learner and the accomplished user can concentrate on higher-level abstractions. Advanced features can then be used in later units such as those on operating systems, or concurrent programming.
<APPLET code="myApplet.class" width=100 height=200>
optional -- some other HTML for non-Java-enabled browsers
where the width and height are to specify the size of the area within the browser window for the applet.
The designers of Java have kept out features present in C/C++ that are problematical for both learners and professional programmers. For example, there are no explicit pointers, instead Java uses recursive data structures. Another related issue is the management of memory allocation -- in Java this is taken care of by the system. Array access errors are another common source of problems in C/C++ and Java has made this safer by providing automatic runtime bounds checking. Strings too are a class, with another class for alterable strings and again are less trouble than the array of char found in C/C++. The Boolean type has been added, removing another set of problems caused by the use of integer values of zero for false and non-zero for true in C/C++.
There remains some concerns over issues in human-computer interaction (HCI) with the addition of Java to Web pages. Will this browser interface be the sole doorway to computing for many users? The question is then on the usability issues of this form of interface. Additional aspects of the use of history bookmarks, navigation issues such as open URL, back, forward, goto, links on a page, special buttons on a page, navigation using graphic maps, within the page scrolling, within the screen with multiple browser windows etc. What is the user's mental model? One page is one screen is impoverished. The recent addition of frames, forms and dynamic pages makes even the simple model break down already. We need to be careful not to disregard all the hard won lessons from both the HCI and the hypertext communities.
Most attention is being paid to using Java to provide interactive content in Web pages. But Java holds the promise, long made by Sun, that the network is the computer. Maybe this should be rephrased into "the Internet is the computer"?
Since the start of personal computers in 1975 we have seen several significant changes. First the Apple II and then the launch of the IBM PC in 1981 established the arrival of the PC to both the education and corporate sectors. The Apple Mac in 1984 took the PC from the realm of the computer expert to the hands of the user who simply needs to use the computer to solve their own task. Since then the performance of the PC has continued its geometric improvement; its functionality has shown similar growth while the price has continued to decline. At the same time modem technology has continued to improve from a speed of 110 bps common in the 1960s to the 33.6 Kbps of today's modem.
Having low cost personal computers connected to the Internet is the final technology slice making up this educational cake.
Computers In Learning
Educators have been using computers in learning from the earliest days of terminals attached to mainframes, through the mini-computer era and then the microprocessor age leading to the widespread of the PC as a commodity item bought as a household appliance. In general the early applications can be thought about as being applied to learning either about or with computers. More recently, the use of the CD-ROM has become widespread with both its decline in cost and increase in speed and many good examples exist of placing large bodies of information on them. Increasingly archives of journals have been made available in CD-ROM with comprehensive indexing and cross-linking.
However, we are more concerned with the a system to support learning, encouraging users to think and facilitate the incorporation of new ideas and more importantly retain the learning. The University of Western Australia in the 1980s provided the PLATO system (Scriven & Adams 1988) which provided for individualised instruction However, all the technologies and pricing was not favourable for its wider adoption.
How does studying on the Internet differ from conventional teaching methods? In addition to the obvious ones, students can communicate over email either with staff or peers. For those who live away from the campus or whose personal circumstances make it difficult to attend laboratories the access over the net is a boon. The fact that we can update the information and also link the system to the relevant parts of the Web makes it quite different to other methods of delivery.
What equipment is needed? Well, a PC with a modem and the necessary Java-enabled browser. Modem speeds are already reasonable (up to 33.6 Kbps for recent ones) given the low traffic required once the applet is loaded, and there are future increases in speed either through improvements in modems or the introduction of cable modems or even ISDN coming down in price! Of course, the use of a modem takes the telephone out of action which may cause a problem for many households. Then additions to the PC may be needed if sound is used for example, though most PCs now come with a sound capability. The next stage is the development of low cost netstations that will need high-speed net access to download all their software. It may be that the house for the next century is not only connected to the net but has its own net running around the rooms of the house.
The tutorial is divided into five separate sections. The first is an introduction to both the tutorial and to the language Java. The second covers object-oriented concepts. The third is the basics of Java programs and how to compile and execute Java programs. The fourth covers applets, and leads into a discussion of threads. The final one examines the use of graphics and the layout manager.
It was decided to use frames, this allowed the use of an overview to be continuously present. Navigation was kept as simple as possible as we did not want to encourage aimless exploration. To encourage users to think about the material rather than simply reading their way through the material we also have exercises at the end of each lesson. The testing itself uses a Java applet, and provides interaction with the user without needing to contact the server.
Applets are used throughout the tutorial to illustrate points -- for instance there is one for developing an understanding of the control for branch selection using if-else. The user sees a code fragment together with buttons to control the demonstration. For the control using a loop it can be either single stepped through or the animation allowed to run at a user controlled speed.
The interactive tutorial was compared with using a paper-based convention tutorial. A group of final year students were split into two groups. All were familiar with the use of the Web but had limited knowledge of object-oriented programming. Before they began they all answered the same questionnaire. Once they had completed the tutorial they were again examined by questionnaire. The results we found in our relatively small sample of nine subjects are that there was significantly more improvement in the group that used the interactive tutorial. At the moment we cannot give any definitive results, we only used the small evaluation to identify areas for improvement.
How does the Web differ from previous hypermedia systems? It is its scale, global context and the fact that all the technologies are at long last converging. Speed of the net is an important issue -- plus it is not as consistent in its responsiveness as systems running from a local disk. As with conventional hypertext systems there are similar problems of disorientation -- lost in cyberspace. How can we improve? We can provide variety in navigation together with richer node/link semantics. Improved authoring tools are needed to allow non-programmers access to the richer functionality. Another change is to go away from the simple model that a page is a screen. Perhaps we should examine importing some of the rich functionality from Computer Supported Cooperative Working (CSCW). There is still a lack of functionality that has been present in other hypertext systems, as yet another generation of hypertext authors go around the wheel of reincarnation. There is still too much variability -- speed of connection, size of screen, range of colours, what plugins are present, extent of support for HTML and extensions, to allow much more than assuming some impoverished common base.
Bush, V. (1945). See -- http://www2.theAtlantic.com/atlantic/atlweb/flashbks/computer/tech.html
Flanagan, D. (1996). Java in a Nutshell. O'Reilly and Associates Inc.Internet (1995) See -- http://www.cc.gatech.edu/gvu/stats/NSF/merit.html
Lewis, T. (1996). The Next 10,0002 Years: Part II. IEEE Computer, 29(5), 78-86.
Scriven, M. and Adams, K. (1988). An Evaluation of the PLATO Installation at The University of Western Australia. The University of Western Australia
It is a pleasure to acknowledge the work of my student Mr. L. S. Tan in contributing so much to these ideas and their implementation.
|Please cite as: Jones, P. E. and Lin, S. (1997). Teaching the programming language Java over the Web. In Pospisil, R. and Willcoxson, L. (Eds), Learning Through Teaching, p149-153. Proceedings of the 6th Annual Teaching Learning Forum, Murdoch University, February 1997. Perth: Murdoch University. http://lsn.curtin.edu.au/tlf/tlf1997/jones.html|
[ TL Forum 1997 Proceedings Contents ]
[ TL Forums Index ]
HTML: Roger Atkinson, Teaching and Learning Centre, Murdoch University [firstname.lastname@example.org]
This URL: http://lsn.curtin.edu.au/tlf/tlf1997/.html
Last revision: 2 Apr 2002. © Murdoch University
Previous URL 11 Jan 1997 to 2 Apr 2002 http://cleo.murdoch.edu.au/asu/pubs/tlf/tlf97/jone149.html