applet + database

Discussion in 'Java' started by Tom Leylan, Jan 14, 2004.

  1. Tom Leylan

    Tom Leylan Guest

    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
     
    Tom Leylan, Jan 14, 2004
    #1
    1. Advertising

  2. Tom Leylan

    Jim Guest

    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

    "Tom Leylan" <> wrote in message
    news:VTdNb.116834$...
    > 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
    >
    >
     
    Jim, Jan 15, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Love

    applet vs. canvas in applet

    Rob Love, Jul 7, 2003, in forum: Java
    Replies:
    1
    Views:
    653
    Liu, Chunyen
    Jul 7, 2003
  2. webster
    Replies:
    0
    Views:
    884
    webster
    Jul 20, 2003
  3. Andrew Thompson
    Replies:
    0
    Views:
    431
    Andrew Thompson
    Aug 5, 2003
  4. Blah Blah
    Replies:
    0
    Views:
    1,453
    Blah Blah
    Aug 13, 2003
  5. Jade
    Replies:
    3
    Views:
    951
    Roedy Green
    Aug 14, 2003
Loading...

Share This Page