Hacker News new | ask | show | jobs
by rattray 3651 days ago
Thanks for sharing!

What are the biggest pros/cons you've encountered so far? What do you miss from Django? What do you wish Django could copy from Phoenix?

2 comments

I'm still learning, but I've already noticed some incredible response times. Phoenix is very fast. I wish I had actual numbers to give you that compare to Django but I'm just not that far along yet.

Elixir as a language is very nice. This is my first taste of "functional" programming and I really like it. Shifting my mindset from object-oriented has been difficult, but I find the code I write much more straight-forward so far for the types of apps I will be building.

What do I miss? Maturity. Django dotted its Is and crossed its Ts a long time ago. I wouldn't say Phoenix is buggy at all—I think it is production ready—but the recent work Django has been doing with things like Postgres libraries are several steps ahead of where Phoenix is at today. Also, Django documentation is bar-none.

There is nothing about Phoenix that jumps out at me and says "Django would be so much better if it had this!" Maybe Presence will be one of those things, but I have not had a chance to play with it yet. I am excited about how Elixir (on top of Erlang OTP) scales horizontally with virtually no effort, which is something that Python cannot replicate as easily without a lot of thought and some sort of bolted on message db—and in the end, slower. The robust concurrency story (and what that could mean long-term) is exciting to me.

I found Ecto to be one of the best Postgres libraries out there.

What do you miss from Django's Postgres libraries in Phoenix/Ecto?

Another Django -> Phoenix dev here. Currently I miss Django's model field types (UrlField, EmailField, etc) and will probably write them if no one else does soon. I sometimes miss South style migrations when I'm prototyping but doubt there's a good reason to implement them in Phoenix. For building JSON APIs JA Serializer is a quite capable alternative to DRF-JA.

For the Django Admin there's ex_admin which I haven't used yet but it appears to take a bit more work than the Django Admin does.

I haven't felt like virtualenv + pip was too bad for deps and deployment but exrm is already comparable/easier with an even better `mix release` planned for this summer/fall. No uwsgi or gunicorn to configure and even nginx can be skipped.

For the last part of your question: the biggest thing missing from Django was a good way to do websockets. Django has channels now but I doubt they'll work like Phoenix/OTP/Erlang (especially in the concurrency and fault tolerance categories).

Is it common to skip nginx or insert-your-reverse-proxy-of-choice-here?

I'm working on a Phoenix app, getting close to being ready for a beta deployment, and I was just looking for best practices as far as putting it in production.

From what I've read (I'm not an expert either) nginx is completely optional. Cowboy (used by Phoenix) supports https termination and I understand that it's the router for Heroku so it sees plenty of traffic.