I am working on one migration engine to migrate data from older system to newer system. it is divided into 3 steps.
- first getting the data from older tables.
- prepare the request body to insert into new tables via APIs
- post processing steps.
Which design pattern to use here?
I was thinking of using builder pattern
CodePudding user response:
Here you already have pre-defined and definite steps to perform. In this case template design pattern
works well.
Sequence of calling steps are fixed and Responsibility of each steps can be seggregated into separate classes and finally can be linked on template management class.
Refer this link - https://refactoring.guru/design-patterns/template-method
CodePudding user response:
I think you might want to go for a Pipe-Filter Pattern here as an overall design. What you describe is pretty much described here.