• 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

Allow New Database File

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know it is not required by the assignment specs, but would it be a good idea to allow the user to add records to a brand new database file? What I mean is this:

1) The user launches the client in standalone mode.
2) A "choose database file" dialog appears in front of the empty client
window.
3) The user does not choose a database file and cancels the dialog.
4) The user is left with an empty client not showing any data. The user can
do nothing except add new records.
5) The user selects to add a new record and is prompted by another dialog to
either choose an existing database file or create a new one. If they
choose to create a new one, they must supply a new database file name.

Seems like a lot of trouble to provide additional functionality for. The other consideration I am leaning towards is to just prompt the user with a "choose database file" dialog upon client startup. If the user cancels that dialog, then they cannot do anything (all functionality is disabled or warning popups appear when an action occurs) until they choose an existing database file from the File menu.

Which way is a better solution? Thanks.
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But make sure when you submit your assignment you bundle original database file otherwise automatically fail...
 
David Sham
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ofcourse, you must package the original database file with your jar for submission. But do we need to be concerned about the user adding records to a new database file that the user would create? I'm leaning towards not allowing this as it says nothing in the specs about this, but I'm not totally sure.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make your life easier - when the user starts the program in local mode, they can either connect to a database, or press cancel. If they press cancel, just simply exit the application altogether.
 
Ken Boyd
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to spec of my assignment I haven't seen such thing. So I will not implement additional things.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic