themistral Posted December 7, 2007 Share Posted December 7, 2007 Hi, I am not really familiar with OOP programming and was wondering how it differs from standard PHP. My understanding is that the only difference is that OOP uses classes...is that correct? And what are the any advantages of using OOP over standard PHP? Is it processed quicker by the server? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted December 8, 2007 Share Posted December 8, 2007 OOP has a lot of advantages. Procedural code is written more quickly and processes quicker, but OOP is much more organized, maintainable, and easy to extend on. You can also reuse classes with very little to no editing. So if your coding something that you know you can reuse over and over in the future, it would definitely be worth using OOP for it. Quote Link to comment Share on other sites More sharing options...
themistral Posted December 8, 2007 Author Share Posted December 8, 2007 Thanks pocobueno1388! I already use functions for bits of code I use over and over again so I guess using a class takes me one stage further as it looks like you group various functions to get all the information you need rather than running a few separate functions. It makes sense! Do people treat you as a more serious coder if using OOP techniques? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted December 8, 2007 Share Posted December 8, 2007 Do people treat you as a more serious coder if using OOP techniques? In my opinion OOP is a more advanced part of PHP, so it's a plus in my book. I would personally take someone more serious if they did a large project in OOP rather than procedural code if it was necessary. Quote Link to comment Share on other sites More sharing options...
themistral Posted December 8, 2007 Author Share Posted December 8, 2007 OK thanks! I've used osCommerce and phpBB which both use OOP but never started any OOP from scratch - out of curiosity, is there a good beginners tutorial you know of - I know I can search google and I will - but if there is a particular one you would recommend, then I'd appreciate it! Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted December 9, 2007 Share Posted December 9, 2007 I would just search Google, I can't think of any particular one thats better than the rest of them Quote Link to comment Share on other sites More sharing options...
Alex-Grim Posted December 9, 2007 Share Posted December 9, 2007 You can't find very comprehensive knowledge online. I'm in the same boat. We're probably going to have to hit up ol' Barnes and Nobel... Quote Link to comment Share on other sites More sharing options...
themistral Posted December 9, 2007 Author Share Posted December 9, 2007 Have a look at this thread for a good online tutorial http://www.phpfreaks.com/forums/index.php/topic,171265.0.html I haven't used it yet, but it does seem to fit the bill! 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.