File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A Question on effeciency

 
Vernon Gibson
Ranch Hand
Posts: 35
  • 0
  • 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)
Thanks,
Vernon
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic