4 ms·
PHP hasn't been madness for a long time. One could argue Laravel (a RoR inspired framework) has become better than RoR.
by pearjuice 5y ago
PHP hasn't been madness for a long time. One could argue Laravel (a RoR inspired framework) has become better than RoR.
- Cthulhu_ 5y agoI mean, there have been plenty of valid arguments against PHP the language and its standard library, but the big issue most people end up having have to do with its ecosystem, developers, and frameworks. My earliest rants about PHP was the sheer volume of bad tutorials; googling for "php sql" or whatever would invariably give you examples susceptible to SQL injection. And the other issue was that everyone was building frameworks, CMSes and forum software left right and center; there were a lot of islands, each with their own ideas, structures, etc. PHP should have made a much bigger push early on; mark the weird and unsafe functions as deprecated and point to e.g. prepared statement alternatives. They should have built a package / dependency manager much earlier on. And they should have made a lot more efforts to get a developer community up and running.
- stanmancan 5y agoIf you're actually interested in the subject, a good way to familiarize yourself with the current state of PHP is to run through something like https://laracasts.com/series/laravel-8-from-scratch https://laracasts.com/series/laravel-8-from-scratch. It should give you a good idea of the current state of PHP, what educational resources look like, along with a taste of the most popular PHP framework out there. These conversations always tend to go the same way; someone complains about PHP and then later admits it's based on their experience 5-10+ years ago. PHP has come a long way and is worth checking out if you're into web development.
- chrisan 5y agoas a former Rails user now Laravel user, I would agree with this. PHP has mage huge strides in typing too, I havent kept up with Ruby to know if they do the same
- sinsterizme 5y agoUnfortunately Ruby's typing story is abysmal. I hope they manage to improve it soon, otherwise I fear the language will continue to flounder
- sam0x17 5y agoSure, community interest peaked around 2014, but usage among enterprise and startups is higher now than it ever was. Ruby is boring now because it works.
- horsawlarway 5y agoNo - typing is still basically a complete after-thought in Rails. Sorbet is trying, but it's... not there yet (although getting better).
- sam0x17 5y agoIf you want typing in Rails, you're in reality itching to try Crystal lang and most likely Amber framework. Much faster too as it's a systems language.
- redbar0n 5y agoI’m itching to try Crystal, since it has goroutines aka. greenthreads aka. fibers for easy concurrency, static types, automatic null checking, and performance on par with Golang. But Crystal has around 468 open bugs at the time of writing :( https://github.com/crystal-lang/crystal/labels/kind%3Abug https://github.com/crystal-lang/crystal/labels/kind%3Abug Issues are well over 1k…
- sam0x17 5y agoI did run a startup for a year that was on crystal, and I will say the community is quite good at addressing real bugs. There are a lot of "you don't know what you're doing" bugs and "this is already fixed but you haven't updated" bugs and "this is really a feature request" bugs in the tracker. I wouldn't read into it much. There hardly exists a popular programming language or framework without at least several thousand open issues.
- deleted 5y ago[deleted]
- ianhawes 5y agoI recall that when Active Storage was publicly announced[0], Laravel's Filesystem (itself a thin layer over Flysystem) had already been out for at least 2 years[1]. [0] https://rubyinrails.com/2017/07/21/rails-introduces-active-storage-for-file-uploads/ https://rubyinrails.com/2017/07/21/rails-introduces-active-s... [1] https://laravel.com/docs/5.0/releases https://laravel.com/docs/5.0/releases
- zackmorris 5y agoI came here to say that, as someone who's used both Rails and Laravel. Basically it comes down to magical behavior, and the fact that Rails has way too much of it. Syntactic sugar and DSLs are maybe fine for rolling out new projects, but become burdensome on large codebases. I was on a large project and found myself in goto hell where I literally couldn't trace through the code. It was relying on every magic trick in the book to make the code as small and cute as possible, but failed utterly to provide anchors in the code where "this happens here" or breadcrumbs connecting chunks of code. It was a giant hodgepodge of I don't know what. Really clean spaghetti code I guess. Now, Laravel has its own warts, but they aren't conceptual warts. For example, the stack traces in Laravel are way too tall, with way too many factories and patterns in the vendor code. I feel that things like the IoC container were not implemented as well as they should be. The goto hell in Laravel happens around stuff like the bootstrap process, registering service providers, queuing, etc. They made some mistakes in scattering those things around instead of handling them in one central place. Pretty much all classes provide 95% of what you need, but adding missing functionality yourself requires learning the entirety of the package (in fairness, this happens with pretty much all platforms). There's a tendency for Laravel projects to not support helper functions or custom classes in a standardized way, so sometimes it's hard to find business logic. Not nearly as hard as in Rails though. But as a whole, I'd take conceptually clean interfaces with mundane implementations and no surprises over magical behavior any day. Just to not leave anyone out - I wouldn't implement business logic in any Javascript framework. I feel that async basically makes it impossible to do it deterministically. I'm sorry that happened to Javascript and am still in mourning about it, because it had some advantages over PHP in how it treated associative array access with "[]" the same way as object member access with "." which could have been used in PHP to implement copy-on-write everywhere and really set it apart from all other imperative languages. Mistakes were made in both, and Ruby as well, that took them all in directions that I wouldn't have chosen.
- weatherlite 5y agoSo what do you like then?
- zackmorris 5y ago