ASP.NET 1.x and 2.0 Application DesignApplication design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
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.
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.