Im in Design phase of my B&S assignment. I have some couple of Questions regarding design.
1. I made my Data.java as singleton. Is it correct?
2. In my gui i used command design pattern for event handling. Is it right approach for this assignment.
3. For remote call i plan to use Transfer Object design pattern. I feel it reduce network calls from client.
Booking a record i'll send a record no and customer id as a single transfer obj to server. server method update the particular record with customer id and it return all the remaining unbooked records as a single transfer obj.
For booking I send the entire record, and write the entire record. Much easier that way to expand the application in the future to modify other records as well (and keeps the database engine flexible, rather than being fixed to update a single column only).
The update method returns no records (at least in my version of the assignments). Instead after an update (whether failed or successful) I refresh the currently loaded recordset from the database by applying the last search criteria again. This will get the updated record from the database, as well as any others updated elsewhere.