Nvim

Nvim

Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help.

  • Where are they similar?
  • Where do they differ the most?
  • When would you use/recommend either?
  • Anything else you’d like to share?

Showing Posts 1 to 10

adrianrl

adrianrl

Phoenix should be faster, at least by default, and a better choice for apps that require concurrency; streaming, real-time collaboration, long-running services… However Django is more established, there are a lot of jobs, books and tutorials.

I think Django is more complete by default, and thus it may be overwhelming at first, it may be worth considering alternatives like Flask, but overall both are easy to understand. I’d suggest you to spend a week with both frameworks building the same project (a simple one), and chose the one that makes you more productive.

AstonJ

AstonJ

I’ve edited your post to try and follow the format for these kinds of threads - hope you don’t mind :smiley:

mikemccall

mikemccall

Based on my current experiences here is my take. I don’t have a comprehensive guide, but beyond handling web request and mostly following mvc they are not all that similar. Django has models and an ORM phoenix uses schemas with Ecto. Django’s use of “apps” fall in line with using contexts but each django app has it own mvc file structure. Which I have to admit I like. Django is also bloated with features and can serve a very wide range of web projects out of the box. It comes with a ready to go admin. Phoenix is explicit while django is implicit. I applaud both Phoenix/Elixir and Django for the excellent documentation.

Both communities are generally pleasant. Phoenix doesn’t take on user land solutions. For example authentication/authorization. Phoenix leaves the decision up to you, while django comes with it (including password upgrading). The elixir phoenix community hasn’t quite caught up with some of the other popular django apps such as Wagtail and saelor. But it will.

That being said django does not even come close to providing the ease of use when working with realtime. The phoenix team has done an amazing job adding realtime capabilities (my biggest pull to phoenix). With phoenix you also get the benefits with running on the beam. Phoenix has liveview which is very nice. I’ve already seen community members of django, crystal, and laravel implement their own versions. But those will not be as scalable.

Overall my default is elixir/phoenix. It’s fast and enjoyable. There are more than enough community packages to rival django. While “user land” decisions are not made for you by the framework itself, the community has fantastic libraries. The elixir community is full of some really smart experienced people. Pow is a good example of this. The elixir community is very happy to guide you in the right direction. You will not only learn and become a better developer, but you will start to realize those framework abstractions aren’t as hard as they might seem.

All that said, phoenix is probably closer to Flask than Django.

If a client needs cms capabilities, e-commerce or they really can’t be sold on elixir I go with django. Otherwise, elixir and phoenix all the way! Hope that helps.

28
Post #3
dimitarvp

dimitarvp

You already were given excellent answers. My really short version is this:

Do you want to have most of what you need ready-made and able to be put in your project with small initial friction? Go for Django.

Do you want to build part of the required functionality (like authorization and CMS) yourself, while retaining full control on what is going on below the hood? Go for Phoenix.


Have in mind though: apps made with implicit/magic frameworks always come with a high maintenance burden. They allow you to start quicker but you pay off those savings in the future, many times over. A lot of Rails and Django apps are an example of this phenomena.

Nvim

Nvim OP

Thanks @AstonJ, good job!

abitdodgy

abitdodgy

What about libs like Pow? Don’t they remove some of this DIY burden?

leaf

leaf

There are already pretty good answers here.

Django(advantages in my opinion):

Comes with admin panel which is very good and have an excellent support.
Include it’s own ORM.
Session support is very good.
Each feature will be broken down into smaller apps by default.
third party library support is good.
More jobs.
Django rest framework is very good for building api’s.

Disadvantages:(In my opinion)

Bloated with lot of extra features.
deployment is little difficult.
No dedicated forum as good as this one.
No built in modules like Gen servers to handle jobs processing.

Phoenix:

Excellent:grinning:
Fast
Not bloated
Excellent built in tools for RTC
Genservers are great to have.
Ecto is very good.

But at the end It all comes down to your needs.

You are building e commerece website . Instead of building admin panel from scratch go with Django saves you a lot of time.

You are building app with lot of background job processing and real time communication go with phoenix.

Hope this helps..

peerreynders

peerreynders

FYI: There is a Python by O’Reilly Humble Book Bundle for the next 5 days.

albydarned

albydarned

Lots of great points in this thread!

If you’re set on Python as a language, I would highly recommend Flask. You’ll start very bare bones, but in the end you will have a great app with only the pieces you really need. I’ve built many apps in Flask and always been pleased with the results. It is very well documented and easy to get going.

Django is great, but gets a bit bloated and hard to maintain when so much is automagically done IMO.

Nvim

Nvim OP

Django appears to have the upper hand in both official and unofficial documentation.

Where Next? Top

Trending in Discussions Top

cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

Other Trending Topics Top

f34nk
Lovely people :victory_hand: I am happy to announce that smithy-beam is published to Maven Central and Hex :tada: Smithy-beam generates...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews