jeudi 26 avril 2018

Using Facade Like a wrapper

I usually see some people used facade like this.

public class FooFacade {
   Foo foo;

   public boolean isFunny(param1, param2) {
       IsFunnyInput isFunnyInput = new IsFunnyInput(param1, param2);
       return foo.isFunny(isFunnyInput);
   }
}

Is this a right approach? In my opinion, it is just adding one more class to the package. When you can also directly use Foo to do the same.

Aucun commentaire:

Enregistrer un commentaire