Re:Reasons to use Phoenix instead of Rails
by regulation_d on Monday November 27, 2017 @12:59PM
(#15789408)
I really like Ecto for several reasons, but mostly because it makes every database call super obvious. If you Repo.something(), you're probably hitting the database.
A couple other reasons I like it: 1. It's makes shooting yourself in the foot with N+1 queries really difficult. 2. It's not married to Phoenix. I haven't tried this in a while and maybe this isn't representative of the current state of things, but last time I tried to use AR in a non-Rails project, I ended up switching to Sequel gem.
For a nice, if not slightly biased, comparison of AR and Ecto, I recommend Darin Wilson's talk "Thinking in Ecto"[0].
Most people think it's about a faster activerecord, it's not. It's so much more!