Question

I have a question related to design patterns, I am developing an MVC app in php, but I dont know where will be the class facade, if I am using an mvc pattern, I think that the facade have to be in the model, but I dont know??, where to put the class facade?

**model**
DeliveryDepartment.php
DiscountDepartment.php
OrderDepartment.php
PizzaCallCenterFacade.php
**view**
**controller**

or I have tp put the facade in another folder? how do you organize the dessing pattern facade with MVC?

thanks for answering

Was it helpful?

Solution

If you're talking about Facade pattern implementation, than this class has to stay together with models, since it "facades" other model classes.

OTHER TIPS

I would create a new directory called components. thats where I stick extra classes that are not model views or controllers. Maybe call it helper if thats what it is.

**components**
facade.php 
**model**
DeliveryDepartment.php
DiscountDepartment.php
OrderDepartment.php
PizzaCallCenterFacade.php
**view**
**controller**
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top