Rails and Hotwire, Phoenix LiveView or Django?
Hello HN,
If you were a sole founder/engineer with a product you want to take live in a year; which of these very popular frameworks would you choose for a social marketplace web application and why?
Thank you in advance!
12 comments
[ 0.20 ms ] story [ 26.0 ms ] threadSeriously, OP, if the technical team is just you, pick something you already know and can work with. For me, that would be Django. I can't say what it would be for you.
If you're not familiar with Ruby, Elixir, or Python or don't plan to write the app yourself, there are tradeoffs for each.
I'm currently a Ruby(Rails API) engineer, working on side projects in Elixir(Phoenix Liveview), married to a Data Analyst that uses Python(Django Pandas). IMO these are the trade-offs between the 3.
Python(Django): - Okay tooling and meh developer experience - Language popularity: High - Good for ML and data focused Web Apps
Ruby(Rails Hotwire): - Good tooling and developer experience - Language popularity: medium and declining - Good for CRUDs and "Normal" Web Apps
Elixir(Phoenix Liveview): - Great tooling and developer experience - Language popularity: Low, but growing lots of engineers are excited about Elixir but few have professional experience - Good for chat/real-time Web Apps - Good for CRUDs and "Normal" Web Apps (not as good as Ruby) - Okay for ML and data focused Web Apps (not as good as python but it's actively being worked on by the core team)
Scenarios: - "You are planning to be the only engineer for awhile or maybe hiring one or two more for help and you don't want to have to rewrite the app if it gets popular." - Elixir - "You plan to hire a team to work with You and want to go to market as fast as possible to determine market fit. Also, you don't mind doing a rewrite if it takes off" - Ruby - "You don't want to write much code, and would rather hire a large team to build the app and/or the app is very data focused and will require a lot of data engineering" - Python
I'm pretty biased because Elixir is my favorite language to work in and I really enjoy the community. If I were planning to start a Web App Start-up I would definitely pick Elixir, because it's very productive especially with Liveview so you could get to market fast and it runs on the BEAM so I know I could trust it to scale well. Plus, the developer experience is really nice, with most libraries having great docs and a lot of core team effort being put into tooling. Even if it was a Data Focused app I would still pick Elixir because of the progress being made with libraries like Nx, Livebook and Broadway.
The GoRails team offers some great current videos on Ruby and Rails and their jumpstart starter app (for a few hundred bucks) will move you forward insanely fast. I’ve no connection to them just a big fan coming back to Rails recently. https://jumpstartrails.com/
Hotwire and friends now mean you don’t miss out on adding 80% of js dynamic tricks. Setup a jumpstart project and you’ll actually build a great app much faster.
I recognize that there are definitely ways to scale RoR well (GitHub, Shopify), but the framework is designed to get you up and running as quickly as possible so trade-offs were made in areas that
I would absolutely not choose Django. I would recommend Rails, but I would choose Phoenix.
People choose Django because they only know Python, or they think they are an AI company (usually they are not), or they think the built-in admin/crud pages will save them a lot of time. On the last point, I think they are not at all worth the tradeoffs. The bad reputation that PHP devs used to have applies to Django development in my opinion. It is so common to see 100+ line methods, super tight coupling with the framework, and other amateur implementation practices which add technical debt with every pull request.
Phoenix is great, Elixir is great (especially for the functional behaviors you'll use), and the Erlang OTP foundation is incredible if you ever want to break things down and scale. But you'll have a harder time finding experienced devs at some point unless you're willing to train them or give them time to learn.
Rails is still very good, and Ruby is an incredibly consistent, well-designed language. There are lots of people who know Ruby and Rails, so when you do need to hire or contract some help, you'll find it pretty easily.
I would personally go with Phoenix and Elixir because I think it's an evolutionary step forward, and because it's fun. It's also fun to see views render lightning fast compared to Rails (where unfortunately you have to learn to NOT break things up into many logical partials because each partial adds render time overhead). Phoenix views are compiled, so they can be designed better and still be performant.