I am working on an application that currently sends updates to another internal system using web services.
I now have to provide updates to a number of third parties. Each has a different way of accepting updates, one provides a web service, another accepts a flat file (with their own format) upload, another wants a CSV file ftped to a specific location.
Some third parties want updates every minute another is happy with daily updates.
I will have to write specific code for each of the third parties, but I’d like to follow some good design approaches that allow me to add as many third party as necessary without changing the internal software.
What design patterns/principles should I use to achieve this?
Sounds like
Bridgedesign pattern will fit the bill for object structure. You would want to keep the client interface to be uniform for preparing the file\report and submit to third party same for all third parties (or components).The algorithm for uploading to FTP or sending message to web service can be implemented using
Strategydesign pattern. If there would need to be a change in schedule to submit the updates daily, weekly or monthly, this would require a change only inStrategy.There would be one or two more design patterns needed in implementing the complete solution, I think you will understand that once you start designing the solution.