locked
Selecting the right design pattern RRS feed

  • Question

  • Hello,

    I've a consolidated product xml that I receive by making an API call.Xml contains data for various products like P1,P2,P3,etc. I need to write a windows service in which I'll make this API call, parse the xml and then break it into three separate xmls..i.e.one for each product P1,P2,P3....etc. The business rule for parsing the xml for each of the products could be different.

    In the future,I may need to break the same input xml into new additional products P4,P5 etc.

    I can think of Strategy design pattern to address this problem so that the code is maintainable, easier to test and extensible in the future. Would this be the correct pattern to apply here please?

    Thanks.

    Saturday, September 9, 2017 7:04 AM

Answers