details page and different kinds of data - HELP!!!

L

Laura K

Hi all,

Working in ASP.net VB

I am creating a website for a store which has many different kinds of items
from men's pants to shoes to camping tents.

Due to the number of different items I am having problems designing a
details page and deciding how to create datasets.

My MS SQL 2000 database is set up where all products are in a table with all
details except size and color.

Size and color are in various junction tables which differ according to the
type of items. For example men's pants have a jct table which includes
product ID, inseam and waist. I need the junction table because one model
of pants can have 30 different size combos. Women's pants sizes are in a
jct table that has product ID and size (women's pants and men's pants are
sized differently so they need different table designs). Tents are only in
the product table. They have no sizes.

This means that the details page has to do two things.

1. It has to select the correct tables to join (products and junction for a
specific item type) and create a dataset depending on the querystring that
is passed to the page.

2. It has to display a dropdown list if there is a size and no drop down if
there is not.

First question: where and how should I choose the product/jct table combo -
as a stored procedure? In the asp.net page? As if then statements?

How should I change the details page according to the options. Ex if no
size no size drop down appears.

I really really really need help. I can not get my head around this. I
just need a starting point.

If you made it this far thanks.

Laura K
 
S

Scott Allen

Hi Laura:

There is a saying in computer science that you can solve any problem
by adding another layer of indirection. For example, you might write
two seperate ASP.NET pages, one for womens pants (women.aspx) and one
for mens pants (men.aspx), but send the initial request for details to
a third page (pantsdetails.aspx).

The third page can examine the incoming request and determine if the
detail needs to be shown by women.aspx or men.aspx. All of the logic
for distinguishing between the two different requests could be made by
this third page, it could even handle other product types. It is a
layer of indirection that allows some flexibility in the application.
This is a stripped down version of what is known as the front
controller pattern [1]. May not be the best fit for your application,
but it is workable.


[1]
http://msdn.microsoft.com/library/d...s/dnpatterns/html/ImpFrontControllerInASP.asp
 
L

Laura K

Thanks for your reply. I went to the link you provided which led me to more
links with different concepts all helpful.

I had considered different URLs for different combos of items based on the
jct table that they pulled from but in my head I guess I figured that I
should be able to do it from one page with different controls. I spent a
day dealing with that concepts to no avail so I will stop trying to over do
it and go with a redirection based on item type.

Thanks again.

Laura K

Scott Allen said:
Hi Laura:

There is a saying in computer science that you can solve any problem
by adding another layer of indirection. For example, you might write
two seperate ASP.NET pages, one for womens pants (women.aspx) and one
for mens pants (men.aspx), but send the initial request for details to
a third page (pantsdetails.aspx).

The third page can examine the incoming request and determine if the
detail needs to be shown by women.aspx or men.aspx. All of the logic
for distinguishing between the two different requests could be made by
this third page, it could even handle other product types. It is a
layer of indirection that allows some flexibility in the application.
This is a stripped down version of what is known as the front
controller pattern [1]. May not be the best fit for your application,
but it is workable.


[1]
http://msdn.microsoft.com/library/d...s/dnpatterns/html/ImpFrontControllerInASP.asp

--
Scott
http://www.OdeToCode.com/blogs/scott/

Hi all,

Working in ASP.net VB

I am creating a website for a store which has many different kinds of
items
from men's pants to shoes to camping tents.

Due to the number of different items I am having problems designing a
details page and deciding how to create datasets.

My MS SQL 2000 database is set up where all products are in a table with
all
details except size and color.

Size and color are in various junction tables which differ according to
the
type of items. For example men's pants have a jct table which includes
product ID, inseam and waist. I need the junction table because one model
of pants can have 30 different size combos. Women's pants sizes are in a
jct table that has product ID and size (women's pants and men's pants are
sized differently so they need different table designs). Tents are only
in
the product table. They have no sizes.

This means that the details page has to do two things.

1. It has to select the correct tables to join (products and junction for
a
specific item type) and create a dataset depending on the querystring that
is passed to the page.

2. It has to display a dropdown list if there is a size and no drop down
if
there is not.

First question: where and how should I choose the product/jct table
combo -
as a stored procedure? In the asp.net page? As if then statements?

How should I change the details page according to the options. Ex if no
size no size drop down appears.

I really really really need help. I can not get my head around this. I
just need a starting point.

If you made it this far thanks.

Laura K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top