user204588
user204588

Reputation: 1633

Finding the design pattern

I've done a couple of integrations that are similar. In one, I was taking product data from one system's database, formatting the product data to work with another systems database and then import those products into that system. In another, I was taking users from one systems database, formatting them, and then importing into another system. There seems like there would be a design pattern for this, what is it if there is one?

Upvotes: 1

Views: 220

Answers (3)

Julio Guerra
Julio Guerra

Reputation: 5661

To me, you are talking about data transformations from one DB to another.

The Driver design pattern is always used to abstract the program from a database implementation.

Then, you have your "transformation pipe": an orientend graph of transformations. It is mostly something you could do with generic programming. Each transformation waits for an input data of type IN_T and transforms it into a possibly different output of type OUT_T.

So here could come the Visitor design pattern to visit your graph to execute the transformation; the Decorator design pattern to change properties of the graph nodes; the State design pattern to express the state of a transformation; the Listener design pattern to give an update of the transformation progress; etc.

Upvotes: 0

user519980
user519980

Reputation: 1

You can use Factory pattern in building Product list, and user list.

Upvotes: 0

vrbilgi
vrbilgi

Reputation: 5803

I can think of two design pattern for this senerio.

Adapter Pattern: If you want to have one way communiction

Reason: You have two system System1DB System2DB and There is only one way communication

          Your Adapter
Sytem1DB --------------> System2DB

Mediator Pattern: If you want to have two way communication on homogenius system

          Your Mediator
Sytem1DB <----------------> System2DB

Upvotes: 2

Related Questions