Click here to Skip to main content
15,881,803 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Software architecture pattern Pin
Greg Utas10-Jun-21 14:22
professionalGreg Utas10-Jun-21 14:22 
GeneralRe: Software architecture pattern Pin
Tabah Baridule11-Jun-21 19:08
Tabah Baridule11-Jun-21 19:08 
GeneralRe: Software architecture pattern Pin
Greg Utas12-Jun-21 0:12
professionalGreg Utas12-Jun-21 0:12 
AnswerRe: Software architecture pattern Pin
Bohdan Stupak30-Jul-21 3:36
professionalBohdan Stupak30-Jul-21 3:36 
QuestionIs if-then-else now considered to be as obsolete as goto? Pin
swampwiz27-May-21 18:28
swampwiz27-May-21 18:28 
AnswerRe: Is if-then-else now considered to be as obsolete as goto? Pin
Gerry Schmitz27-May-21 19:07
mveGerry Schmitz27-May-21 19:07 
AnswerRe: Is if-then-else now considered to be as obsolete as goto? Pin
Richard MacCutchan27-May-21 21:30
mveRichard MacCutchan27-May-21 21:30 
AnswerRe: Is if-then-else now considered to be as obsolete as goto? Pin
harold aptroot28-May-21 1:08
harold aptroot28-May-21 1:08 
Poorly considered, but it fits well within the current software engineering zeitgeist, so it makes sense that it would get written. That's the fancy way to say: "it's a fad, don't worry about it". And stop reading Uncle Bob.
  • "it's not flexible", not if you consider adding an extra case to be a Big Deal, but the alternative is adding an entire new class.
  • Even if you are of the opinion that creating new classes is somehow easier than creating new cases, then spend a little time thinking about what would happen when the function signature of that virtual function is changed, or if something about the API used by the subclasses to implement themselves changes. This has the annoying property that the fix you're about to write is highly non-local, you'd have to "hunt down" all the places that need to change - in the best case they correspond to compile errors.
  • If a requirement is broken into N cases, but the code is spread out non-locally over N classes, your code does not look like the requirement which makes it harder to check whether it matches.
  • "it's not SOLID", maybe, but SOLID is subjective and overrated.
  • "horrific", let's not even talk about it.
  • The presented "better way" presupposes that we have a convenient instance of the "class that represents a particular reason". How did we get that? Chances are that there's a switch hiding in a factory pattern or something. Moving the problem. And if there is some pattern such as new AddressChanged().Update(), how about we don't wrap it in a class and just call a method that does that.
  • Article forgets to point out that in the first place the only domain that was considered is the business logic domain. Even if it makes sense there (which I don't agree with either), it won't make sense anywhere else. There's no way Math.Min would have its if replaced by polymorphism.

AnswerRe: Is if-then-else now considered to be as obsolete as goto? Pin
jschell7-Jul-21 6:57
jschell7-Jul-21 6:57 
GeneralWhat about deprecated keywords ? Pin
User 140765529-Jul-21 3:00
User 140765529-Jul-21 3:00 
GeneralRe: What about deprecated keywords ? Pin
jschell17-Jul-21 9:31
jschell17-Jul-21 9:31 
AnswerRe: Is if-then-else now considered to be as obsolete as goto? Pin
Bohdan Stupak29-Jul-21 6:25
professionalBohdan Stupak29-Jul-21 6:25 
QuestionIn OO, How to handle the object parameter of a method Pin
codecs12-Apr-21 4:43
codecs12-Apr-21 4:43 
AnswerRe: In OO, How to handle the object parameter of a method Pin
Richard MacCutchan2-Apr-21 5:30
mveRichard MacCutchan2-Apr-21 5:30 
AnswerRe: In OO, How to handle the object parameter of a method Pin
Gerry Schmitz2-Apr-21 6:17
mveGerry Schmitz2-Apr-21 6:17 
AnswerRe: In OO, How to handle the object parameter of a method Pin
Dave Kreskowiak2-Apr-21 6:49
mveDave Kreskowiak2-Apr-21 6:49 
GeneralRe: In OO, How to handle the object parameter of a method Pin
Eddy Vluggen2-Apr-21 11:53
professionalEddy Vluggen2-Apr-21 11:53 
AnswerRe: In OO, How to handle the object parameter of a method Pin
codecs12-Apr-21 17:50
codecs12-Apr-21 17:50 
GeneralRe: In OO, How to handle the object parameter of a method Pin
Richard MacCutchan2-Apr-21 21:31
mveRichard MacCutchan2-Apr-21 21:31 
GeneralRe: In OO, How to handle the object parameter of a method Pin
codecs13-Apr-21 16:58
codecs13-Apr-21 16:58 
GeneralRe: In OO, How to handle the object parameter of a method Pin
jschell9-Apr-21 15:10
jschell9-Apr-21 15:10 
GeneralRe: In OO, How to handle the object parameter of a method Pin
Rob Grainger6-Jul-21 11:09
Rob Grainger6-Jul-21 11:09 
AnswerRe: In OO, How to handle the object parameter of a method Pin
Bohdan Stupak6-Apr-21 22:20
professionalBohdan Stupak6-Apr-21 22:20 
GeneralRe: In OO, How to handle the object parameter of a method Pin
Rob Grainger6-Jul-21 11:11
Rob Grainger6-Jul-21 11:11 
GeneralRe: In OO, How to handle the object parameter of a method Pin
Bohdan Stupak24-Jul-21 23:40
professionalBohdan Stupak24-Jul-21 23:40 

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.