Originally posted by einstien albert:
Congrats ........
Could you give us some more details about your preparation, design choices etc.
Regards
Einstien
I actually used quite a long time on the assignment, because I wanted to make sure that I passed, and also because I did not have all that much experience with
Java. I find that usually, the best way to learn a new programming language is to actually write a program. And so I did. (Minesweeper, not very original, but it worked...
After finishing my test project I felt more confident in starting on the assignment, although it was not as difficult as I expected, so I could probably have started right away. I spent about one month working with the assignment.
As for design choices, I found most of them quite easy to make. My general goal was simplicity and flexibility. RMI was a simple choice because of the ability to use an existing framework and because it is an industry standard. Subclassing vs. modifying the Data class was also an easy choice, because by subclassing Data I could separate high-level and low-level code. The methods in my sub-class did not use any direct file access, but relied only on the getRecord method of the Data class.
The server I made very simple. By implementing a singleton server, only one instance is started. Then the locking is also very easy to do, and you need no thread handling on the server. The server does not handle abandoned locks, but this I specified in the design document to be the responsibility of the developer, not the system. The locking I implemented as a Vector storing Integers corresponding to the record ID's. I declared the Vector in the data class.
As for the GUI, I was thinking flexibility. I the GUI completely separate from the application logics by having one control class and one gui class. The two classes communicates with each other by methods and events in the observer
pattern fashion. The control class calls methods in the gui class, and receives events according to the users choices. By doing it this way, it is possible to replace the whole GUI by writing one separate class, as long as the new class implements a particular interface containing the methods required to be supported by the GUI.
I used Sun Forte as
IDE.
The whole process of getting certified went just fine, with one exception. When I compiled the final jar file for the upload, I used Forte to do this. Apparently, Forte included a local file reference in the manifest file, which resulted in an "Corrupt file" response from the galton database. For long I did not know what to do, before a friend of mine suggested to recompile with the Java SDK jar tool. Then I discovered by chance that the manifest contained an error. I uploaded again and received the certification within one week.
Thor