• Post Reply Bookmark Topic Watch Topic
  • New Topic

B&S Design Decision

Dhanasekar Dhakshin
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

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.

for example,

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.

I want to know how ppls handle this.

Please suggest a better solutions . . .

Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

The Data class to me isn't a singleton.
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!