You are on page 1of 5

PROJECTS FOR LECTURING WIRELESS JAVA

Hans Weghorn
University of Cooperative Education
Rotebühlplatz 41, 70178 Stuttgart, Germany

ABSTRACT
Since our studying courses are performed in a joined education between the University and partner companies, one of the
important aims of the University of Cooperative Education is to lecture industry - and application-near contents. For the
area of information technology (IT), wireless JAVA represents a recent interesting and also promising topic. Therefore,
this actual knowledge enabling the students to develop software for handheld devices was introduced in our IT courses.
As first step wireless JAVA was investigated and applied within a team project on system components for unified
messaging, which ran over two semesters. As second step, one of the enhanced programming lectures out of the IT
curriculum was used to teach this new content to an entire class of students. Some of the developed applications are based
on a C2C concept, which shall demonstrate how wireless data services can be made more attractive and efficient for
customers. Here, the teaching concept, the exercise results, and the success of introducing this new topic are reported.

KEYWORDS
Wireless JAVA, WEB-based Training, Personal Assistant Applications, Mobile Devices, C2C.

1. INTRODUCTION
During the study of the Information Technology courses, our students finish several lectures on programming
and software engineering. In the first studying year, procedural programming on base of ANSI C
(Kerninghan and Ritchie 1988), and object-oriented programming on base of JAVA are taught, while each of
these lectures lasts 60 hours of teaching including theory and exercises. Between all the theory semesters,
there are additional practice semesters, which are accomplished in the educating companies. During these
phases, the students work on practical projects, e.g. implementing programs, and may have further theoretical
lessons, which are given by company experts. From this experience, the students are well trained after the
first studying year in standard JAVA development covering language basics, (graphical) user interface,
networking, and many more related topics (e. g., like contained in Bell and Parr 2002).
Following this, the learned basics are improved in the second studying year by additional lectures on
programming. From attending a tutorial (Mahmoud 2001-1), the idea came up that wireless JAVA (J2ME)
would be feasible for this kind of enhanced lecturing. Due to the well-founded base on standard JAVA,
J2ME can be efficiently introduced by mainly displaying the difference between the JAVA standard edition
and the wireless variant. It is important beside explaining the general J2ME philosophy (Muchow 2002) to
particularly line out the restrictions and constraints of embedded run-time environments, and to introduce the
relevant aspects of programming embedded systems with limited capabilities in respect to memory space,
CPU speed, and I/O, especially the UI.
Another lecturing part of our IT curriculum are guided, self-working projects, which are realized in
collaboration of small teams in the final studying year of the IT course. These projects allow an amount of
around 150 working hours per student, which enables that such a work can be performed in deeper detail.
This frame was used in 2001 to start a first investigation of the applicability of J2ME solutions.

759
IADIS International Conference e-Society 2003

2. PROGRAMMING LECTURE ON J2ME

2.1 WEB mining of teaching contents


Since Wireless JAVA realizes a special branch of the global JAVA language tree, which is owned by the
company Sun Microsystems, lots of professional information is accessible through Sun’s WEB pages
(http://java.sun.com/j2me, http://wireless.java.sun.com). On these pages, small WEB tutorials, slide sets for
seminars, example code, literature references, articles, and book samples are provided in addition to
downloadable tools and code for development.
This source offers a helpful base for developing a new lecture on wireless JAVA, and during related
practical exercises, the students can benefit from this information source to solve their detail problems. Due
to this good WEB resource, the frontal lecture, which was specifically designed for our application here,
could be reduced to an introductionary session of four hours. Since the curriculum defines 24 hours for our
enhanced programming lectures, the remaining time could efficiently be used for the practical working
contents including a considerable portion of WEB-based self-learning. The theory session covered an
explanation of the wireless JAVA concepts, the key words, and the class libraries, while the following items
especially were focussed1 :
• General frame: KVM (kilo virtual machine), CLDC (connected limited device configuration)
• Device-specific frame: MIDP (mobile information device profile) and targeted device classes
• Details on a few dedicate class libraries: MIDlet (application layer), LCDUI (user interfacing)
• Overview of additional J2ME specific class libraries: Networking, persistence storage, I/O, …
• Development procedure: Process, tools, run-time environment, constraints
For enabling the students to autonomously start with the development of own programs, the MIDlet and
the UI concept (Mahmoud 2001-2, pp. 59 – 93) were explained in very detail. In addition, the working steps
for generating a small “Hello World” application (similar to White and Hemphill 2002, chapter 4) were
displayed at a detail level that the procedure could be repeated without help. The other topics were covered
more as general view of possibilities. Finally, hints were given, how relevant information on these topics can
be collected in self-education by using Sun’s WEB pages.

2.2 Exercises and training tasks


As basic acquainting an enhanced “Hello World” program was defined, which should list names and
photographs of the members of the small development teams, which were founded for the exercises. As core
task, the students were allowed to choose from the following list of wireless applications:
Business: 1) Retrieving e-mail headers, 2) Retrieving traffic information from a WEB service site
Personal: 1) Decimal fixed point calculator, 2) Bionic rhythm calculator
Fun: 1) PacMan game (simplified version), 2) Car racing game
With these tasks, today’s typical application areas are addressed. The business applications are to be
linked to other information suppliers on the Intranet for e-mail, and on the Internet for traffic information
access. Therefore, these had to be realized as client-server solutions. The defined personal and fun
applications do not require wireless communication; hence, these run as standalone MIDlets. For having a
common development base for the exercises, it was defined that the test environment should be Sun’s
kToolBar (Knudsen and Nourie 2002) with its simulators of wireless devices.
The students grouped themselves in working teams of between two and three persons, and selected their
favorite topic. All the exercise tasks were selected, several by two teams. Joined sessions in the computer
laboratory were organized, where help was supplied by the lecturer. Some of the teams didn’t need help,
some did. In most cases, the problems were not arising from J2ME questions, but more from other issues
related to the solution concept, like, e.g., the implementation of the server programs on base of UNIX scripts.
One team had difficulties with the general concept for board games. After some guided discussion, a solution

