johnsmith153 Posted November 19, 2010 Share Posted November 19, 2010 I am told MVC isn't OOP. I am creating a basic framework for my own use. I am determined to follow MVC. I also want to use a full OO style - and know I can do it properly rather than for the sake of it. (1) Is it really that bad to try and follow MVC whilst also using OOP? (2) I hear people talk about Singleton / Factory etc. for designing classes. Should I follow a certain design for these (that fits in with my current design). My other forum post should explain how I want to design my classes: http://www.phpfreaks.com/forums/php-coding-help/oop-linking-parentchild-classes-(and-if-to-instantiate-or-not)/. (3) Overall, am I right in what I am doing? Quote Link to comment https://forums.phpfreaks.com/topic/219226-mvc-not-oop/ Share on other sites More sharing options...
jdavidbakr Posted November 19, 2010 Share Posted November 19, 2010 Wouldn't MVC technically just be a subset of OOP? Isn't OOP nothing more than breaking your code into objects that act independent than one another, while MVC is that but more strictly defined? Quote Link to comment https://forums.phpfreaks.com/topic/219226-mvc-not-oop/#findComment-1136833 Share on other sites More sharing options...
KevinM1 Posted November 19, 2010 Share Posted November 19, 2010 MVC is a design pattern. OOP is a programming methodology. The two are perfectly compatible. Quote Link to comment https://forums.phpfreaks.com/topic/219226-mvc-not-oop/#findComment-1136879 Share on other sites More sharing options...
ignace Posted November 20, 2010 Share Posted November 20, 2010 Globals are bad as you already knew. Singleton and Registry are globals. Quote Link to comment https://forums.phpfreaks.com/topic/219226-mvc-not-oop/#findComment-1137116 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.