wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: IS this a wimps way out? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: IS this a wimps way out?" Watch "NX: IS this a wimps way out?" New topic
Author

NX: IS this a wimps way out?

Morgan Bath
Ranch Hand

Joined: Jan 16, 2004
Posts: 196
I decided on a few assumptions and im worried ill get marked down for taking the easy options:
1) Ive decided that once a data base object connects to a database file any other connections to this VM whether local or through the network will be forced to use the same file. Not neccesarily the same instance of data.class, but all data.class objects will point to the same damned file. (This is if I allow multiple clients on one vm either)
2) My specs dont say you have to be able to specify where the database is or what its called, so ive decided to hardcode the name and assume its in the current working directory . (Obviously this doest matter if its not the first instance if assumption 1 is ok).
I didnt see the point of extra popup windows asking the user to browse to the file etc. It wasnt asked for, but its the sort of thing you would put in if it was a commercial product. What do you think? I figured this way it was easier for the user (examiner) to simply run the project, and its easier to code.


Morgan
SCJP (1.4), SCJD (1.4), SCWCD (1.3), SCBCD (1.3)
George Marinkovich
Ranch Hand

Joined: Apr 15, 2003
Posts: 619
Hi Morgan,
Well, I went back and re-read my assignment instructions and I couldn't find a specific requirement that requires the database file location to be configurable, so (if our assignment instructions are consistent on this point) there does not appear to be a requirement to do this.
Nonetheless, many people seem to be providing this capability. Perhaps the idea for providing this capability comes from the following quote in the assignment instructions:

All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.

So, clearly there are some things that need to configurable. I haven't heard anyone argue, for example, that the database server host doesn't need to be configurable. So one of the items in the suncertify.properties file should be database server host.
If you're going to provide a suncertify.properties file for handling the database server host, then it doesn't seem like too much additional work to provide configuration for database file location. On the other hand, a configurable database file location does not seem to be required by the assignment instructions (neither explicitly nor implicitly). So, if you're looking to simplify the work necessary for the project, not making the database file location configurable might be a good bet.
If database file location is not one of the configurable items, then will there be anything in the suncertify.properties that is used when you run the application in standalone mode? Of course, I'm not arguing that this is a valid reason for making the database file location configurable, just trying to suggest why many people (myself included) seem to have thought it should be provided in the absence of any explict or implied requirement.
Hope this helps,
George
[ January 22, 2004: Message edited by: George Marinkovich ]

Regards, George
SCJP, SCJD, SCWCD, SCBCD
Morgan Bath
Ranch Hand

Joined: Jan 16, 2004
Posts: 196
So you have a popup menu before connection asking you to browse for the local DB?
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
My assignment also said, in the Network Approaches section, :
In either case, the program must allow the user to specify the location of the database, ...

"In either case" refers to the choice of Sockets vs. RMI.
For standalone mode, I couldn't find anything that said that you had to allow the user to specify the location of the database file but that wouldn't be very nice from the user's point of view now would it.
For server mode, the user could legitimately be interpreted to be the system administrator though this too is open to debate. In that case the location is probably at minimum, the location of the database file. You could probably get away with running your server using a hardcoded port number but again the user may not appreciate that choice.
For client mode, location is the location of the server, so specification of the host name or IP address would probably be a minimum. You could probably get away with using a hardcoded port number.
Where the specs are unclear, you can probably get away with a lot if you explain your reasoning satisfactorily in your choices.txt. Now the question becomes, what is satisfactory reasoning ? Perhaps this aspect is one of the areas, along with being user friendly, where the mysterious "General Considerations" marking category comes into play.
Clear as mud, eh ?
Ultimately, you will have to trust your own judgement.


kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Morgan Bath
Ranch Hand

Joined: Jan 16, 2004
Posts: 196
Im having popup window asking for all the details, defaulting to those stored in a local suncertify.properties file and im making it damned user friendly. Yeah its 180 degree turn for me, I aint failing over something as trivial as this
George Marinkovich
Ranch Hand

Joined: Apr 15, 2003
Posts: 619
I think Ken's found the requirement that I missed when I re-read the assignment instructions:

In either case, the program must allow the user to specify the location of the database, ...

I'd say the above quotation makes it very clear that there is a requirement for a configurable database file location.
Sorry I missed that when I made my earlier response.
Thanks to Ken for finding the requirement. (I had a lingering suspicion that it was in there somewhere, I just wasn't able to find it.)
Sorry for the confusion,
George
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NX: IS this a wimps way out?
 
Similar Threads
How to design the interface
Data.class constructor requirements
abt assg
Isometric assistance needed
NX: To lock or not to lock, that is the question ....