7 ms·
Laravel and Drupal 7+ frankly ruined PHP for me. PHP as a platform is KISS and elegant, and I still admire some of its features such as built in templating, fi
by geenat 5y ago
Laravel and Drupal 7+ frankly ruined PHP for me.
PHP as a platform is KISS and elegant, and I still admire some of its features such as built in templating, filesystem based routing, etc.
But whenever I look back at Laravel, I remember how dangerous overly complex fluff with a nice logo is to a platform.
- pak9rabid 5y agoHaving worked in both environments (framework vs no framework), for anything other than very trivial apps, you want the framework to force everyone into a common way of doing things. Otherwise the project turns into a a massive clusterfuck of everyone doing their own thing, often with many instances of "reinventing the wheel" going on.
- dgb23 5y agoYou can use Laravel just for the basic wiring, integrated tooling, SQL query builder, auth, sessions, and HTTP routing. It really gets out of the way if you need to avoid features you don't like. All of the stuff I listed above are a PITA in plain PHP.
- ThatMedicIsASpy 5y agoSymfony components would be the better choice? Did they change Laravel to only include what you want like Symfony?
- unfocussed_mike 5y agoYep -- Laravel has always been the work of grownups in this regard. It's a really very good platform for headless PHP. The job queuing stuff is so neat it actually makes me write queueable jobs. Combined with Lighthouse, Spatie's Stripe Webhooks library, Spatie's MediaLibrary, I've actually had fun with Laravel. I see no reason for hate now.
- cmg 5y agoI went kind of in another direction a few years ago - CodeIgniter's routing/sessions/etc base was plenty for most of my projects, but I wanted a real ORM. So I integrated Eloquent from Laravel and ignored the built-in CI database layer. A bunch of these sites are still running smoothly on modern PHP.
- PZ81JUXJE7uJ 5y agoFunny, all I remember is the hot mess everyone was producing before Laravel.
- unfocussed_mike 5y agoRight. Laravel 7 and 8 have been excellent. It's a good product with beautiful documentation.
- agumonkey 5y agobeside legacy cobol, wordpress plugins were the most horrendous code i've ever seen. dead code I should say since quite often half of it was left commented in the official running source.
- bdcravens 5y agoAny app without a framework ends up creating a framework of its own. Complexity isn't something to hand-wave away, but neither is the mess of include's and SQL injection risks that many "vanilla" apps become.
- doublerabbit 5y agoSame applies for frameworks. Your hoping that the framework and ecosystem is clean as to get everyone to update the framework isn't an easy task espcially when a vulnerability arises from within. It's moot. Take Wordpress for example.
- mschuster91 5y ago> However your then hoping that there are not any vulnerabilities within the framework. The likelihood of me introducing an injection, authentication/authorization bypass or RCE vulnerability in homegrown stuff is orders of magnitude larger than in an application where at least the sensitive core parts are handled by something that's battle tested in millions of deployments and regularly audited.
- doublerabbit 5y agoIf the framework is promoted to be enhanced by a ecosystem of plugins, widgets, your still introducing the same exploitable ground as of developing your own. If not more dangerous because your operating already on core infrastructure and with a wider audience. How often does the developer get bored and start to neglect the plugin? I do agree that a single home-hobbyist programmer should not be coding a bank and that sql injections and the rest are all lethal to the internet. However you end up with stagnation and lack of innovation if you pressure users to use a framework because there's a fear of some sort of exploit. It's like riding a bike and forcing the rider not to ride without stabilisers because they may fall sideways.
- mschuster91 5y ago>How often does the developer get bored and start to neglect the plugin? For the most popular frameworks (e.g. Drupal, Symfony, PHPunit), the core ecosystem is (co-)maintained by the framework authors, who are funded through various means - usually consulting/webdev agencies. The "usual" FOSS burnout problem doesn't apply for them. > However you end up with stagnation and lack of innovation if you pressure users to use a framework because there's a fear of some sort of exploit. A framework is just that: a framework. You can develop all you want with that framework - I've seen Symfony being used for tiny microservices to the code for a bank's website. You can develop faster and better code because you don't have to re-invent wheels or do tedious interoperability tests for basic stuff allll the time, and whatever problem you encounter, someone else will have also encountered and posted a solution on Stackoverflow. > It's like riding a bike and forcing the rider not to ride without stabilisers because they may fall sideways. No. Symfony, Laravel and others are the vendors for the basic bike... you can always bolt on custom parts according to your need and for the PSR-standardized stuff like loggers, you can even choose between multiple different part vendors.
- ivanhoe 5y agoIMHO Laravel and Symfony are the best things that happened to PHP community since php5. PHP was an ugly mess of bad practices, fragmented into many outdated apps/frameworks and it was just exhausting to use. Symphony was a great improvement, but a bit too rigid and too enterprise-level for my taste. For me Laravel was honestly a breath of fresh air - finally I had something significantly more powerful than my custom framework and still highly flexible and light-weight.
- TimWolla 5y agoLaravel definitely is everything, but light-weight. It's the slowest of the large names in PHP. see http://www.phpbenchmarks.com/en/comparator/framework http://www.phpbenchmarks.com/en/comparator/framework or https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=fortune&l=zik073-sf&c=e https://www.techempower.com/benchmarks/#section=data-r20&hw=...
- davejitsu 5y agoYou’re posting benchmarks for versions that are now more than 7 years old
- coder543 5y agoTechEmpower appears[0] to be using Laravel 8.70, which was released about 3 months ago. Much less than 7 years ago. The numbers there don't paint an encouraging picture either, but I'm happy to concede that performance isn't everything... it just doesn't matter for some applications. But, numbers like these are pretty appalling to me. (And yes, I feel the same way about Rails.) [0]: https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/PHP/laravel/composer.json#L11 https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
- ivanhoe 5y agoCompared to Zend, Symfony and other FWs popular a decade ago, Laravel 4 felt very light... or perhaps less complex is the right word, as I never really compared the file sizes, but it subjectively felt way easier to find your way around...
- pan69 5y ago> Laravel and Drupal 7+ frankly ruined PHP for me. You don't have to use either. It's like saying something like "Britney Spears ruined music for me". Just go with Symfony and be done with it.