johnsmith153 Posted July 16, 2010 Share Posted July 16, 2010 I am creating a new site and want to ensure it is done properly using MVC architecture / my own framework. I don't want to use a PHP framework, I want to do it myself. The site allows uploading and viewing of photos and videos. Should I? (option 1) Have 3 access points: add.php (addding photos / videos) view.php (viewing photos / videos) admin.php (all admin stuff) Each of the above 3 are controller pages, using class autoload to load relevant classes and then displaying one of the following pages as the content: (these 2 only for add.php) addphotos.php addvideos.php (only for view.php) viewphotos.php viewvideos.php (admin.php) admindelete.php adminchangepassword.php etc. (all called from the controller page) (option 2) index.php is the only access point which decides which controller code (using ?page= etc.) to access and the rest is similar to (1) What is the best method and do I have the MVC architecture thing understood? Most places tell you to do (2) but I just prefer (1) (there are only 3 access pages) Quote Link to comment https://forums.phpfreaks.com/topic/207904-my-own-mvc-framework/ Share on other sites More sharing options...
trq Posted July 16, 2010 Share Posted July 16, 2010 Most MVC implementations Ive seen in PHP have one access point (the front controller) which will then hand over responsibility to individual action controllers. Quote Link to comment https://forums.phpfreaks.com/topic/207904-my-own-mvc-framework/#findComment-1086834 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.