OOP PHP What are the benefits? | 2 Comments
Posted in Code on 25th January 2005, 2:17 am by Stuart
Over Here at Sitepoint Harry Fuecks has kicked off an interesting discussion regarding the speed of OOP PHP versus procedural code.
What this exactly means requires qualification, as this would imply that speed of execution and speed of development are both to be taken into account to be fair. What I have found since using OOP PHP in web development is; where you are looking to create something that can be easily re-used, adapted/extended and improved, then OOP is the way to go.
Procedural code can be messy and hard to adapt later on. I currently work within a team of several developers where on occasion I have to modify other developer’s code. It’s usually the scripts which have utilised classes which can be quickly understood and changes be made without having to spend too much picking apart the code line by line to understand the flow.
I see OOP php as being similar to the way that using XHTML and CSS allows separation of structure and look from content; except OOP PHP separates functionality from implementation.
I will be watching this debate with interest to see the outcome of Harry Fueck’s OOP/Procedural comparision
