Passed with 145/155
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi everyone,
After a looooong wait(38 days), just found I passed. Thanks everyone in this group for your help.
General Considerations(maximum = 58): 55
Documentation(maximum = 20): 20
GUI(maximum = 24): 21
Server(maximum = 53): 49
* RMI
* Extending
* Two comboboxes, too simple GUI
* No client id, so HashSet is enough, maybe not?
Best regards,
Mark Li
After a looooong wait(38 days), just found I passed. Thanks everyone in this group for your help.
General Considerations(maximum = 58): 55
Documentation(maximum = 20): 20
GUI(maximum = 24): 21
Server(maximum = 53): 49
* RMI
* Extending
* Two comboboxes, too simple GUI
* No client id, so HashSet is enough, maybe not?
Best regards,
Mark Li
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I noticed that you used HashSet for locking. Just wondering why you chose HashSet ? what about ArrayList ? is it because adding n elements is of order O(n) whereas HashSet offers constant time performance for basic opertaions assuming the hash function disperses the elements properly among the buckets ? what initial size you used for HashSet ?
Rasika Chitnis
Ranch Hand
Posts: 131
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
did you allow user to change mode from local to remote from the GUI ?
Mark Li
Greenhorn
Posts: 8
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi Rasika,
I think using ArrayList is OK for this project since many people used Vector and passed. Adding elements into ArrayList is faster than HashSet but I believe its searching is slower. To be honest, I spent very little time for the testing.
Once the user chose a mode, it would stay like that. Think about the real world application, only when the users encounter network problem, they would think of local mode, who bothers changing it all the time, it will drive users crazy.
Hope it helps.
Mark Li
I think using ArrayList is OK for this project since many people used Vector and passed. Adding elements into ArrayList is faster than HashSet but I believe its searching is slower. To be honest, I spent very little time for the testing.
Once the user chose a mode, it would stay like that. Think about the real world application, only when the users encounter network problem, they would think of local mode, who bothers changing it all the time, it will drive users crazy.
Hope it helps.
Mark Li
Rasika Chitnis
Ranch Hand
Posts: 131
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mark, Thanks for your reply. I too have not provided the ability to user for changing mode in the GUI. Once an application is started in one mode it remains that way.
Mark Li
Greenhorn
Posts: 8
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sorry, I didn't extend the Data class, I modified it. My mistake, because I was too excited to cool down when I saw my result. Did I use RMI? Just kidding.
Mark Li
Mark Li
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
A Vector (or, better, ArrayList) works. It is good enough. You'll pass alright. But it is not the most appropriate data structure; if the Collections framework is in your repertoire (and being an SCJP, it should be) then I don't understand why on earth you'd pick a substandard solution if using the real thing takes no more time.
Apart from performance - which can be argued to be unimportant - the locks are quite simply not a List. Locks aren't ordered. They can't have duplicates. This makes them a Set. Storing them in a List data structure means that the code is misleading in its expression, which is poor programming by any standard.
- Peter
Apart from performance - which can be argued to be unimportant - the locks are quite simply not a List. Locks aren't ordered. They can't have duplicates. This makes them a Set. Storing them in a List data structure means that the code is misleading in its expression, which is poor programming by any standard.
- Peter
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi Mark,
Over server did u keep local & remote operations kept in a single class like Data or made 2 subclasses from Data for local & remote operations ? Becasue what I feel is overloading some functions in a Data class will be very trivial. What is your opinion on this ? I am having only single instance of Data class.
Can you please elaborate on your design pattern choices ? Like which pattern used where ? Since my problem is, I have very less knowledge of design patterns.
Over server did u keep local & remote operations kept in a single class like Data or made 2 subclasses from Data for local & remote operations ? Becasue what I feel is overloading some functions in a Data class will be very trivial. What is your opinion on this ? I am having only single instance of Data class.
Can you please elaborate on your design pattern choices ? Like which pattern used where ? Since my problem is, I have very less knowledge of design patterns.
Mark Li
Greenhorn
Posts: 8
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I created different classes for local/remote data clients and used factory pattern so that the current mode is transparent to the GUI. I also used adapter pattern for RMI. Hope this helps.
Mark Li
Mark Li
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi Li,
Congratulations!!!
Just now i have become member to this group.
I have a little problem while combining the gui with RMI.
I am using DataClient to connect to database Local/Remote
Right now my application is running fine with local mode.
While connecting to remote method i have to use codebase, policy file declaration (As you are aware). How i can do through gui. If i write a seperate program and connect to database of the remote i am able to do successfully.
Perhaps this is nothing but Production environment.
Kindly Guide me.
Regards,
Sundar
Congratulations!!!
Just now i have become member to this group.
I have a little problem while combining the gui with RMI.
I am using DataClient to connect to database Local/Remote
Right now my application is running fine with local mode.
While connecting to remote method i have to use codebase, policy file declaration (As you are aware). How i can do through gui. If i write a seperate program and connect to database of the remote i am able to do successfully.
Perhaps this is nothing but Production environment.
Kindly Guide me.
Regards,
Sundar
Mark Li
Greenhorn
Posts: 8
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi sundar,
I didn't use dynamic class loading, so no need for codebase. I didn't use policy file on the client side either. If you do want to use them, according to the requirement, they can be part of the command line parameters. Hope it helps.
Mark Li
I didn't use dynamic class loading, so no need for codebase. I didn't use policy file on the client side either. If you do want to use them, according to the requirement, they can be part of the command line parameters. Hope it helps.
Mark Li
| What are you doing in my house? Get 'em tiny ad! The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |









