Experienced PHP dev (procedural) and just working on learning OOP with an eye to a new job later in the year.

Done a lot of tutorials, but I wish there were some 'intermediate' tutorials now with some bigger tutorials of OOPhp like small ecom sites, admin panels etc as most focus on very small projects for beginners. If anyone knows any good ones, please let me know!

Anyways, my question is on the View part of MVC. How much, if any, PHP should i have in my view? I'll give you an easy example.

Currently working on a tutorial that makes a simple site which allows you to post comments. So on the main comment page, obviously is a list of comments. The tutor (Brad Travesey - sure he's well known here) is using a foreach in the view php page to loop through the posts... pretty standard.

But I thought the principle of the View is that a non-techie designer could take the view pages and change the HTML and not have to worry about code? Perhaps its just done in this tutorial for ease of beginners, but just wanted to check what people felt was acceptable.

I'm building a small site for myself as an OOPhp project and has a dynamic menu, but I've done that as a class and just have the menu call php in the HTML that the 'designer' can style up differently if needed.

Thanks!

    Another 2-day old Reddit thread.

      Write a Reply...