1
J2ME specific terms, e.g. KVM, CLDC, MIDP, are used here without any explanation, since the introduction of the J2ME system
itself is out of the scope of this paper. For obtaining fundamental information on J2ME, the cited sources can be used.

760
PROJECTS FOR LECTURING WIRELESS JAVA

could be figured out for them. As J2ME specific approach, the PacMan playing board was not realized as a
two-dimensional array, but as one-dimensional array for saving resources. Other J2ME-specific solutions are
seen in the biorhythm calculators: For entering the required date information, the appropriate J2ME class
DateField (Mahmoud 2001-2, pp. 78 – 81), which is not known from the standard JAVA library, was useful.
The lack of floating point operations for computing the bionic curves was overcome by using constant tables
for the required sine values. In total, all teams were able to successfully accomplish the selected tasks (some
samples are visible in Figure 1), which is outlined in more detail in (Weghorn 2003).

Figure 1. Here, samples of the developed applications are visible (from the left to the right): A MIDlet selection screen; a
result of the enhanced HelloWorld program; the menu screen, the UI screen for setting the birthday by using the J2ME
class DateField, and the graphical result for the biorhythm calculator.

3. THE C2C PRINCIPLE AND APPLICATION SAMPLES

3.1 The idea of C2C


If the user directly wants to access data on the open Internet, there usually arise different serious problems
with today’s handheld devices: Only a very small portion of the available huge data amount is formatted in a
manner, which is convenient for a display on small devices. In addition, the size of Internet content pages are
also more than inappropriate for a direct download through the relatively slow and expensive wireless links.
A concept to overcome these fundamental problems is to have a server tool residing on the Internet /
Intranet, which filters the desired contents and supplies the selected data sets in a format, which is convenient
for a wireless download. Such a service of providing customer-selected, customer-preformatted data for a
wireless download shall be called here a customer-to-customer service (C2C). The disadvantage of this
method is that an additional server application is required, which is to be configured – in most cases
manually – by the user. For University users this is not really a problem, because the services can be supplied
to the Internet on open central servers.
In general, such a C2C service is useful not only for one specific customer, but the intermediate, pre-
selected and pre-formatted data may be shared with other customers. For sharing the service, the other users
need the appropriate wireless display software, which, e.g., can be realized as J2ME application. The sample
of accessing dedicate traffic information through a J2ME display client (Weghorn 2003) is a typical useful
sample for such a C2C application.

3.2 Wireless access to personal e-mail as C2C service


One of the tasks defined by the J2ME lecture described in section 2 was to develop an application for a
wireless access to e-mail accounts. The identical problem was already investigated earlier by two students
within a project work, which ran over two semesters starting in 2001, and ending in 2002. The goal of these
applications was to access newly received Internet e-mail headers from handheld devices. Since the desire
was not to directly download the e-mail, but to access only a part of the entire e-mailing information, the
problem was feasibly solved with the C2C approach. As state of technology, the server application would
today be implemented as JAVA servlet (Bell and Parr 2002, pp556). Unfortunately, it was not possible to use

761
IADIS International Conference e-Society 2003

JAVA servlets, because our central WEB server, which had to host the server application for this task, runs
outdated versions for the system software components, and it won’t be upgraded any more.
central University server app. (UNIX)
server host do forever
check user’s spooling
incoming e-mails file for new e-mails
e convert relevant
e
e contents to ASCII
SMTP transfers
store locally in user’s
public-html directory
sleep a while

HTTP request for static page


(coded in plain ASCII)
J2ME
public-html display
UNIX directories client
spooling app.
directories

