You have to draw the line somewhere. I think that in liveview’s case, the abstraction level is pretty OK for most of web needs. Obviously if you venture into the hooks and frontend logic territory, all of this becomes a mess really fast. You can usually spot liveview projects that are bound to fail by the number of hooks they use.
I am not entirely sure about that. Yes phoenix provides firsthand integration with ecto, but I’ve had cases where I was using ecto embedded schemas to get the validation power without a need to couple to a database.
I am a big fan of SQL and database engines such as postgres for multiple reasons, but it’s clear as day that distribution is not one of its strong suites. I am actually not a big fan of key/value stores or nosql databases such as mongo, as a lot of logic that was implemented and standardized by SQL you will have to do by hand in your application code. At my last job I’ve had to work with mongo and the only thing I can say that it is a much worse version of postgres, those JSON queries they have are horrible and overall performance is too.
As for code organization, I think that it’s possible to make good boundaries in your application and to not sprinkle ecto stuff everywhere. I understand your frustration and I have personally worked with codebases that failed to do that and it can get hairy. I’ve also worked not so long ago in a codebase with 20K+ source files where the queries were neatly contained in their own boundary, but that project is beyond what solo developers can build, as it had a ton of various custom linters and credo checks to ensure this consistency.






















