Personally, I don't use a framework for development; I'm one of those masochistic idiots who likes just likes to do that (relatively) low level stuff that other code can sit on top of, but I do like to work with MVC in mind, because it makes a lot of sense to me. However, an article spurred by heckling at phplondon08 seems to call my understanding of MVC into question.
I'm sure that there are hundreds of intricacies that I've either glazed over or missed, but I don't claim to be a guru on the subject, I just liked what I read. A very brief breakdown of my interpretation of MVC would be something like:
Model -> For interacting with a data source. For me, these sit on classes for opening connections to databases/xml and give Save/Delete functionality as well as allowing for custom queries to be run and results to be returned.
View -> All display work is done here. Whether you use templates or markup generation, all that stuff is done here.
Controller -> Application logic is here. This is the page that is visited, and it makes calls to models, decides which views to load, processes forms, all that kind of stuff.
The above article (or at least the email therein) seems to disagree with me there, attributing more application logic to the model than the controller. However, for me, my way seems like a very scalable structure (and it is relatively scalable in my brief experience with working with the classes I've developed!), but I can't see what sort of application logic you'd separate into models and retain logic/scalability.
I've started this because I know there are a lot of pretty experienced developers on here, and I'd appreciate input from you guys on the subject. I've only been aware of MVC for about a year, and I was just shown it by a pretty experienced contractor, then he left. Chances are, I've taken a wrong turn somewhere and created my own stupid interpretation of MVC that works but isn't technically correct! :/
If anyone's got any resources (preferably free, I'm supposed to be saving!) on design patterns, I'd be most grateful - the Zend book only really skims over the subject!
I'm sure that there are hundreds of intricacies that I've either glazed over or missed, but I don't claim to be a guru on the subject, I just liked what I read. A very brief breakdown of my interpretation of MVC would be something like:
Model -> For interacting with a data source. For me, these sit on classes for opening connections to databases/xml and give Save/Delete functionality as well as allowing for custom queries to be run and results to be returned.
View -> All display work is done here. Whether you use templates or markup generation, all that stuff is done here.
Controller -> Application logic is here. This is the page that is visited, and it makes calls to models, decides which views to load, processes forms, all that kind of stuff.
The above article (or at least the email therein) seems to disagree with me there, attributing more application logic to the model than the controller. However, for me, my way seems like a very scalable structure (and it is relatively scalable in my brief experience with working with the classes I've developed!), but I can't see what sort of application logic you'd separate into models and retain logic/scalability.
I've started this because I know there are a lot of pretty experienced developers on here, and I'd appreciate input from you guys on the subject. I've only been aware of MVC for about a year, and I was just shown it by a pretty experienced contractor, then he left. Chances are, I've taken a wrong turn somewhere and created my own stupid interpretation of MVC that works but isn't technically correct! :/
If anyone's got any resources (preferably free, I'm supposed to be saving!) on design patterns, I'd be most grateful - the Zend book only really skims over the subject!