> -----Original Message-----
> From: Sudheer [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 27, 2004 7:04 PM
> To: Struts Users Mailing List
> Subject: (newbie)preferred way of managing product catelog
> 
> 
> Hi,
> 
>   I am developing a JSP(2.0) shopping cart using struts(1.2)
> framework.
> 
>   I want to know which is the preferred way of managing
> a product catelog. I am using a mysql db, which has a
> category table and a product table, all products are
> categorised in a parent-child relation ship.
> 
>   Do I have to store all the products in a container in an
> application object? Or just store the category and store the 
> products(which
> fells under this category) only when the user
> select a particular category?

Depends on how much data in your catalog.  If you have a couple hundred items, 
that can get expensive to store in the application server.  If you  allow 
custom searches, it's usually easier to do that with a DB then by hand.
I typically assume that any data I'm displaying is in the thousands and so 
usually leave a bit on the DB.  I then implement pagination through the 
database (which may or may not have anything to do with pagination the viewer 
sees), and adjust the number of records in memory to optimum.  That way, if the 
catalog is samll you can configure your pagination routines to suck it into 
memory, and as the catalog grows, you don't have to worry about eating all your 
memore.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to