where does the class facade will be in my directory MVC?
-
30-06-2021 - |
質問
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**
所属していません StackOverflow