5 ms·
Agree with all you said, except for the ORM part. Ecto is good but I think the Django ORM does it better. The ORM in Django[0] is dead simple and easy to under
by POiNTx 3y ago
Agree with all you said, except for the ORM part.
Ecto is good but I think the Django ORM does it better. The ORM in Django[0] is dead simple and easy to understand. The only caveat being that Django doesn't have changesets, which I do like.
It also integrates nicely with the Django Admin. You setup your models, and you can very easily generate an admin interface to CRUD on those models.
One annoyance I have with Ecto is that migration files are handwritten. There's a generator tool, but it only gives you a skeleton migration that you then have to manually fill in. This gives you 2 sources of truth, which is error prone. Automating this process like in Django solves this issue.
Ash[1] (which uses Ecto under the hood) does solve most of these issues, although at the moment the documentation can be hard to navigate.
[0] https://docs.djangoproject.com/en/4.2/topics/db/queries/ https://docs.djangoproject.com/en/4.2/topics/db/queries/
[1] https://ash-hq.org/ https://ash-hq.org/
- melx 3y agoDjango ORM is nice but too simple for some advanced examples. Tried to solve some Postgres CTE in Django? Good luck.
- sph 3y ago> Ecto is good but I think the Django ORM does it better. Oh no, I strongly disagree. I know both very well, and Ecto is much better and flexible. SQLAlchemy was great, when I last used it two aeons ago, but still subpar compared to Ecto. But also apples and oranges. Django has an ORM (i.e. stateful), Ecto is a stateless data mapper.