I've recently been embarking on a mission to completely eliminate PHP code from my view files, here is why.
What are Views?
Often when you're building a website or application, if you build from scratch you end up doing a lot of the same kinds of things, like turning requests into specific pages, handling form validation, caching, etc.
A long while ago (in the 70's according to http://c2.com/cgi/wiki?ModelViewControllerHistory)…
At the start of this year (2015) I embarked upon a small personal challenge which I'd set myself: could I build a PHP MVC framework in a week? I had a fairly quiet schedule at the time, and I believed it was possible, so I began.
Now, I have had quite a few years experience using various frameworks, so I had a rough idea about how I wanted to go about structuring my own:
Basic request router…