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

有帮助吗?

解决方案

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

其他提示

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**
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top