Re:Signs of Crappy PHP Software
by alttab on Sunday July 04, 2010 @10:59AM
(#1485770)
I'm going to disagree with #9 that says using a core framework is bad. Now, if the core framework isn't a pre-built web framework like CakePHP, Symphony, there's a good chance there is some ... interesting things in there. But honestly having a "core" at least tries to reuse code.
[ Parent
| on HN ]
Also disagreeing with #9. Plenty of popular frameworks have "core". core provides a clear delineation between extensible parts of a framework and its inner foundation. A well designed framework allows you to extend its functionality and upgrade the core at any time without disruption. Frameworks have core for the same reason objects have private members: interface opaqueness provides change protection.
I think that if you're using a well-developed framework, you can safely ignore #9. However, his advice is SPOT-FREAKING-ON for any home-grown stuff.
The last time I ran across a "core" directory, there was all kinds of application-specific code in there, all rolled up in switches and stuff - if you wanted to develop something using the "core", you had to go through about fifty files and add your own cases for your site. It was awful.
Lots of things though I think could be a bit more careful about a core, wordpress as an example includes a large amount of code on each and every page, when in reality a lot of the time much of it doesn't get touched every load.