head 1.10;
access;
symbols
IT1FALL00:1.7;
locks; strict;
comment @# @;
1.10
date 2001.03.23.12.48.43; author dbc; state Exp;
branches;
next 1.9;
1.9
date 2001.02.23.14.04.09; author dbc; state Exp;
branches;
next 1.8;
1.8
date 2001.02.20.17.23.25; author dbc; state Exp;
branches;
next 1.7;
1.7
date 2000.11.22.22.33.05; author dbc; state Exp;
branches;
next 1.6;
1.6
date 2000.11.17.03.00.47; author dbc; state Exp;
branches;
next 1.5;
1.5
date 2000.10.05.17.58.05; author dbc; state Exp;
branches;
next 1.4;
1.4
date 2000.10.05.17.53.55; author dbc; state Exp;
branches;
next 1.3;
1.3
date 2000.10.02.18.15.30; author dbc; state Exp;
branches;
next 1.2;
1.2
date 2000.09.29.18.22.33; author dbc; state Exp;
branches;
next 1.1;
1.1
date 2000.09.25.18.19.03; author dbc; state Exp;
branches;
next ;
desc
@@
1.10
log
@Modified Files:
hw2.html hw3.html
@
text
@
An RMI-based Server
Building on the GUI you developed in the previous assignment,
write a client/server application, in which a GUI running
on a client machine (such as a PC) manipulates entries in a text file
stored on a server machine, somewhere else on the Internet.
Communication between client and server should go through RMI.
You should design an RMI remote interface through which the client
can read and write to a data file on the server machine. For
simplicity, limit the interface to operations that read the whole
file and write the whole file. If you wish, you may base
your interface on the FileSource example discussed in
the lectures (you may only need to add one method for writing).
It is recommended you run the server implementing this interface on
sirah, merlot or cabernet
in CSIT.
The client program may be either:
-
A Swing applet, adapted from the program you produced in
Homework II. The JFrame should be
converted to a JApplet, and calls to your remote
interface should be added for reading from and writing to the data file
on the server machine.
To view your applet you will need access to an Internet-connected
computer, probably with the Java 2 browser plugin installed.
This will be discussed in the lectures.
Or:
-
A Swing application, adapted from the program you produced in
Homework II. Calls to your remote
interface should be added for reading from and writing to the data file
on the server machine. Class files for RMI stubs should be downloaded
dynamically from a Web server.
To run your client application you will need access to an
Internet-connected computer,
with Java 2 development software installed.
You are encouraged to deploy HTML (if using an applet), and downloadable
class files, in the directory
/home/httpd/html/it1spring01/homework3/uid on
sirah, where uid is your
login id (user name) on this machine.
You should then be able to view the applet at a URL of the form:
http://sirah.csit.fsu.edu/it1spring01/homework3/uid/...
Note: this assignment is supposed to be a
relatively short exercise in getting an RMI based program
running. It should not involve extensive new coding.
Submission of your Homework
Your submission should consist of files including
-
A short description of your program,
including instructions
for running your server program,
preferably in Microsoft Word,
HTML, or plain text format,
- all Java source code,
- if you are using an applet, a suitable HTML page with an applet tag, and
- an example data file, to be placed on the server.
On sirah you will find a directory called
/home/project/it1spring01/homeworkr3/uid where
uid is your login ID. To submit Assignment 3,
please copy your files into this directory. Note this is not
the same directory as the Web server directory mentioned above!
Grading
For this assignment, there will be a total of 15 points.
Grading criteria are similar to
Assignment 1.
Some points will be assigned on the basis of apparent effort and
uniqueness. To get full marks you should be using dynamic class
loading, either by using an applet front end, or otherwise
ensuring RMI stubs are loaded to the client dynamically.
Useful resources
Simple applet-RMI, client-server examples
See the examples for the RMI lecture set,
here.
The Java 2 plugin
This is available from
Javasoft.
Please send questions to Bryan Carpenter at dbc@@csit.fsu.edu.
@
1.9
log
@Modified Files:
hw3.html
@
text
@d58 1
a58 1
on the server machine. Class files for RMI stubs should be downloading
d68 2
a69 2
If you write an applet, you are encouraged to deploy HTML, class files,
and data file in the directory
d112 1
a112 1
ensuring RMI stub are loaded to the client dynamically.
d118 1
a118 1
Simple applet-RMI client-server examples
@
1.8
log
@Modified Files:
hw3.html
@
text
@d123 5
@
1.7
log
@Modified Files:
hw3.html
@
text
@d3 1
a3 1
Applications of Information Technology I: Homework 3, Fall 00
d9 1
a9 1
CIS 6930-01
Fall 2000
d12 1
a12 1
The Graphical User Interface
d18 1
a18 1
Writing a Java application with Swing components
d21 14
a34 45
You are asked to write a Java application to manipulate entries
in a text file. The program must have a Graphical User Interface using
Swing components.
Choose a meaningful interpretation for the entries stored in your
file. They might be names and addresses, or titles and bibliographic
information, or something more imaginative. Bear in mind that in
future homeworks you will be invited to develop the program you submit
here into a client-server distributed application, accessing a database
on a remote machine. Try to choose an example that lends itself to
these future developments.
Most likely the file entries will consist of a key string and one or more
strings representing data fields. You may choose to lay these out in your text
file on consecutive lines, eg
key1
data1
key2
data2
...
If your data fields can run over several lines, you might use
lines containing a reserved string pattern to separate the entries.
Your program should be able to read the whole text file and store all entries in
internal data structures of your design. One convenient possibility
may be to store the keys in a
javax.swing.DefaultListModel and to store the data
fields in a java.util.HashMap. The program should
also be able to save the modified data structures back to the text
file in the original format.
The graphical user interface should have at least
- A scrollable list component for selecting entries.
- Buttons to add and
delete entries, and a means of modifying existing entries.
- Text fields and/or text areas for displaying, entering and
modifying entries.
Try to add one or two other features relevant to your chosen
application. But don't make the program overly elaborate, otherwise
it may become difficult to adapt in future homeworks. (For example
there may not be much point adding an elaborate file chooser, because
this will become irrelevant if the data is stored in remote a database.)
d36 18
a53 2
To submit your homework, include
d55 67
a121 43
a document describing the application,
the file format, and the program;
- the .java source
file(s) and (optionally) .class files;
- (optionally) javadoc documentation as
.html files; and
- an example data file.
As usual, the code should be nicely organized and documented.
In coding, try to follow the major recommendations in Sun's
Code Conventions for the Java Programming Language.
Long lines or bad indentation policy make code difficult for the
graders to read, and this could affect your mark.
Simple reading and writing of text files
Since this wasn't covered in class, there is an example that reads
lines in a text file, and writes them back to another text file, in
here.
Simple Swing examples
You will find most of the Swing components you are likely to need
illustrated in the
examples
from the lectures.
Running Swing applications
You may be able to develop and run your Swing-based program on
sirah or the other course hosts. But in general this
will only work if you are logging in from a computer that can display
remote X-Windows based applications.
If you are logging in from a Windows PC that does not have
special software (e.g. Hummingbird Exceed) installed
to display X applications, you will not be able to view Swing
applications running on sirah.
Instead you should consider downloading and installing
JDK on your
PC and testing locally.
a128 1
@
1.6
log
@Modified Files:
hw3.html
@
text
@d95 1
a95 1
examples
@
1.5
log
@Modified Files:
hw3.html
@
text
@d89 1
a89 1
here.
@
1.4
log
@Modified Files:
hw3.html io.html
@
text
@d85 6
@
1.3
log
@Modified Files:
hw3.html
@
text
@d80 1
a80 1
d83 8
a90 1
graders to read, and this could affect for mark.
@
1.2
log
@Modified Files:
hw3.html
@
text
@d26 1
a26 1
file. They might be names and addresses, headers and bibliographic
d43 2
a44 2
If your data fields can run over several lines, you might add blank lines,
or lines with a reserved string pattern, to separate the entries.
d56 2
a57 2
- Buttons to add, edit and
delete entries.
d67 11
a77 4
To submit your homework, include a document describing the application,
the file format, and the program; the .java source
file(s) and .class files; javadoc documentation (as
.html files) if you wish; and an example data file.
d79 5
d87 4
a90 4
You may be able to develop and run your GUI-based on
sirah, but in general this will only if you are
logging in from a computer that can display remote X-Windows based
applications.
d92 4
a95 4
If you are logging in from a PC that does not have special
software (like Hummingbird Exceed) installed to
display X applications, you will not be able to view Swing applications
on sirah
d99 1
a99 1
PC and running locally.
@
1.1
log
@Added Files:
hw3.html
@
text
@a16 6
d72 16
@