applet + database

T

Tom Leylan

Hi... I'd like to minimize the amount of time I spend gathering up the
"parts" so if anybody has any suggestions I'd like to hear them.

I'm planning to write a simple applet to display database records. It's a
large database (in terms of number of rows) but it isn't complex. It only
has a couple of tables and the data is read-only.

It's been awhile since I developed in Java so I want to get the latest
tools. Am I correct in guessing I need to dl the J2SE 1.4.2 package? And
I'll need JDBC right? Is that included in the base package or do I download
that separately?

Due to limitations on the website I don't have SQL-Server or Oracle
available. I can easily configure it to use MS-Access. If there is an
alternative I'd like to hear about it. I might have MySQL available I'm
going to check. It seems that I need a JDBC driver for whichever database I
choose, is that right? I assume those aren't included in the standard
package and I have to hunt one down.

And regarding usage... the database obviously resides on the server and the
applet is downloaded to the client. The JDBC code is copied to the client
also right? And the JDBC driver also?

I've been looking around and I'll likely stumble upon the stuff I need but
if anybody knows of an applicable example (published on the web) I'd
appreciate a pointer.

Thanks,
Tom
 
J

Jim

I've used MySQL and found it easy and robust. It's free and you can get the
driver you need there also. And of course you need a Java develoment
environment.


Unless I misunderstand what you're trying to do, everything runs on the
server and the client
would be just a browser somewhere out on the internet wire.

One big issue I had when building a database-backed web site was moving the
data to the
applet. There is, if I recall right, a technique called HTTP Tunneling
which allows applet code
to talk to the server; I could never get it running.

I ended up using servlets and JSPs (java server pages). The servelet would
do the database query, package
up the results in a know fashion, attach them to a JSP that held the applet.
When the page
was rendered, Java code on the JSP would move the data into a local variable
that was availabale to the
applet. The applet would then parse the result package and fill a JTable for
display. You can package the data
so that the applet can get the column headings, column count and build the
table on the fly without having to
know the 'dimensions' of the query results a priori.
note: I'd be happy to hear about other schemes for moving data from a
database to applet.

Books I've found helpful are: (I think some come with or have downloadable
sample databases)
Core Servelets and Java Server Pages, Monty Hall, Sun
Java Servlet Programming, Hunter & Crawford, O"Reily
Java Servlets and JSP, Steelman and Murach, Murach (has CD)
MySQL and JSP Web Applications Turner, Sams

Hope this overview is of some help.

jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top