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

Design and Architecture

 
AnswerRe: DRY Pin
RobCroll15-Apr-11 18:55
RobCroll15-Apr-11 18:55 
GeneralRe: DRY Pin
Member 448708315-Apr-11 22:52
Member 448708315-Apr-11 22:52 
AnswerRe: DRY Pin
GParkings2-Sep-11 2:17
GParkings2-Sep-11 2:17 
QuestionHow do you specify states? State Pattern, Enums or ...? Pin
Keld Ølykke11-Apr-11 8:49
Keld Ølykke11-Apr-11 8:49 
AnswerRe: How do you specify states? State Pattern, Enums or ...? Pin
RobCroll15-Apr-11 19:04
RobCroll15-Apr-11 19:04 
GeneralRe: How do you specify states? State Pattern, Enums or ...? Pin
Keld Ølykke24-May-11 2:28
Keld Ølykke24-May-11 2:28 
QuestionSetup global settings with abstract class and reflection to avoid xml configuration file Pin
Kannan Ar25-Mar-11 18:33
professionalKannan Ar25-Mar-11 18:33 
AnswerRe: Setup global settings with abstract class and reflection to avoid xml configuration file Pin
Keld Ølykke4-Apr-11 12:17
Keld Ølykke4-Apr-11 12:17 
Hi Kannan,

Your inheritance approach seems fine.


I have the following things that you can ponder about:

1) Isn't the user's call to a setter a little backwards?

Another approach is just to require a getter from the user's concrete class e.g.

public abstract class LibSetting
{
     public abstract int MaxCount { get; }
}


2) Furthermore, you could supply the user with good default settings e.g.

public abstract class LibSetting
{
     /// <summary>
     /// Default set to 100.
     /// <para/>
     /// Don't call base when you override this.
     /// <summary/>
     public virtual int MaxCount 
     { 
         get { return 100; }
     }
}


Hope it makes sense...

Regards, Keld Ølykke
QuestionGUI design for Harware configuration Pin
Praveen Raghuvanshi15-Mar-11 8:57
professionalPraveen Raghuvanshi15-Mar-11 8:57 
QuestionChat Feature Pin
Civic068-Mar-11 7:38
Civic068-Mar-11 7:38 
AnswerRe: Chat Feature Pin
grmihel28-Mar-11 22:14
grmihel28-Mar-11 22:14 
AnswerRe: Chat Feature Pin
Richard MacCutchan8-Mar-11 23:28
mveRichard MacCutchan8-Mar-11 23:28 
QuestionGRASP: Controller architecture, correct and wrong. Pin
grmihel28-Mar-11 3:42
grmihel28-Mar-11 3:42 
AnswerRe: GRASP: Controller architecture, correct and wrong. Pin
Piccadilly Yum Yum8-Mar-11 5:25
Piccadilly Yum Yum8-Mar-11 5:25 
GeneralRe: GRASP: Controller architecture, correct and wrong. Pin
grmihel28-Mar-11 22:12
grmihel28-Mar-11 22:12 
GeneralRe: GRASP: Controller architecture, correct and wrong. Pin
Piccadilly Yum Yum8-Mar-11 22:57
Piccadilly Yum Yum8-Mar-11 22:57 
QuestionDatabase alerts [modified] Pin
gbovee7-Mar-11 11:25
gbovee7-Mar-11 11:25 
AnswerRe: Database alerts Pin
Eddy Vluggen8-Mar-11 2:05
professionalEddy Vluggen8-Mar-11 2:05 
QuestionI dont find anything for my Business Logic Layer !! Is it wrong to let my Presentation Layer talking to Data Access Layer ? [modified] Pin
Nadia Monalisa27-Feb-11 14:59
Nadia Monalisa27-Feb-11 14:59 
AnswerRe: I dont find anything for my Business Logic Layer !! Is it wrong to let my Presentation Layer talking to Data Access Layer ? Pin
Pete O'Hanlon27-Feb-11 20:40
mvePete O'Hanlon27-Feb-11 20:40 
GeneralRe: I dont find anything for my Business Logic Layer !! Is it wrong to let my Presentation Layer talking to Data Access Layer ? Pin
Nadia Monalisa27-Feb-11 21:24
Nadia Monalisa27-Feb-11 21:24 
GeneralRe: I dont find anything for my Business Logic Layer !! Is it wrong to let my Presentation Layer talking to Data Access Layer ? Pin
Pete O'Hanlon27-Feb-11 22:21
mvePete O'Hanlon27-Feb-11 22:21 
GeneralRe: I dont find anything for my Business Logic Layer !! Is it wrong to let my Presentation Layer talking to Data Access Layer ? Pin
Nadia Monalisa27-Feb-11 23:15
Nadia Monalisa27-Feb-11 23:15 
AnswerRe: I dont find anything for my Business Logic Layer !! Is it wrong to let my Presentation Layer talking to Data Access Layer ? Pin
Eddy Vluggen27-Feb-11 22:14
professionalEddy Vluggen27-Feb-11 22:14 
GeneralRe: I dont find anything for my Business Logic Layer !! Is it wrong to let my Presentation Layer talking to Data Access Layer ? Pin
Nadia Monalisa27-Feb-11 23:10
Nadia Monalisa27-Feb-11 23:10 

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.