Frameworks helps developers to move in the right direction, and that is a good thing, however when you have used a framework long enough you start seeing the cracks.
Frameworks solves a general problem, you on the other hand has a specific problem. To be able to accommodate your specific problem and everyone else specific problems frameworks has tendency to heavily rely on magic.
* magic classes - using PHP magic methods for everything, the actual class is usually empty and things happening elsewhere.
* magic files - put a file with the correct name in folder somewhere and things happen
* magic configuration - put a hard coded string in some config file and you change the entire behaviour of the app.
* magic layers - if you follow the execution path with the debugger you spend the majority of time circling around in different layers and very little time in your own code.
All of these things are considered bad practice when doing it in your own code, but for some bizarre reason it is considered good practice in frameworks.
> All of these things are considered bad practice when doing it in your own code, but for some bizarre reason it is considered good practice in frameworks.
I think that’s because that kind of code has a much higher maintenance burden. It’s much more difficult to get up to speed on what’s going on in complex magical code. But you can probably trust a framework that’s achieved critical mass to make reasonable decisions and stay alive for a while.
Frameworks solves a general problem, you on the other hand has a specific problem. To be able to accommodate your specific problem and everyone else specific problems frameworks has tendency to heavily rely on magic.
* magic classes - using PHP magic methods for everything, the actual class is usually empty and things happening elsewhere.
* magic files - put a file with the correct name in folder somewhere and things happen
* magic configuration - put a hard coded string in some config file and you change the entire behaviour of the app.
* magic layers - if you follow the execution path with the debugger you spend the majority of time circling around in different layers and very little time in your own code.
All of these things are considered bad practice when doing it in your own code, but for some bizarre reason it is considered good practice in frameworks.