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

juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
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
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
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
jam
This was an interesting post by Jose. Curious to hear what others think. Evolving programming languages in the AI era - Dashbit Blog Gen...
New
sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New

Other Trending Topics Top

mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews