문제

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