immortality Posted December 15, 2007 Share Posted December 15, 2007 hello guys , wanna ask about php oop if it's better to write my code as classes and objects or if the normal method is better?? thank you. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 15, 2007 Share Posted December 15, 2007 It's all preference. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted December 15, 2007 Share Posted December 15, 2007 this is an age-old debate but the truth is they both have their pros and cons. i think we could answer your question more accurately if we knew what you were trying to build. for php, i personally prefer procedural code, or as you put it, the normal method. oop never really made much sense to me in any other language except javascript and python. Quote Link to comment Share on other sites More sharing options...
themistral Posted December 15, 2007 Share Posted December 15, 2007 Hi, I asked this question on the OOP board and I am going to learn OOP - but I think it depends on the type of site you are building as boo_lolly said. At the moment I use procedural code with functions for reusable code. Once I have got my head around OOP then I will probably use it for big sites I code that reuse a lot of the same code on different pages. For small sites I will probably still use procedural code. It wouldn't hurt to know both and then make the choice depending on the site you are coding! Just my 2 pence worth! Quote Link to comment Share on other sites More sharing options...
immortality Posted February 19, 2008 Author Share Posted February 19, 2008 mm Quote Link to comment 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.