|
|
|
|
|
by Blackarea
1128 days ago
|
|
My criticism is that php was designed to be a violation to mvc. The <?php> file header already a commitment to mixing front- and backend code (HTML + php in one file) inevitably leading to spaghetti code.
The $annotation an inheritance from perl imo also a major distraction.
also Laravel, other frameworks and newer php versions might try to tackle some of the historical tech debt embedded into the language but I personally don't see a point in revival of php altogether.
I guess my point is to some degree subjectal and shaped by some major crimes I have stumbled upon when debugging. Even though the code in this repo looks fine, the mere use of php is reason enough for me to stay away from it altogether |
|
I personally like mixing frontend and backend. I get why it's anathema to some, but there are simply tons of use cases where I think the simplicity it offers - being able to capture an entire page of functionality in a single file - outweighs the disadvantages because of the simplicity it offers.
For larger scale applications it's easy to make terrible mistakes leading to spaghetti code - I feel your pain about major crimes and have witnessed a few (and been responsible for some) myself. But this is possible in many languages if you're not using a framework, and modern PHP gives you way more tools to avoid it, even before you look at frameworks, which almost completely obviate the problem.