DEV Community


Discussion on: Choosing PHP in 2018

olal profile image
(ⓞⓛⓐⓛ 🇰🇪 II)

Say no more 👏👏👏👏

Thread Thread
xowap profile image
Rémy 🤖

Ah but I learned, the last time we had this argument I didn't try to convince anyone to use Django and then I was urged to give the solutions I had in mind.

I guess giving alternatives wasn't a good strategy either then.

My point is still the same, PHP doesn't make sense and trying to make it better gets me tired.

What makes it clear that I havn't tried it? That I still haven't changed my mind?

Thread Thread
xicarus profile image
Sergiu-Lucian Petrica • Edited

The fact that you're still ranting about the ORM with complete disregard to the framework's strengths makes it clear you still haven't tried it. I already suggested that.
Developers appreciate Laravel's clean and beautiful code, you can easily understand what's going on just by glancing over it (more so than your average framework). This makes development a pleasure and is the main reason why Laravel completely trampled its competitors (like Symfony, CodeIgniter or Yii) even though it's the newer kid on the block.

Lumen is a microframework based on Laravel. The fact that you can seamlessly transition towards the full framework if you want to is its main strength. It aims to address Laravel's slower nature by having the granularity of only using the features that your project is actually using.

PHP always made and will make sense for a long time, it's your anti-PHP opinion that prevents you from seeing it. Right now aside from the standard library inconsistencies (which really mean nothing if you're using an IDE) the language is actually very good.
Improving its weaknesses is a sign that the language will be with us for a long time from now on, to your obvious dismay.

Thread Thread
xowap profile image
Rémy 🤖 • Edited

The reason I'm ranting about the ORM is because nowadays it's 80% of what matters to me in a server-side framework. If you're fine representing your models as a stack of migrations you have to hold in your head I guess you'll have a better memory than I do. If you're fine merging migrations that will run in random order you'll probably get rich in Vegas.

None of 100-something files generated by default nor controllers you have to create will be as readable as the code you don't have to write when doing the same thing with another framework not so slowed down by the language's flaws.

I used to see the beauty in PHP and now I see the truth. It made me lose long hours I could have spent doing something else. Every time a client requires me to code PHP is a painful reminder of that.

But then again, if Laravel floats your boat then go for it, be free. You're the only judge of what you need. (This sounds sarcastic but it's not)

Thread Thread
xicarus profile image
Sergiu-Lucian Petrica • Edited

Migrations in random order? What do you mean by that? Laravel's migrations are very much executed in the order of creation date (you can change that order if you really want to but to be frank I never needed to do that).

It sounds to me like you're required to support older PHP versions, because PHP post-7 is actually a decent piece of language and is fun with a good framework. I'm not confident about you being up to date with the current PHP ecosystem, that's all.

Likewise, if you like Django that's perfectly fine. I think it's great too. But again, I think your reasons for preferring are alien. Perhaps your projects are different than mine and that's why.