aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S: deleteRecord() & createRecords() -> GUI? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S: deleteRecord() & createRecords() -> GUI?" Watch "B&S: deleteRecord() & createRecords() -> GUI?" New topic
Author

B&S: deleteRecord() & createRecords() -> GUI?

Jethro Borsje
Ranch Hand

Joined: Jul 22, 2008
Posts: 100
Hi everybody,

I am wondering about the createRecord() and deleteRecord() methods. They are provided in the DBAccess interface, but the assignment does not mention that this functionality should be made available through the GUI. At this point I have decided to not implement this functionality in the GUI because of this. Are there people out there who have decided to implement this functionality through the GUI? Or is this overdoing it.

Best regards,
Jethro


SCJP, SCJD
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
I don't implement in the GUI but I implement the protocol because I chose to use socket.


Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2) Almost 100%
Kah Tang
Ranch Hand

Joined: Sep 10, 2007
Posts: 58
It's indeed not necessary to implement those. Though, they must be implemented in the Data class, it's not part of the requirements for the GUI and is therefore not advised to implement those.
Jethro Borsje
Ranch Hand

Joined: Jul 22, 2008
Posts: 100
Thanks for the answers, I will not be implementing this functionality in the GUI.

However, this leaves on GUI problem with respect to the deletion and updating of records: should the GUI auto-update when one of the other clients updates a record.

This happens when client A is looking at the table of records, while client B books a record. The table of client A is then no longer contains the most recent data.

I am currently thinking about an Observer pattern where each clients start observing an Observable object which can be retrieved from the server using RMI. If the server updated a record it notifies all Observers of the Observable object that a record has changed. Once the Clients get notified they can update their view accordingly. However, I am a bid concerned that I am over complicating my code, and that this updating is not really necessary. What are your thoughts on this issue?
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
However, this leaves on GUI problem with respect to the deletion and updating of records: should the GUI auto-update when one of the other clients updates a record.


I don't implement that thing too as it is beyond my requirement. Unless your requirement says so, I don't thing implementing GUI auto-update is necessary. Remember, you will not get extra credit for the works beyond the requirement.

Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2) almost done
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: B&S: deleteRecord() & createRecords() -> GUI?