• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Simpel question...

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I'm currently doing the B&S assignment. This is what the specification says:

"
Network Approaches

Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely. No authentication is required for database access.
"

Could someone please help me to clarify if this means I have to present a dialog to the user where he can search for the database on the local computer? Or in both the local and rmi-implementation, a simple dialogbox where he can enter the full path to the database?

I have trouble understanding what to do with the database with the final solution; whether to include it in the Jar-file and assume this is the loation of the file, or to let the user specify it...

Thankx!
 
Allan Smith
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have on more question. My assignment clearly states that the program to be devloped should handle functionality like: listing contractors, searching and booking. However, my dabase interface class, provided by Sun, has methods like deleteRecord and createRecord. What's up with this? Am I to implement these too or should I just leave them alone??
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Allan,

In my opinion, the "location of the database" means different things depending on which mode you are in:
  • If you are running as a standalone client, then the location of the database would be the location of the physical file somewhere on a locally accessible disk drive. You would need to provide some way for the user to enter this location (and preferably just search for it (hint:JFileChooser)). As specified elsewhere in your instructions, this location would be stored in the properties file, and offered as a default location for the next time the application is run.
  • If you are running as a server, then the location of the database would be the location of the physical file somewhere on a locally accessible disk drive. You would need to provide some way for the user to enter this location (and preferably just search for it (hint:JFileChooser)). As specified elsewhere in your instructions, this location would be stored in the properties file, and offered as a default location for the next time the application is run.
  • If you are running as a networked client, then the location of the database would be the computer where your server application is running. So you would need to have some way for the user to enter the server address or IP address (and optionally the port number if you allow that to be changed).As specified elsewhere in your instructions, this location would be stored in the properties file, and offered as a default location for the next time the application is run.

  • Originally posted by Allan Smith:
    I have trouble understanding what to do with the database with the final solution; whether to include it in the Jar-file and assume this is the loation of the file, or to let the user specify it...

    From my copy of the instructions:
    Packaging of Submissions
    All elements of your submission must be packaged in a single JAR file. The JAR file must have the following layout and contents in its root:

  • The executable JAR containing the programs. This must be called runme.jar.
  • The original, unchanged database file that was supplied to you. Note that you must keep a copy of the original database file supplied to you, and this must be the file you submit. The marking process will expect the exact same data without any changes.
  • A directory called code, containing all the source code and related parts of your project. You must create subdirectories within this to reflect your package structure and distribute your source files within those directories.
  • ...
  • According to the second item, it must be in the root directory of your submission jar (not your runme.jar), which will be unpacked into some unknown directory on the assessor's computer. So you are going to have to allow the user to specify where the file is.

    Originally posted by Allan Smith:my dabase interface class, provided by Sun, has methods like deleteRecord and createRecord. What's up with this? Am I to implement these too or should I just leave them alone??

    Take a look at the JavaRanch SCJD FAQ.

    Regards, Andrew
     
    reply
      Bookmark Topic Watch Topic
    • New Topic