Hacker News new | ask | show | jobs
Rails and Hotwire, Phoenix LiveView or Django?
22 points by olepunchy 1500 days ago
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!

5 comments

Definitely pick the one you are most familiar with, if you're planning to write a lot of the code.

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.

I’ll bite. Rails is not dead yet and will get you very far. There’s still good resources around and so many things you’ll want to do are already solved in logical ways.

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.

Don't get me wrong RoR is great and it is definitely the fastest way to get a project out the door and in front of your users. I've just seen what happens when that project takes off and you end up with a massive monolith that you're paying through the nose to support with the biggest RDS DB available, and every change you make has a 50/50 chance of introducing a bug somewhere else in the system. Then, because of those issues, you decide to split up the monolith into microservice, but you have a bunch of RoR engineers that have been working with monoliths their entire careers so you end up with a distributed monolith that's even harder to change and requires coordinated deploys.

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

Edit: Trade offs were made in areas that make it fast to build simple apps, but don't lend themselves well to apps at scale. "Rails Magic" in a simple app becomes "Rails Witchcraft“(arcane and dangerous) in a complex app
Good breakdown, thank you. Seems like a number of Ruby people have moved on to Elixir and Phoenix. Interesting stuff. Appreciate it.
Some have but Elixir's community is still small, and not growing that fast at all anymore imo. I wouldn't pick Elixir because it's more popular than Ruby, its not the case and probably never will be.
Having used Rails mostly, Phoenix for a couple of projects, and Django now at my current startup.

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.

Elixir/Phoenix/LiveView - pros: Phoenix / LiveView would scale very well data/app wise. Fast. Elixir language is at this point set with little to no breaking changes. - cons: Elixir is harder to write at scale. Functional paradigm is sanitary but at a cost of flexibility. Phoenix/LiveView constantly introduce breaking changes. A fraction of Phoenix devs will know LiveView (but can pick it up quick).
Can you elaborate on why elixir is harder to write at scale
The one that I was most familiar with
</thread>

Seriously, 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.

The one you’re most familiar with and the one that has the most sdk and library support. It’s one of the reasons I always start with nodejs. Everything I’m going to need has already been figured out and published. Everything I will need… hopefully I get funding lmao.