An application can be run as normal UI but also on command line. It does the same thing both ways but there a slight variations (for example suppress user feedback/message-boxes in command line execution).
Would you recommend to use a design pattern for this for better implementation or just use a variable to track which mode is it running in and act accordingly?
In case of design pattern, which one would best fit here, perhaps state? But how would it share bulk of the code which is common in the cases.
Aucun commentaire:
Enregistrer un commentaire