I am writing a program that reads data from Model A into another Model B, and vice versa. For example, let's say model A contains class Cat, and model B contains class Kitty. Cat is roughly equivalent to Kitty, but there is some translation required. My code will need to do that translation.
A caller of my code should be able to invoke something like, mycode.push(cat), or Cat cat = mycode.pull();
What design patterns are recommended for this scenario?
Aucun commentaire:
Enregistrer un commentaire