08-23-08, 17:49 #1Registered User
- Join Date
- Jan 2004
- Baton Rouge, LA
Unanswered: PHP Procedural vs Object Oriented
I'm a "good novice" when it comes to PHP. I've made a few personal sites and have volunteered on some friends sites.
Before I go any further in my knowledge, I've been thinking about switching to object oriented programming. Is it better to program PHP using OOP, or should I stick to procedural? Should it be a case-by-case basis where procedural would be better in some places and OOP in others?
Thanks!Beau B. "desigBEAU"
08-24-08, 02:12 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
if you are using aq modern version of PHP (V5 or above) and/or you are used to oop develpemnt then Id suggest go OOP.
objects and classes were a bit of an after thought, V5 is better thought out but its still not really an OOP development environment.
id you think there is code that you can or should re-use the OOP is undoubtedly a good approach.
OOP is probably the way of the future, but its not a panacea, as it introduces some benefits in also introduces some problems. OOP code is probably easier to read, its certainly easier to maintain in my books. you will still be using procedural code to glue together the classes and HTMLI'd rather be riding on the Tiger 800 or the Norton