Click here to Skip to main content
15,920,110 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionDocumenting Design Pin
K. Shaffer13-Jan-09 14:13
K. Shaffer13-Jan-09 14:13 
AnswerRe: Documenting Design Pin
Pete O'Hanlon13-Jan-09 22:39
mvePete O'Hanlon13-Jan-09 22:39 
AnswerRe: Documenting Design Pin
CodingYoshi16-Jan-09 3:31
CodingYoshi16-Jan-09 3:31 
GeneralRe: Documenting Design Pin
K. Shaffer17-Jan-09 6:53
K. Shaffer17-Jan-09 6:53 
GeneralRe: Documenting Design Pin
Karthik Jegadeesan19-Jan-09 21:44
professionalKarthik Jegadeesan19-Jan-09 21:44 
GeneralRe: Documenting Design Pin
K. Shaffer22-Jan-09 12:50
K. Shaffer22-Jan-09 12:50 
GeneralRe: Documenting Design Pin
K. Shaffer22-Jan-09 13:00
K. Shaffer22-Jan-09 13:00 
QuestionDatabase Queries Pin
CodingYoshi6-Jan-09 17:20
CodingYoshi6-Jan-09 17:20 
Lets say I have this hypothetical database (the one I am dealing with is much bigger as you probably can imagine or guess):

Customers
---------
ID
Name
Address
ShippingAddress
OrderID

Orders
------
OrderID
Date

LineItems
---------
ItemID,OrderID
Quantity

Items
-----
ItemID
Description

I have many applications which need customer's ID, Name, and Address, Items' ID, Description. Is it better to create a library which can load the customer ID, Name, and Address and same for the Items by invoking a stored procedure or is it a better design to have a stored procedure which will get whatever I need for the specific application. For example, one application might need customer's id, name, and the number of orders and it might need what items we carry. However, another application might need all the columns of customer and Items. Because too many applications need customers' ID, Name and Adddress, should I create a static class class with static method which invokes a stored procedure and gets the information and if I need more information in other application I simply get those as per need basis, or should I just skip creating a static class library and get everything when I need them by invoking some stored procedure which returns all I need.

If I create a library, the advantage is I can use it in many applications and get the extra columns if I need to (but at least a few apps will not need the extra columns so simply calling the static methods will do the job). However, if I need other columns then I have to get those separately. If I do not create a library, I do not have the advantage of code reuse but I can get whatever fields I need and load them as need for the application all in one shot. I am wondering which solution is more advantageous over the other? Or, is there a better way?

Thanks,
AnswerRe: Database Queries Pin
Wendelius7-Jan-09 2:29
mentorWendelius7-Jan-09 2:29 
GeneralRe: Database Queries Pin
CodingYoshi7-Jan-09 8:49
CodingYoshi7-Jan-09 8:49 
GeneralRe: Database Queries Pin
Wendelius7-Jan-09 9:16
mentorWendelius7-Jan-09 9:16 
GeneralRe: Database Queries Pin
Jon Rista7-Jan-09 12:20
Jon Rista7-Jan-09 12:20 
GeneralRe: Database Queries Pin
Wendelius8-Jan-09 2:47
mentorWendelius8-Jan-09 2:47 
GeneralRe: Database Queries [modified] Pin
Jon Rista8-Jan-09 4:55
Jon Rista8-Jan-09 4:55 
GeneralRe: Database Queries Pin
Wendelius8-Jan-09 5:25
mentorWendelius8-Jan-09 5:25 
GeneralRe: Database Queries Pin
Jon Rista8-Jan-09 10:56
Jon Rista8-Jan-09 10:56 
GeneralRe: Database Queries Pin
Mark Churchill7-Jan-09 13:53
Mark Churchill7-Jan-09 13:53 
QuestionSoftware development Pin
systemexpertise1-Jan-09 18:26
systemexpertise1-Jan-09 18:26 
AnswerRe: Software development Pin
Cosmic Egg10-Jan-09 3:29
Cosmic Egg10-Jan-09 3:29 
QuestionStylesheet in VS2008 Pin
sarang_k30-Dec-08 19:01
sarang_k30-Dec-08 19:01 
AnswerRe: Stylesheet in VS2008 Pin
CodingYoshi4-Jan-09 15:45
CodingYoshi4-Jan-09 15:45 
QuestionException Hierarchy Pin
CodingYoshi29-Dec-08 11:27
CodingYoshi29-Dec-08 11:27 
GeneralRe: Exception Hierarchy Pin
Luc Pattyn29-Dec-08 15:12
sitebuilderLuc Pattyn29-Dec-08 15:12 
GeneralRe: Exception Hierarchy Pin
CodingYoshi30-Dec-08 3:18
CodingYoshi30-Dec-08 3:18 
AnswerRe: Exception Hierarchy Pin
Jon Rista6-Jan-09 8:48
Jon Rista6-Jan-09 8:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.