Article or book about MVC?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

onion2k wrote:It doesn't simplify anything. I really can't see the point in it. If anything it makes things more complicated and harder to develop than a simple 'old school' site that doesn't bother with a Controller and just has Model objects and View objects.
I partially agree. It does seem to complicate small projects. But when you are working on larger applications I couldn't live without it. For me the saving grace of MVC is the testability it provides, if it is designed specifically to allow that, i.e. not Zend's implementation, this makes it worth doing, even for small projects.
User avatar
kyberfabrikken
Forum Commoner
Posts: 84
Joined: Tue Jul 20, 2004 10:27 am

Post by kyberfabrikken »

arborint wrote: That leaves where to draw the line between the View and Controller. I think there is general agreement that the View is more about generating the output for the Response. Likewise, I think there is general agreement that the Controller is more about managing Program Flow and the Request. But that is still not a clear division and each application/framework needs draw the line as appropriate.
Or not. As you hint at, the separation between view and controller is often superficial in the types of applications, that are usually built with PHP. Combining the two into a single presentation layer, can be a smart move, if there is no real difference anyway. These days, I find that I prefer writing my applications this way. When situations arise, where I actually need to separate the two, then I go full MVC, but these are exceptions; Most of the time, I don't use that extra level of abstraction.
Post Reply