At the end of a flow of operations, there is a printing module that gathers data from the various sources involved (Customer, Order Header, Order Content, User, Payment, ...) to build a summary receipt or report printout. What should be the appropriate pattern in order to pass data to this module ?
In the existing code, data are passed such as :
paymentInfo1 = ...;
paymentInfo2 = ...;
CustomerInfo1 = ...;
...
The idea is to gather the various object in one entity. I have seen the Composite Pattern, the Facade and the Module Pattern. What pattern is the best adapted ?
Aucun commentaire:
Enregistrer un commentaire