I am using Spring where my Service Implementations are injected inside the Controller classes, Will it be relevant to use the business delegate pattern here, as Service Interface and their injection is already providing a degree of decoupling, where I can modify the Service Implementation.
If yes Should that be a one to one delegate with service interface relationship or should I create common delegate for all of the services.
Example
public class MyUIController extends BaseController {
private MyService1 myService1;
private MyService2 myService2;
...
@Autowired
public MyUIController (MyService1 myService1, MyService2 myService2...) {
super();
this.myService1= myService1;
this.myService2= myService2;
}
Aucun commentaire:
Enregistrer un commentaire