Figure 2. The simplified system for accessing Internet e-mail headers from a handheld device is based on pseudo-static
WEB pages: The display application – a J2ME MIDlet running on the handheld device – requests a static HTML page,
which is updated regularly by a server program, which translates e-mail information into the proper WEB resource on the
central server host.
For the simple variant, which was developed in the limited time frame of the described J2ME lecture,
active server queries were avoided by using pseudo-static content pages as intermediate exchange media
(Figure 2). A server program, which was realized as UNIX script, retrieved newly received e-mails from the
UNIX spooling directory. The user’s UNIX spooling file for incoming e-mail was checked with a certain rate
(e.g., every five minutes), and the server program produced an ASCII file in the user’s public-html directory,
from which a simple-styled J2ME display client retrieved the actual information (all new mail headers). The
disadvantage of this approach is that the information may not be recent enough depending on the questioning
rate of the server program. On the other hand, the problem could be solved with a unidirectional system
concept.
central University
server host

incoming e-mails XML coded


e response
e
e IMAP
SMTP transfers service IMAP
retrieval
server
trigger tool
WEB J2ME
service display
HTTP request for a dynamically
UNIX client
generated page
spooling app.
directories

Figure 3. In the enhanced system for accessing Internet e-mail headers from a handheld device, the responded content is
generated just in time by the client-server system.
The more enhanced variant for solving the e-mailing problem was to use concepts, which are much more
generalized (Figure 3). In particular, as data exchange format for the retrieved mail headers, XML formatting
was defined and used. This implies that on the J2ME client a parser was required (for resource reasons, the

762
PROJECTS FOR LECTURING WIRELESS JAVA

MinML parser was selected, which is available through http://www.wilson.co.uk/xml/minml.htm), but such a
system is expandable more easily. The lack of servlets was overcome by a relatively complicate tool
construction (the server application consisted of three intercommunicating programs), but the obvious benefit
of the active server page method is an accurate information response. It further implies that interference
between different clients accessing the same e-mail account is avoided by the fundamental concept. As
general concept, not a dedicate UNIX mail file was used as information source, but the system could collect
information from different e-mail accounts through enhanced mail protocols (POP3, IMAP). The
combination with filtering and selection mechanisms as described in (Weghorn 2001) is also easily added in
this system in contradiction to the possibilities of the simplified solution outlined before.

4. CONCLUSION
In total, the students were very interested in the new lecturing content J2ME. Comparing, in particular, the
J2ME lecture to alternative topics (C++, further JAVA contents) for the enhanced programming lecture in
our second studying year, the experienced acceptance level appeared considerably higher. An interesting and
important aspect was that the self-learning contents could be accomplished successfully. This was visible
from, e.g., the fact that all the teams, who needed networking, were able to develop a proper solution on base
of the WEB information material (this topic was not explained in detail in the theory session). The required
help, which was needed during the exercises, addressed mainly topics, which were not directly related to
J2ME, but which were more of common nature, e.g. fundamental approaches for designing the proper system
concept.
The students stated in the feedback discussion that they now find themselves capable of developing
wireless applications on their own. For the companies, where the students are working, the achieved
experience will offer a true benefit, because since several years mobile devices are of high interest either as
control terminals or as access points for wirelessly managing all kinds of company processes. The described
C2C system concept may help to implement many of these applications in an efficient design. Due the high
interest level, this kind of lecturing content shall be continued and improved in future semesters for our IT
students.

REFERENCES
Bell, D., and Parr, M., 2002, JAVA for Students. Prentice Hall, Dorchester, UK.
Kerninghan, B. W., and Ritchie, D. M., 1988. The C Programming Language. Prentice Hall PTR, New Jersey, USA.
Knudsen, J., and Nourie, D., 2002. Wireless Development Tutorial Part I Getting Started with MIDlet Development.
http://wireless.java.sun.com/midp/articles/wtoolkit/.
Mahmoud, Q., 2001-1. Wireless Application Programming with JAVA. Proceedings of the 3rd International Conference
on Enterprise Information Systems, Setúbal, Portugal, IS-40
Mahmoud, Q., 2001-2. Learning Wireless Java, O'Reilly & Associates. Cambridge, USA.
Muchow, J. W., 2002. Core J2ME Technology & MIDP, Sun Microsystems Press, USA.
Weghorn, H., 2001, Notification and routing of electronic mail to mobile phone devices. Proceedings of the 3rd
International Conference on Enterprise Information Systems, Setúbal, Portugal, 1188-1194.
Weghorn, H., 2003, Teaching Wireless JAVA at the University of Cooperative Education. Proceedings of the 2nd
International Workshop on Wireless Information Systems, Angers, France, (in press).
White, J. P., and Hemphill, D. A., 2002. Java 2 Micro Edition, Manning Pubs., USA.

763

You might also like