Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A Question on effeciency  RSS feed

Vernon Gibson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a JSP that lists items that are available for purchase. The quantity fields are named using a concatenation of the string "QTY_" and the product number (eg: QTY_03304).
The second part of this process is a JSP that is triggered by the 'Add to cart button'. This JSP receives the quantity fields along with their values and adds them to the cart table using the session id as the key, the 'QTY_nnnnn' string, and the field value.
My question is on retrieval efficiency. Is it better to store the item's description and price on the cart table, or to parse the 'QTY_nnnnnn' values and execute a call to the data bean to retrieve the product records? (i.e. when building a 'view cart' page)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!