Click here to Skip to main content
15,878,814 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: What Languages/Frameworks are Modern Commercial Windows Applications Made With? Pin
Peter Moore - Chicago20-Nov-22 5:40
Peter Moore - Chicago20-Nov-22 5:40 
AnswerRe: What Languages/Frameworks are Modern Commercial Windows Applications Made With? Pin
Mycroft Holmes20-Nov-22 13:23
professionalMycroft Holmes20-Nov-22 13:23 
QuestionRIBs Architecture Pin
Member 1237212418-Aug-22 4:26
Member 1237212418-Aug-22 4:26 
Questionorganizing everything visible on screen Pin
Calin Negru6-Aug-22 0:14
Calin Negru6-Aug-22 0:14 
AnswerRe: organizing everything visible on screen Pin
Mircea Neacsu6-Aug-22 0:47
Mircea Neacsu6-Aug-22 0:47 
AnswerRe: organizing everything visible on screen Pin
Gerry Schmitz6-Aug-22 7:04
mveGerry Schmitz6-Aug-22 7:04 
GeneralRe: organizing everything visible on screen Pin
Calin Negru6-Aug-22 10:42
Calin Negru6-Aug-22 10:42 
GeneralRe: organizing everything visible on screen Pin
Greg Utas6-Aug-22 12:23
professionalGreg Utas6-Aug-22 12:23 
The problem with using switch statements to control behavior is this: when you want to add a new type of block, you have to hunt down every switch statement that requires a new case label. That's why using virtual methods is preferable. You just invoke the virtual method, and each different type of block provides the code that would otherwise have gone with a case label.

It can sometimes be hard to define the interface for a virtual method. For those situations, you can invoke a virtual type method that returns a block's type, which you can then use in a switch statement after all. But if you find yourself doing this often, it can mean that your methods are too big and should be broken into smaller pieces that would make it easier to delegate most of what they do to virtual methods instead.

It's annoying to have to define a virtual method and override it in all the necessary places. The "code it now!" approach is to just write a switch statement. But in a large program, the time needed to add virtual methods will be more than recovered because the resulting code will be easier to maintain and evolve.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.

GeneralRe: organizing everything visible on screen Pin
Calin Negru6-Aug-22 23:21
Calin Negru6-Aug-22 23:21 
GeneralRe: organizing everything visible on screen Pin
Gerry Schmitz7-Aug-22 6:54
mveGerry Schmitz7-Aug-22 6:54 
GeneralRe: organizing everything visible on screen Pin
Greg Utas7-Aug-22 7:11
professionalGreg Utas7-Aug-22 7:11 
GeneralRe: organizing everything visible on screen Pin
Calin Negru7-Aug-22 18:18
Calin Negru7-Aug-22 18:18 
GeneralRe: organizing everything visible on screen Pin
Gerry Schmitz7-Aug-22 7:06
mveGerry Schmitz7-Aug-22 7:06 
GeneralRe: organizing everything visible on screen Pin
Calin Negru7-Aug-22 20:07
Calin Negru7-Aug-22 20:07 
GeneralRe: organizing everything visible on screen Pin
Greg Utas8-Aug-22 0:47
professionalGreg Utas8-Aug-22 0:47 
GeneralRe: organizing everything visible on screen Pin
Gerry Schmitz8-Aug-22 7:23
mveGerry Schmitz8-Aug-22 7:23 
GeneralRe: organizing everything visible on screen Pin
trønderen8-Aug-22 8:28
trønderen8-Aug-22 8:28 
GeneralRe: organizing everything visible on screen Pin
trønderen8-Aug-22 8:10
trønderen8-Aug-22 8:10 
GeneralRe: organizing everything visible on screen Pin
Mohsin Ali Shah 202222-Aug-22 3:48
Mohsin Ali Shah 202222-Aug-22 3:48 
AnswerRe: organizing everything visible on screen Pin
Member 150787168-Aug-22 16:17
Member 150787168-Aug-22 16:17 
QuestionSecuring oAuth Client Id and Secret Pin
Kevin Marois27-Jun-22 7:29
professionalKevin Marois27-Jun-22 7:29 
AnswerRe: Securing oAuth Client Id and Secret Pin
jschell23-Oct-22 11:17
jschell23-Oct-22 11:17 
Questioncode organisation Pin
Calin Negru31-Jan-22 7:36
Calin Negru31-Jan-22 7:36 
AnswerRe: code organisation Pin
Bohdan Stupak4-Feb-22 4:05
professionalBohdan Stupak4-Feb-22 4:05 
AnswerRe: code organisation Pin
Richard MacCutchan4-Feb-22 4:56
mveRichard MacCutchan4-Feb-22 4:56 

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.