Click here to Skip to main content
15,891,905 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: BANK ACCOUNT NUMBERS Pin
Luc Pattyn4-Oct-07 8:34
sitebuilderLuc Pattyn4-Oct-07 8:34 
GeneralRe: BANK ACCOUNT NUMBERS Pin
Radegonda5-Oct-07 11:13
Radegonda5-Oct-07 11:13 
GeneralRe: BANK ACCOUNT NUMBERS Pin
Luc Pattyn5-Oct-07 11:35
sitebuilderLuc Pattyn5-Oct-07 11:35 
QuestionHandling text data retrieved from file Pin
rsaint272-Oct-07 3:30
rsaint272-Oct-07 3:30 
GeneralRe: Handling text data retrieved from file Pin
Paul Conrad27-Jan-08 7:13
professionalPaul Conrad27-Jan-08 7:13 
QuestionA basic object diagram? Pin
Wauna1-Oct-07 6:26
Wauna1-Oct-07 6:26 
AnswerRe: A basic object diagram? Pin
stavinski2-Oct-07 22:37
stavinski2-Oct-07 22:37 
GeneralRe: A basic object diagram? Pin
Wauna3-Oct-07 8:40
Wauna3-Oct-07 8:40 
Hi stavinski,
Thanks for your input. I think I understood what you suggested. I reworked my class diagram. Here is the link. I'm not 100% certain that I've got the diagram relations correct, but I think I understand what you suggested.

http://www.mxpreview.com/WindowClassDiagram2.jpg[^]

So, to handle db operations I would create a concrete object, and pass it to the constructor as a parameter. Then I could call MyWindowDB.Insert() which would roll through the parameters and perform the update. The advantage to doing this is that a database change would not require me to modify the "Window" class.
Does this seem correct? You mentioned testing, and I think I understood your logic on that. I wouldn't need to modify the database while testing validation and such.

Are there any other reasons to use this type of structure?

The CalculateCost() function would need to be in the interface. How would I keep that logic in one spot? I'm not sure if an interface can contain code like that function. I'm kind of new to this, so I apologize for the ignorance.
GeneralRe: A basic object diagram? Pin
stavinski4-Oct-07 2:58
stavinski4-Oct-07 2:58 
GeneralRe: A basic object diagram? Pin
Wauna4-Oct-07 3:36
Wauna4-Oct-07 3:36 
GeneralRe: A basic object diagram? Pin
stavinski4-Oct-07 3:43
stavinski4-Oct-07 3:43 
GeneralRe: A basic object diagram? Pin
Russell Jones5-Oct-07 3:05
Russell Jones5-Oct-07 3:05 
QuestionA doubt about 3 tire architecture. Pin
thomas_joyee30-Sep-07 19:37
thomas_joyee30-Sep-07 19:37 
AnswerRe: A doubt about 3 tire architecture. Pin
Magnus Salgo1-Oct-07 20:18
Magnus Salgo1-Oct-07 20:18 
AnswerRe: A doubt about 3 tire architecture. Pin
Brady Kelly3-Oct-07 2:43
Brady Kelly3-Oct-07 2:43 
QuestionAdvance My Design Skills to the next level Pin
Wauna30-Sep-07 4:27
Wauna30-Sep-07 4:27 
AnswerRe: Advance My Design Skills to the next level Pin
Pete O'Hanlon30-Sep-07 23:42
mvePete O'Hanlon30-Sep-07 23:42 
AnswerRe: Advance My Design Skills to the next level Pin
Spithas30-Sep-07 23:42
Spithas30-Sep-07 23:42 
AnswerRe: Advance My Design Skills to the next level Pin
User 17164921-Oct-07 4:37
professionalUser 17164921-Oct-07 4:37 
GeneralRe: Advance My Design Skills to the next level Pin
Magnus Salgo1-Oct-07 20:26
Magnus Salgo1-Oct-07 20:26 
GeneralRe: Advance My Design Skills to the next level Pin
Wauna4-Oct-07 3:39
Wauna4-Oct-07 3:39 
GeneralRe: Advance My Design Skills to the next level Pin
ekynox5-Oct-07 1:00
ekynox5-Oct-07 1:00 
QuestionRequest for help on architecture Pin
franz.huber27-Sep-07 23:15
franz.huber27-Sep-07 23:15 
AnswerRe: Request for help on architecture Pin
led mike28-Sep-07 4:50
led mike28-Sep-07 4:50 
GeneralRe: Request for help on architecture Pin
franz.huber30-Sep-07 22:50
franz.huber30-Sep-07 22:50 

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.