grungefreak Posted April 14, 2009 Share Posted April 14, 2009 I have been away from PHP for a while. When I was last using php (about 3 years ago), most people weren't using the object oriented version. Has this changed or are we still mainly using procedural php? I am about to embark on a web dev project using php and just wondering whichever is most popular now for support reasons. Any opinions welcome. GF Quote Link to comment https://forums.phpfreaks.com/topic/154105-solved-scripting-or-oophp/ Share on other sites More sharing options...
jackpf Posted April 14, 2009 Share Posted April 14, 2009 I don't think you should base your application on whichever code is "more popular". I personally prefer OOP because it's neater and gives a lot more functionality to...functions. I also find it useful because functions can use the same variables without having to global/define everything. But if you don't actually need any of this functionality then there's not much point in using classes. A simple function will suffice. Quote Link to comment https://forums.phpfreaks.com/topic/154105-solved-scripting-or-oophp/#findComment-810073 Share on other sites More sharing options...
maddogandnoriko Posted April 14, 2009 Share Posted April 14, 2009 To me it seems like most are using or converting to oop now. I am working on a project that requires xml usage and it is now built in and the parsed xml is returned as an object...just one example I am sure. maddogandnoriko Quote Link to comment https://forums.phpfreaks.com/topic/154105-solved-scripting-or-oophp/#findComment-810075 Share on other sites More sharing options...
ober Posted April 14, 2009 Share Posted April 14, 2009 Usage of OOP is up to the user and the application. In complex applications where a lot of functionality is re-used, it is smarter to go the OOP route. For simple applications, it may not be worth the effort to build out a large framework when the procedural method will suffice. Quote Link to comment https://forums.phpfreaks.com/topic/154105-solved-scripting-or-oophp/#findComment-810090 Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted April 14, 2009 Share Posted April 14, 2009 For me it's all about future. OOP/Framework is investing time right now to have less work to do tomorrow when the site will grow. If you expect any project to grow big and have a lot of change/visitor, go for it. For a site/project that will never grow you loose your time by going OOP. On the other side scripting as you call it, is fast to develop small project, but just like a credit card it will hit you and you will pay 3 time more if the project eventually grow. I usually ask the client what he want. Pay more now and less later if the project grow, or pay less now and lot more later if the project grow. Quote Link to comment https://forums.phpfreaks.com/topic/154105-solved-scripting-or-oophp/#findComment-810216 Share on other sites More sharing options...
grungefreak Posted April 15, 2009 Author Share Posted April 15, 2009 Thanks guys, that gives me a good idea on what way to go then. Think i'll just learn oo php and try use it wherever I can. OO is definitely here to stay and I guess one could draw some patterns based on classes and objects for use with other languages in the future. GF Quote Link to comment https://forums.phpfreaks.com/topic/154105-solved-scripting-or-oophp/#findComment-810933 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.