Click here to Skip to main content
16,006,707 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: How to use Design Pattern ??? Pin
Pete O'Hanlon10-Apr-07 23:04
mvePete O'Hanlon10-Apr-07 23:04 
AnswerRe: How to use Design Pattern ??? Pin
richardwest16-Apr-07 9:52
richardwest16-Apr-07 9:52 
QuestionSoftware Quality Metrics Pin
Mazdak8-Apr-07 20:20
Mazdak8-Apr-07 20:20 
AnswerRe: Software Quality Metrics Pin
Paul Conrad4-Nov-07 7:12
professionalPaul Conrad4-Nov-07 7:12 
QuestionWho can tell me the difference between Composite Pattern and Iterator Pattern? Pin
xibeifeijian6-Apr-07 22:29
xibeifeijian6-Apr-07 22:29 
AnswerRe: Who can tell me the difference between Composite Pattern and Iterator Pattern? Pin
Ray Kinsella8-Apr-07 5:37
Ray Kinsella8-Apr-07 5:37 
QuestionGot that bad feeling .... Pin
Ray Kinsella5-Apr-07 13:47
Ray Kinsella5-Apr-07 13:47 
AnswerRe: Got that bad feeling .... Pin
Colin Angus Mackay7-Apr-07 0:45
Colin Angus Mackay7-Apr-07 0:45 
Ray Kinsella wrote:
Any better ideas ?


yes, you can still chain the methods together but in the opposite direction.

In the DoSomething (by the way, that should really be Pascal Cased rather than camel Cased) with the least parameters do everything you can that only needs those parameters. Then with the DoSomething with the extra parameters call the first DoSomething and add the additional functionality that needs the extra parameter. Then for the DoSomething with the most parameters add the extra functionality that requires all parameters then call the middle DoSomething, which in turn will call the first DoSomething.

Of course, it really depends on what you are doing overall. If it is sufficiently complex it may be better to abstract some of the functionality out in to private methods and have each of the DoSomething methods call the approprate private methods. However, that may cost slighly more to maintain as you'd have to duplicate the call to the private methods in upto three places. But, if the overall code is easier to read it might be worth it.


GeneralRe: Got that bad feeling .... Pin
Ray Kinsella8-Apr-07 5:38
Ray Kinsella8-Apr-07 5:38 
GeneralRe: Got that bad feeling .... Pin
DavidNohejl10-Apr-07 0:28
DavidNohejl10-Apr-07 0:28 
GeneralRe: Got that bad feeling .... Pin
Pete O'Hanlon10-Apr-07 1:09
mvePete O'Hanlon10-Apr-07 1:09 
GeneralRe: Got that bad feeling .... Pin
DavidNohejl10-Apr-07 1:41
DavidNohejl10-Apr-07 1:41 
GeneralRe: Got that bad feeling .... Pin
Colin Angus Mackay10-Apr-07 2:29
Colin Angus Mackay10-Apr-07 2:29 
AnswerRe: Got that bad feeling .... Pin
DavidNohejl10-Apr-07 0:26
DavidNohejl10-Apr-07 0:26 
QuestionDocument templates for software development? Pin
wojti5-Apr-07 3:18
wojti5-Apr-07 3:18 
AnswerRe: Document templates for software development? Pin
Paul Conrad4-Nov-07 7:13
professionalPaul Conrad4-Nov-07 7:13 
QuestionMVC question Pin
akkram5-Apr-07 2:23
akkram5-Apr-07 2:23 
AnswerRe: MVC question Pin
Pete O'Hanlon5-Apr-07 3:39
mvePete O'Hanlon5-Apr-07 3:39 
AnswerRe: MVC question Pin
Code_Doctor16-Apr-07 17:17
Code_Doctor16-Apr-07 17:17 
QuestionMembership Provider and Permissions Pin
Tristan Rhodes4-Apr-07 1:27
Tristan Rhodes4-Apr-07 1:27 
AnswerRe: Membership Provider and Permissions Pin
Pete O'Hanlon4-Apr-07 1:59
mvePete O'Hanlon4-Apr-07 1:59 
GeneralRe: Membership Provider and Permissions Pin
Tristan Rhodes4-Apr-07 2:10
Tristan Rhodes4-Apr-07 2:10 
GeneralRe: Membership Provider and Permissions Pin
Pete O'Hanlon4-Apr-07 2:17
mvePete O'Hanlon4-Apr-07 2:17 
QuestionDeisgn issues with Digital signature solution Pin
abcxyz823-Apr-07 2:14
abcxyz823-Apr-07 2:14 
AnswerRe: Deisgn issues with Digital signature solution Pin
Code_Doctor16-Apr-07 17:24
Code_Doctor16-Apr-07 17:24 

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.