I don't really get the hype for Laravel over Symfony, or the joy of writing prompt instead of actually coding.
PHP is the new JavaScript?
71–80 of 88 posts
Re: PHP is the new JavaScript?
#72> What happened? Well. Laravel happened (and has been happening). Funny, because Laravel was one of the things driving me away from PHP, in the same way that Rails drove me away from Ruby. PHP was becoming a salvageable language with some of the 7.0 changes, but if you don't dump 1000 pounds of gunk on top to make the easy things hard and there hard things dang near impossible, then you're not a "web artisan", I gues…
ORMs only make easy things slightly easier. Complex queries are not expressable in ORMs, so you need SQL queries (usually as strings, in external files or generated with a tool like jOOQ/LINQ). I think just doing all with SQL is easier to understand and maintain. I see no benefit of ORM considering the small benefits vs cost of learning. And your code become hugely dependent on them.
No off-the-shelf ORM that I've ever used has done anything but get in the way.
Another 5% disagreement over whether they even make easy things easy. They often require some contortion of your application code in order to work at all, like annotations or inheritance on value objects that lead to them being coupled to a specific data source.
Re: PHP is the new JavaScript?
#73What ever happened to Hack ( https://hacklang.org ) the language Meta built as a superset of PHP? Why not take an approach more similar to TypeScript? I sometimes do wonder if many of the server side rendering approaches (or alternative Node runtimes) would be better off trying to emulate some aspects of PHP
What would you want from typescript?
Re: PHP is the new JavaScript?
#74Earlier quoted context omitted.
"the ORM didn't support composite keys" Well composite keys are a bad idea, so maybe it had a reason for that.
Composite keys are fine as long as all the key columns are surrogate keys.
Re: PHP is the new JavaScript?
#75Earlier quoted context omitted.
Composite keys are fine as long as all the key columns are surrogate keys.
High bridges without guardrails are fine as long as you don't fall off.
Re: PHP is the new JavaScript?
#76Re: PHP is the new JavaScript?
#77Re: PHP is the new JavaScript?
#78How is this better than rails?
It feels like Rails developers are just absent from all these online discussions because they're too busy living happy, fulfilling lives.
Every time I have to work with another technology, I end up wishing it could be done like Rails.
Rails's drawback is that with enough before/after filters it feels like logic is hard to grasp, but it still turns out to be better than any alternative I could of. The laravel middleware approach is much more cumbersome and less powerful.
Re: PHP is the new JavaScript?
#79Forget the framework, forget the AI assistant. What are PHP developers like these days? Awhile back, we wrote an MVP, a proof of concept, using Wordpress. I dug around some of the plugins and themes we used, and my god , it's still garbage. Things being shipped with huge swaths of code just commented out, spaces & tabs intermixed for indentation, TODOs littering the codebase. Things that were just flat out broken . I…
> using Wordpress Wordpress should be avoided like the plague if you care about code quality at all. It actively encourages bad code and this will never change. PHP programmers being conditioned to write low quality code due to their experience with things like Wordpress or other legacy bespoke codebases that aren't built on top of good programming practices is a real problem, and using a modern framework alone won't…
I'm currently dealing with a laravel app. Said app has an 18,000 line "AdminController", and a 7k lines "WebController"
These contain all the logic. No, I'm not exaggerating. Model files are empty, save for 4 lines of model declarations. It's a whole CMS written in a SINGLE FILE. of course, such a dumpster fire can't exost without copious amounts of copy-paste, of which there indeed hundreds.
I'm talking multi-levels of nested if conditions, each with many branches, and said branches are very well over 10-20 lines of code that only differ by a single word.
And I won't even get to the disgusting mess that is the view templates... Let's just say they follow the same principles as above, except the original developer was unfortunately constrained by having to create a separate view file for each controller method.
Re: PHP is the new JavaScript?
#80everytime I see PHP and python, it reminds that the best of the three main languages in the "slow / overly dynamic" lane (Ruby) got the short end of the stick for some reason, it's terrible
Python is pretty magical in places. PHP is slightly magical in places. But Ruby is magical everywhere.
Ruby also has the cleanest syntax of the three. Php and python are downright ugly in comparison.