Can anyone refer me to some very basic and simplified MVC tutorial? Yes, I googled, and read a lot, also did try frameworks, but my goal here is to be able to write and understand the MVC code myself. I'm also new to OOP, so even with tuts that provide the full code I don't get to far.
If MVC philosophy is not too much code when stripped down to the extremely basic example, a bit of code would be appreciated I believe not by me only:)
Any guidance, book recommendation, or even recommendation of different system (PAC or anything else) is welcomed.
Or if no other advice, please do bash my current method of doing websites (I "invented" this myself so I'm always uncertain is it the right way to do it):
index.php is the single entry point that handles everything
1. it checks for get variable, say pageid=contact-us
2. it pulls data for the contact-us page from the database (title, meta tags, page content)
3. it checks is there a file named contact-us.php
4. it renders the html page, with database values embedded using php, like this:
<title><?php echo $title ?></title> .. .. .. <div><?php echo $content ?></div>
or if in step 3 it was determined that there is a file of such name, then the file is included instead:
<title><?php echo $title ?></title> .. .. .. <div><?php include $pageid.'.php'; ?></div>
This in case that some page needs to have it's own specific php code.
I know it's basic knowledge, which makes it even more important, as I do even some mid-sized websites, and keep doubting my base.
Thanks for reading, thanks for help :)