Subject: Design Strategy
Posted By: zoltac007 Post Date: 10/3/2006 9:05:08 AM
I am having ‘architectural problems’.  My requirement seems to be quite simple.  I have a database table ZipInfo with five involved fields StateAbbreviation, CityName, ZipCode, ZipID (pkey), and ZipPopulation.

 

I need a web page that allows a client to:

 

1)      select a State (I am using standard dropdown list and passing parameter to SQL database Select statement)

2)      After client selects state and clicks to execute I want to display all zip codes in the selected state.  Each row will contain:  ZipCode, CityName, ZipPopulation and a check box where the user can add it to his collection.

3)      As client selects one or more rows using the checkboxes a textbox monitors the total ZipPopulation of all ZipCodes that have been checked by the client adding to the total when another row’s checkbox is set true.  

4)      When the client is finished checking checkboxes the textbox will show the total population for all ZipCodes selected.  The client will click to finalize their selection and I then need to pass all ZipID’s for the ZipCodes selected by the client to a ClientInfo table in the same database (ClientInfo.SelectedZips where ClientID = active client).

 

My questions are what is an appropriate strategy for this problem?  Can and should I use existing controls that I find in Visual Studio 2005 or will I need to develop my own classes and methods?  I can easily pull the data needed using GridView but am having trouble adding the checkboxes.  I do not know if I should be loading up a custom array.  I need some design strategy guidance that will allow me to create and monitor the checkboxes as the client selects them and to simultaneously display the total mailing population (ZipPopulation)  represented by their selection and possible de-selections and then pass the final ZipID’s back to a field in the ClientInfo table.  

 

I have done this in ASP.Net but it was not pretty.  Rather than just forcing a solution I want to code an appropriate and reasonably efficient Web 2.0 solution.  I come from an ASP.Net background and the new 2.0 tools are somewhat overwhelming.  I am using C# for the code behind.

 

Thank you
Reply By: peace95 Reply Date: 10/3/2006 10:59:09 AM
Zoltac007:

I have a couple of questions that crossed my after reading your topic:
1-Having some experience with zipcode info (especially from Census Bureau), in your ZipInfo table are there multiple zip codes per city and/or multiple cities per zipcode?;
2-Is there a seperate client table with just clientID and clientName?.  Are we talking 3-DB Table, zipInfo, State, and ClientZipInfo, or 4 DB tables?;
3-When the client builds the clientinfo table, is client adding one entry per zipcode? If so, what happens if client adds an existing zip, which creates a duplicate entry?
4- Is the objective here is for the client to know the total mail distribution in his/her assigned area, being state?

Outside of the above questions, I really dont envisioned the need to establish a seperate class. However I am just looking at the design for now.
Reply By: dparsons Reply Date: 10/3/2006 11:56:17 AM
I have to ask the question of usability here because there are over 42,500 UNIQUE zip codes in the united states so that is an average of about 850 rows of data per state.  

Is it logical to think that a user will wade through that many records just to select X number of check boxes?

Would it make more sense to make a sphereical geometery calculation based off of X origin zip code and return only those zip codes that fall within X miles of the orign?

--Stole this from a moderator

I will only tell you how to do it, not do it for you.  
Unless, of course, you want to hire me to do work for you.

Go to topic 50537

Return to index page 158
Return to index page 157
Return to index page 156
Return to index page 155
Return to index page 154
Return to index page 153
Return to index page 152
Return to index page 151
Return to index page 150
Return to index page 149