Suppose, I have two modules , Account and Billing. They can be deployed independently of each other. Both modules have their own user interfaces and they are on separate projects too . I am delivering the products independently to clients who require only billing part without account module and only account module for those who only need to work on transactions. Now, I need to combine both module and deliver the product to client but transactions must be recorded in account module while billing is done in billing module.
In billing module, I have Billing service whose implementation goes
public void save(){
//work here
//saves bill to bill repository
}
In Account module, I have Transaction service whose implementation goes
public void recordTransaction(){
//work here
}
Now while module is combined , I want Billing service to have dependency to Transaction service in account module without having to change both modules.
What is the best pattern that can fit into the above mentioned scenario?
Aucun commentaire:
Enregistrer un commentaire