url - routing mvc on the web -
I was wondering if someone could give me some advice on how I (and / or architecture) I can improve the 'section' of my application (I am writing in PHP5, and trying to use strict MVC). Actually, I have a generic index page for the app , And it will remove boilerplate accessories such as jquery and CSS etc. It also generates the main newbie for the entire site, but I am not sure about the best approach to linking 'main menu' item (hyperlinks) with its respective controllers. So far, I am adding the string to the URL and the 'Switch' statement has been inserted in the branch to exclude '$ GET []' for the correct controller (and see) so that it cororossoonding action. For example, if I had a basic crude system for customer data, the URL would look like 'www.example.com/index.php?page=customer&action=edit&id=4' to edit customer details . >
I worry that this is a security concern in this way, and I am not sure about the option of branch to the main 'index.php' file, once for the user with the right controller for each action. . Clicked on the link
Would it be better to use mod_rewrite to hide controller names? Or to create a system similar to ASP MVC structures, where there is a separate routing system where each URL is filtered to get the corresponding controller?
Cheers!
Answering my own question ..
I finally thought That's the routine in CodeIgniter (PHP) for what I was actually looking for. Even if you do not want to use codeigner, there is a good resource for learning a few things even if you want to create your own structure.
Comments
Post a Comment