How to think OOP ?
View Single Post
05-21-2008, 10:21 PM
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Disclaimer: I've never written in Java, so this is completely a personal opinion.
I don't think you have to accept anything, especially when it comes to PHP. One of its strengths (that some claim to be its weakness from time to time) is the fact that you have so many options for various methods of performing the same action. OOP is still relatively new to PHP but it's getting stronger and better every release. The thing you have to do as a programmer, again in my opinion, is decide what works best for you, your project, and/or your client.
If you come from an OOP background, and you decide everything you do should be in OOP, and you can make it work, then all the power to you. Some times though procedural markup can perform the exact same tasks, in less code, and more efficiently (in regards to server load, compile time, etc). This is where you have to make the decision, do I really need OOP? I started using it for everything once I finally figured out the basics of it, and I loved it. It came to a point though where I realized I was making some tasks far more complicated than they needed to be, just because I was trying to do it entirely in OOP. Since then I've gone back over a lot of my old code and made it a combination of OOP and procedural markup that runs way faster, and is far more organized.
View Public Profile
Send a private message to delayedinsanity
Visit delayedinsanity's homepage!
Find More Posts by delayedinsanity