• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

B&S Design Decision

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 . . .

Thanks,
Dhana
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
mooooooo ..... tiny ad ....
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic