Re:PHP: The Right Way
by FuzzyDunlop on Sunday July 08, 2012 @04:34PM
(#4215616)
From my own experience, PHP developers who are introduced to OOP often get taught the Java-esque flavour of it. Classes for everything, abstractions and base classes and inheritance all over the place.
Hell, I even went there myself at one point, at first doing it to DRY up a bunch of procedural scripts, but later introducing more abstractions to bend the existing code to my will.
Now, I prefer simplicity and will often scrap code that jumps through all sorts of hoops just to do something simple.
pretty sure it's the same thing every time: coming from working on really big systems that need that much depth of abstraction to something simple that can be done in 20 lines and forgetting, or not understanding how to scale down. most common with c# or java coders doing client libs for php for their application.
Refactoring to a single function took it down to under 20 lines.
I wish I knew what motivated people to do things like this.