Hello forums!!
I had some queries related to MVC pattern.
I used to perform the uri action as:
http://mysite.com/controller/method/params by default, I have used router tweaking for other than default routing.
I would like to hear your views about backend development in MVC pattern.
I had found in cakePHP, action_admin pattern in the same controller file(for both frontend and backend) .
and i dont know what goes in the rest framework.
I would like to know which method is more suitable and flexible for backend development
1> using same controller file for both backend and frontend apps
2> using different mvc folders for backend
3> using different controller for backend and frontend but with same model part
4> else
Please jott down your valueable views/suggestions.
Thanks in advance for the help.
backend in MVC pattern ??
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: backend in MVC pattern ??
Either 1 or 2 are ok alternatives.
Here you are granting access within the controller for fine grained Access Control.PHPycho wrote:1> using same controller file for both backend and frontend apps
This sounds like you are granting access for an entire module.PHPycho wrote:2> using different mvc folders for backend
You should do this anyway. Creating Models is one of the best things you can do in my opinion. Reusing them is important. Access Control can be done outside them, or if it needs to be done internally then abstract it to make sense in the context of the Domain Model.PHPycho wrote:3> using different controller for backend and frontend but with same model part
(#10850)