Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Should I pass the record No. to GUI client?  RSS feed

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my project, when user book a contractor, should I find the record according to all the fields or the recNo in database for updating ?
I can use the findByCriteria function.
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Long,

Originally posted by long lingyu:
In my project, when user book a contractor, should I find the record according to all the fields or the recNo in database for updating ?
I can use the findByCriteria function.


It depends on other design factors. For example if you are using locking from client side, there is no need to find the record with all the fields. You can just send the record number and book the record. On the other hand, if you are not using client side locking, then it is better to send the record along with the record number, find the record, see if the record has'nt modified meanwhile and if not book it. If modified, you can throw an exception if you want...again it depends on your design.
Hope it helps.
 
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Satish.
I used server side locking and passed my whole record, including record number, to client side. I then also passed record back to server when booking so that a check could be made whether it has been modified by somebody else.
J
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!