I want to build web applications, as quickly as possible. My experience with Java/Spring, Golang, and Javascript/Typescript doesn’t lend itself to this, so I get to:
My approach was to go through the official getting started guides, then see how quickly I could get a ‘Hello world’ queued job working. I will be syncing with third-party APIs, so jobs are a must and, I feel, a good litmus test for how rapid a framework is.
Rails took a few attempts to get working. The rails-new
tool didn’t initially work with Rails 8, which I wanted so I could use Solid Queue for job queues. It didn’t take too long to find a solution on Github.
The Phoenix Express setup didn’t work initially. The docs said it should attempt to connect to a Postgres database then fallback to SQLite if one didn’t exist. But it failed with errors about Postgres. So I setup Postgres in a Docker container and, combined with the standard setup instructions, eventually got it working.
Django and Laravel worked on first attempt!
All frameworks worked well and have good guides. No stand-outs.
Rails’ CRUD magic was just as advertised ✨.
Django comes with an admin UI out-of-the-box which is nice.
Laravel doesn’t have an official CRUD-generator or Rails-level magic, however it has Filament. It’s a CRUD generator on steroids. Highly customizable and as many Github stars as the entire Phoenix framework.
As expected, this test revealed a lot.
Rail 8’s new Solid Queue seemed really easy to setup and use, however it kept corrupting my SQLite database. It might be related to this issue which has apparently been fixed, but I was on the latest version. Solid Queue is new, so to me this is an indication that it’s not going to be as robust as other solutions. It also doesn’t come pre-configured for local environments.
For Django I spent 2 hours trying to get Celery (third-party) working, with no success.
For Phoenix/Exixir, I managed to get Oban (third-party) working after some setup and a little troubleshooting.
Laravel worked out-of-the-box on an SQLite database. In minutes. Amazing.
All official docs are good.
Django and Phoenix/Elixir have far fewer forums and guides. So they will require more trial and error, and learning without much help.
Rails is better, but Laravel docs seem more up-to-date and polished. Their docs are like well-written articles. Concise, comprehensive and easy to follow.
Laravel also has Laracasts, which has hundreds of hours of (mostly paid) video lessons covering not only Laravel, but PHP and general programming, and application development tools and skills.
Similar to learning and documentation, Django and Phoenix/Elixir have far fewer official libraries and tools.
Rails is much better, however Laravel again is well ahead. In addition to my experience with job queues:
Just look at this list!
It’s easily the best for rapid web application development, especially for:
In addition to being more robust and feature-rich when compared to the others, there’s a next level of paid, professional tooling to optionally go even further. So you’re able to leverage the ecosystem for even longer.
Apparently it doesn’t anymore. And Laravel uses the best of it.
Laravel didn’t exist then. Rails doesn’t seem the go-to for startups anymore, and I’m not a startup anyway. Laravel seems popular for small to medium, profitable businesses and I think that’s a better match for me.
If you to a, for example, Django forum: People will say you can achieve the same as Laravel in Django/Python.
This is true, but remember it’s coming from people with a lot of experience with the language. You’ll spend more time getting third-party tools working or building your own solutions. That could be fine if your goal is to learn Python, but if your goal is to build quickly and have a huge ecosystem of tooling and resources to support you, then Laravel is a better match.
It’s almost jarring the difference between Laravel’s capabilities and how it stands in people’s recommendations. I can think of a few reasons for this.
Rails legacy: As mentioned above, there are huge names in the industry that used Rails. That reputation still has significant weight. As humans, we’re attracted to good stories and those are great ones. Even if the landscape has significantly changed.
Trends/news: The Javascript ecosystem has amazing new tools being created all the time. There are also many, many frontend developers out there (myself included!). So Javascript frameworks are frequently recommended for full-stack web applications despite none of them coming close to these 4. At least when there is significant backend work required. You’ll find yourself patching together multiple tools and, thus, enduring more context switching and more points of failure.
PHP has no audience niche: Python has data/science. Rails has startup lore. Elixir/Phoenix has functional programming enthusiasts and those who appreciate the technical capabilities. PHP has none of this. It’s not cool.
These reasons lead me to believe Laravel’s edge is bigger than it seems based on discussions online. It has had to overcome the above issues to get where it is. Like a surgeon who looks like a butcher.
I’d choose Django if I was very experienced developing Python apps.
If I were only intermediate or only had experience with scripting (e.g. for data) then I’d still consider Laravel, because the time taken learning PHP and the framework could be easily made up in less time troubleshooting and building features that don’t come out-of-the-box.
I’d choose Phoenix/Elixir to have fun or for getting better as a developer. As a functional language with a special tool like LiveView available (for updating UIs over web sockets), I can definitely see the appeal from a technical perspective. But the learning curve and ecosystem is prohibitive for me.
I’d choose Rails if… Laravel wasn’t available. That’s not a dig! Rails comes in a clear second place for me. It has a much bigger ecosystem and far more learning sources than the other two.
I recently made a small project in Laravel, so this technically wasn’t my first time using it.
But Rails 8 looked really nice, so to make sure I mentally bought-in and got rid of any FOMO, I decided I needed to evaluate all the big players in this space. And I’m glad I did.
As well as mental buy-in, I’ve also financially bought in with a year’s subscription to Laracasts. Just look at all these topics:
Time to start building!