Hello, Fellow phalcon developers. Sorry for such a beginner question. I am new to phalcon framework and try to find the best way to organize the source code structure.
The project I am working on is a large scale e-commerce site. There are many components and I am not sure what is the best way to organize the code in Phalcon MVC.
Option 1: Should I organized them in in logical group first, then within each logical group, add MVC structure?
Option2: Or Should I keep MVC structure as top, then add logical group within each MVC structure?
Sample for Option1:
App/
Controllers/
User/
Admin/
Models/
User/
Seller/
Views/
User/
Seller/
(FYI, in the most samples I've seen, I never seen anyone creating a sub-folder within controllers. I am not sure if this is because of Phalcon limitadtion)
Sample for Option2:
App/
User/
Controllers/
Models/
Views/
Admin/
Controllers/
Models/
Views/
I personally prefer option1, because sometime, the code may not have a clear boundary of which group it falls into, so I can put them in parent location or create another general directory. For option2, one of reason I don't prefere is because for developer, when he try to find a code and if the group is not very clear, then once again, it will be hard to locate.
Thanks for your feedback.