Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jethro Borsje
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic