7 ms·
The Phoenix docs don't look like they even hold a candle to Django. I spent 5mins in it and still don't know how to define a model. I eventually figured out a d
by winrid 4y ago
The Phoenix docs don't look like they even hold a candle to Django. I spent 5mins in it and still don't know how to define a model. I eventually figured out a doc section called "Ecto" - so i had to know what ecto was to find it. Then, in those docs I still don't know how to define models. Do they expect me to manage my database and schemas separately and generate the models from that?
That's completely opposite what Django does, and that's partly why Django is so productive.
I don't think Pheonix and Django are competitors. They are too different.
- Cyph0n 4y agoI'm not really familiar with Phoenix, but skimming through the section linked below, it seems to cover what you're looking for? Basically, you use a tool to generate your model + migration code and then run the migrations. https://hexdocs.pm/phoenix/ecto.html#using-the-schema-and-migration-generator https://hexdocs.pm/phoenix/ecto.html#using-the-schema-and-mi... As for the comparison to Django, I don't really expect any web framework to have docs at that level. They are simply huge and have been around for quite a while.
- winrid 4y agoYes, I skimmed through that and was surprised to see it be compared to Django. It's different. Django is for building CRUD apps quickly. That's it. It's not for the long haul of super complicated apps, which many projects don't ever reach before they fail/get abandoned.
- Frog0fWar 4y agoI agree that there are better options for long-term maintenance of large projects, but let's not act like Youtube or Instagram don't exist - both of which used Django to some (high at the beginning) degree.
- Daishiman 4y ago99% of line-of-business apps are CRUD. There's nothing special about "super complicated apps" that isn't brought in by the Python ecosystem. Where exactly do you think Django fails in that regard?
- winrid 4y agoI love Django. I just think Python without types makes things hard at scale.
- arrowsmith 4y agoPhoenix doesn't have the concept of a "model". The functionality of what Rails (and I guess also Django? Idk) calls a "model" is split between a few different places: schemas, changesets, queries, the repo. It felt weird at first, coming from Rails, but after getting used to it I don't miss "models" at all. ActiveRecord models in Rails are a vastly overloaded concept anyway and pretty much always degenerate fast into an ungodly mess as your app grows. I prefer Phoenix's approach.
- winrid 4y agoYeah, for a big complicated system, I don't think defining everything in models is great. I don't do that, and it's also not how fastcomments is built. But for simple stuff it's amazingly productive!
- bostonvaulter2 4y agoYou might be interested in the relatively new Ash Framework that builds on top of Phoenix and has much more built in: https://ash-hq.org/ https://ash-hq.org/
- winrid 4y agoThis actually looks like it has a lot of potential.