I have an application with which a user can initiate (fill out a form and click Run) a series of steps.
First step 1 must be executed and afterwards step 2. If step 2 was successful, execute step 3 otherwise execute step 4. Finally step 5 must be executed.
Each step has about 10 to 100 lines of code.
With which design pattern should I structure my code best in order to implement this logic? Is it the chain of responsibility pattern, template method pattern, or something else altogether?
Aucun commentaire:
Enregistrer un commentaire