Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About hazel1919

  • Rank
  1. On further analysis it seems the only viable places to use dependency injection is in the Core\Controller (new View) and Core\Model (new Database) as the dependent classes are not related to the instantiated classes?
  2. Hi Jaques, I want to really thank you for taking out the time to look over the code... with regard to security concerns... I have a routing system that works using predefined regular expressions to match routes, it works... what I am concerned about here is the overall architecture of my framework so to make it as clear as possible I have stripped out all of the components that I know work, such as routing. I should have made that clearer from the beginning. Regarding your points. 1 - I have strip out everything except the minimal amount of code to display something, so controllers, me
  3. Hi all, I have just put together a tentative proof of concept MVC framework proposal. After many weeks of slogging through an array of PHP MVC tutorials and courses (some of which I paid for) I have decided to strip back all the frills, bells and whistles to try and put together a core proof of concept that uses best practices. In this simplified example I am trying to test the viability of the framework itself... so there is no routing code or query string management and the controller and action are hard coded. Here is the repository: https://github.com/JethroHazelhurst/psr-4-mvc I like
  4. Thanks for your kind replies... models needing to be used across the entire application is a good point. Perhaps an improvement to the folder structure is separating the models into one usable folder like this... I will build the framework out and see if it works, I will know if I am repeating any code that I need to make adjustments. This is for my education so it cant hurt! @gizmola, thanks for the link, that is some fantastic documentation and I have been going through the tutorial today... unfortunately there are just too many black boxes which I just don't understand (eith
  5. Hi everyone, I have been working through various tutorials over the past couple of months and am currently trying understand PHP frameworks. One of the ways I am doing this is by trying to design my own very simple MVC framework from scratch. I am trying to re-factor an application (which I have already built using spaghetti procedural PHP). This application has a front end for teachers and a back-end for the administrators. I would like to separate concerns and have URL's like this http://example.com/{module}/{controller}/{method}/{param-1}/{param-2} Now the MVC framework I have cobbled t
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.