Click here to Skip to main content
15,919,121 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionRe: Where have system planning software to download, free to try (or free) Pin
David624-May-07 23:41
David624-May-07 23:41 
AnswerRe: Where have system planning software to download, free to try (or free) Pin
Moak25-May-07 14:08
Moak25-May-07 14:08 
GeneralRe: Where have system planning software to download, free to try (or free) Pin
Senthil Kumar. V12-Jun-07 2:22
Senthil Kumar. V12-Jun-07 2:22 
QuestionDesign question for fast applications Pin
hansipet22-May-07 22:09
hansipet22-May-07 22:09 
AnswerRe: Design question for fast applications Pin
Adam Crawford22-May-07 23:11
Adam Crawford22-May-07 23:11 
GeneralRe: Design question for fast applications Pin
hansipet23-May-07 0:08
hansipet23-May-07 0:08 
AnswerRe: Design question for fast applications Pin
led mike23-May-07 8:36
led mike23-May-07 8:36 
QuestionUsing Exceptions and Ensuring Invariants Pin
Leslie Sanford22-May-07 10:14
Leslie Sanford22-May-07 10:14 
I think it's important that if a method throws an exception, the object from which the exception is thrown is left in a consistent state, that is its invariants are left intact.

This can be challenging, though. Consider a method that sets a value:

public void SetValue(int value)
{
    // Range checking omitted...
 
    this.value = value;
 
    // Do some operation based on the new value that could 
    // possibly throw an exception.
 
    // If an exception is thrown, we need to revert 'value'
    // back to its previous value.
}


My current approach to this is to postpone updating an object's values until an operation has completed successfully. This means possibly caching temp values as you perform a series of operations, each of which may throw an exception. Once everything has completed, we can update the object's values. So instead of the above with the assignment to 'value' taking place at the beginning method, we move it down to the bottom.

Thoughts?
QuestionNon-Overlapping Application Implementation Suggestions Needed Pin
stickdeoderant21-May-07 6:25
stickdeoderant21-May-07 6:25 
AnswerRe: Non-Overlapping Application Implementation Suggestions Needed Pin
Dave Kreskowiak21-May-07 16:27
mveDave Kreskowiak21-May-07 16:27 
QuestionHelp Software Business System Analysis Pin
David620-May-07 5:59
David620-May-07 5:59 
AnswerRe: Help Software Business System Analysis Pin
Dave Kreskowiak21-May-07 16:22
mveDave Kreskowiak21-May-07 16:22 
GeneralRe: Help Software Business System Analysis Pin
Pete O'Hanlon22-May-07 4:16
mvePete O'Hanlon22-May-07 4:16 
Question'Factory' pattern? Pin
flyingxu15-May-07 16:12
flyingxu15-May-07 16:12 
AnswerRe: 'Factory' pattern? Pin
Pete O'Hanlon15-May-07 22:28
mvePete O'Hanlon15-May-07 22:28 
JokeRe: 'Factory' pattern? Pin
DavidNohejl16-May-07 0:32
DavidNohejl16-May-07 0:32 
AnswerRe: 'Factory' pattern? Pin
Moak16-May-07 6:07
Moak16-May-07 6:07 
AnswerRe: 'Factory' pattern? Pin
Sameerkumar Namdeo17-May-07 17:24
Sameerkumar Namdeo17-May-07 17:24 
Questionicons for navigation and buttons Pin
Hasan Jaffal15-May-07 13:12
Hasan Jaffal15-May-07 13:12 
AnswerRe: icons for navigation and buttons Pin
Joseph Guadagno16-May-07 4:17
Joseph Guadagno16-May-07 4:17 
AnswerRe: icons for navigation and buttons Pin
Hamid_RT23-May-07 0:07
Hamid_RT23-May-07 0:07 
GeneralRe: icons for navigation and buttons Pin
Hasan Jaffal23-May-07 0:10
Hasan Jaffal23-May-07 0:10 
GeneralRe: icons for navigation and buttons Pin
Hamid_RT23-May-07 1:00
Hamid_RT23-May-07 1:00 
QuestionPlugin inheritance architecture Pin
Adam Crawford15-May-07 1:47
Adam Crawford15-May-07 1:47 
AnswerRe: Plugin inheritance architecture Pin
Joseph Guadagno15-May-07 10:51
Joseph Guadagno15-May-07 10:51 

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.