Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I am sorry but I have such an aversion against the attitude of "we use xy because of historic reasons but hey actually it is really good because the design pattern that has proven crucial over the last 50 years imo is just overhead and you can just put some files here and there copy a bit of that and... "

I don't understand what your criticism is



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 mean, you can do MVC in PHP if you want. I used perl long before I used PHP so the $annotation never bothered me.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: