Programming Ecto (Pragprog)

My review - continued…

I’ve now finished this book! So here’s the rest of my review :003:

I’ll start by saying that I wasn’t really sure what I was expecting from this book - I mean, how deep can a database library be? Or how involved might it be using one? Of course that was based on my experience with ActiveRecord. Well it turns out a DB library can be more than what you may be used to or expect, and I was very pleasantly surprised by this book as well as Ecto itself.

One of the things I’ve said numerous times about Elixir - that it and the community show us a ‘better way’ - is most definitely echoed in this book! Some of the things I learned that I didn’t know before are that I can create custom Ecto types, or use table-less schemas, or that polymorphism can be handled in several different ways - all with different pros and cons.

I also learned about upserts and transactions and as I mentioned in the book club thread, there was a very welcomed chapter on application design which covers separating the Pure from the Impure, (Phoenix) Contexts and Umbrellas! I really wasn’t expecting to see that in a book about Ecto and it was definitely very much appreciated.

I also enjoyed the chapter and details regarding Phoenix, and I agree with @peerreynders that it may actually be beneficial to read this book before Programming Phoenix (or as I did, after the initial part of it) - it is so easy to read and doesn’t require much cognitive load if you are already familiar with the basics of SQL and something like ActiveRecord, so you will finish it in no time!

Miss this book at your peril! It will show you why Ecto is different… and why Ecto guides you down a ‘better’ path. Isn’t that in part why we came to Elixir?

Well done @darinwilson and @ericmj (and for all your work on Ecto!) :023:

5 Likes