by mpldr · 3y ago · 0 comments
- so. many. godobjects.
- I dislike ORMs. I could not put my finger on it, while using PHP frameworks, because they were omni-present; but after using Python, Go, and C#, I found it to be easier for me to just avoid the overhead of an ORM.
- Terrible structure. Sorting classes by type is something I have experienced to be generally less helpful than sorting by "topic" (not a native speaker, so this might not be the correct word for it. I recently heard it compared to collecting cars, then disassembling them and sorting by tires, steering wheels, seats, and so on)
- Too much magic™. I understand that many like this about it, but I found it harder to understand what exactly the program is doing.
It's not a lot, but after literally years of PHP and having these paper cuts almost weekly, I was at one point fed up. I first switched to CodeIgniter, which I found more pleasant, but still not even comparable to the comfort that cherry-picking components gets you (yes, you can by using composer, but most people I have spoken to discouraged that in favour of Laravel's built-in fun).
A technical decision should be done by weighting it's pros and cons, not just by looking at the pros.
Agree on the 'Sorting classes by types', it's something I've always found surprising too, and love the car-collection metaphor.
I would be interested to hear more.
A lot of good points are written down here: https://old.reddit.com/r/PHP/comments/131t2k1/laravel_consid...
In short, it just doesn't use good programming principles. It's not just easy to write code with bad principles, it's everywhere in the tutorials.
There's of course Laravel apps out there that do have good programming principles. It's very much possible to write good code with Laravel. It's just less common.
Laravel was the first framework, that "just worked" and had everything, you need to make your first steps in a web application. Nowadays, people write PHP components that are usable in Laravel and that means a lot of code out there is compatible to a lot of other code. That alone did a lot to the PHP community. 2010 or so, the PHP landscape was much more scattered and things didn't look good.
Since then a lot happened and Laravel carries old stuff with it, and I'm very happy about that! I'd hate to be forced to do big refactoring work on every update of the framework. As strange as some decisions in Laravel are, they try new things, and they also try to stay compatible to the old stuff. Between Laravel 5.5 (released 2017) and 10 there were not much breaking changes. For a framework, this is a big plus.
God help us if it this project becomes the normal way of writing http go servers applications. Maybe at that point it's time to become an embedded rust programmer or a monk.
Who gives a shit about SOLID or OO.
I used to love PHP for its simplicity. That was before zealots of your type flooded the ecosystem.
You wanted to apply what they taught you in uni, which was Java, to PHP. PHP was fine before. I earned good money with it and had fun doing so. Then 2010 the next generation of clueless devs enters the scene, polluting it with their nonsense.
Very much what's happening in Go right now with the cloud microservices fetish.
Can't you booksmart idiots STFU for once and let people do the pragmatic and sensible approach?
Fucking Hipsters
But PHP has more to give than just as a birthing ground for teenage programmers.
When I many years later accepted a PHP job as a senior developer, PHP provided a consistent experience of "bad practice everywhere", a fractal of cringe I couldn't ironically reproduce. Working with this for a year taught me a lot about how to deal with critical legacy software beyond repair and being responsible with what you've got.
I think there is no better way to get your hands consistently dirty than with PHP.
Coincidence: I do embedded Rust, and my wife is a buddhist monk. ;-)