I am overall confused over the use of the facade design pattern. Is facade similar to MVC. I am asking this because I used facade in a project that helped to separate the front end interface from the back end internals.
I would say that probably you are overlooking many things, MVC is a whole framework that helps you separate concerns like controllers (which handle infrastructure of web requests) and the models (which is the info that you pass to the Views) and the View (which is only interested in presenting information).
The way I think about facades, could apply to everything in which you want to provide a simpler interface of a system component whenever this needs to talk to another system component, this is to avoid complicated APIs that are too cumbersome or too complex.
In relation to facades, there is the adapter pattern, which works exaclty as the facade, trying to simplify the API from a system component, but the difference is that one of the components is not under your control, is something that you cannot modify its behavior. ASP.Net cache might be an example, you will create an ADAPTER to satisfy your requirements, and you will need to update your adapter if the ASP.Net CAche is altered dramatically.
So overall, both are patterns, but I think of MVC as somthing like Framework+Pattern, whereas FAcade is just a simple function to ease your job whenever you work with complex software components.
Hope it helps,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With