Norse
Norse

Reputation: 5757

E-Commerce Principles - Show Inventory Dynamically or with static pages?

I am curious regarding this. Is it a better practice to have static html pages displaying the current inventory? This would obviously entail having to manually update these pages when items go in/out of stock, adding new items, etc.

Or is it a more common practice to use dynamic pages to load your store's inventory directly from a database?

Upvotes: 0

Views: 212

Answers (1)

RyanJMcGowan
RyanJMcGowan

Reputation: 1515

If your products never change, and you only have a few products, than you can probably get by without using a database. But if you need to update new products every so often, or if you want to add features like filtering, search, sorting, etc., than having a database is the way to go. It also has the added benefit of organizing your product line in a rational way. If you have more than a dozen products though, you'll want to use a database so that you can code one view that populates according to the product selected. Otherwise, if you want to change the layout, you'll have to do with each product.

Upvotes: 1

Related Questions