Over the Christmas break I came across an interesting comment in a post by fellow 9ruler Kyle Neath, where he himself states if you%u2019re looking into MVC there%u2019s an extremely high chance that any examples you run into will consist of OOP-based frameworks. I realized that he was right, and that perhaps this isn’t such a good thing.
Before I get into this, and you serious programmers get too worked up, I realize that MVC was spawned in an Object Oriented Programming (OOP) world, but the fact is that the ideas behind MVC concepts can be applied to procedural code and simple applications that do not use OOP, and when done well can greatly improve things like code re-usability and the code flow for these websites or web applications.
So a friend and colleague, Lance (a very talented web designer by the way) asked me about this and I had this to say:
In a big picture context, OOP is really nothing more then an approach for coding (or some would say a religious mantra) that is really in vogue today. There are many tasks that are really more appropriate for a procedural style of coding. (as Face would be the first to argue and argue he would
![]()
MVC if implemented with clear delineation is a super object in many ways, it has methods to access data (models) and methods to display information (views) and methods to control the meat (controllers). The part that oop brings to the picture is the ability to extend existing code in a clear way that handles much of the nitty gritty code work (or in a database driven app the CRUD ) and the templating in a logical way, of course in many ways php is a templating language all in itself.
Also many will argue that the benefits of OOP coding design (it is a design decision I think more then a rule), modularity and extensibility far outweigh it’s inherent overhead.
I could probably ramble on an on and on…..
How would you ramble on? Vent and link
(Via Lance.)
For me, OO is more than an approach for coding, it is a way of thinking.