Functional Web Development with Elixir, OTP, and Phoenix
Craft GraphQL APIs in Elixir with Absinthe
I’m in the middle of Programming Elixir and really liking it so far. My goal is to build an API service for a mobile app. With all these books, is it worth to also buy The little Elixir & OTP Book? I’ve read some reviews about it and everyone recommends it.
Think both of these goes deeper into OTP than any of the books you list - depending on the complexity of your api service you might not need that much “OTP” - but it’s always good to have an understanding…
I’ve read both The Little Elixir and OTP book and Elixir in Action and IMO Sasa Juric’s book was more valuable to me. It also contained less errors, I had numerous issues with The Little Elixir and OTP Book and even contacted the publisher.
They both cover Elixir in a different manner, and The Little Elixir and OTP is older than second edition of Elixir in Action. As Elixir has gone through a lot of change since 2016, it would be fair to compare with first edition of Elixir in Action.
I really enjoyed the little book on OTP, because it explains a real world example. It’s hard to go through the code, and some part are deprecated (eg. the use of simple_one_for_one supervisor, now we have dynamic supervisor), but it teached me a lot more on processes communication than any other books.
One could argue that they compete in the same space; they target the programmer who is learning Elixir but they do have a different emphasis once you get past the introductory material.
To me Programming Elixir feels more like a tour of “Elixir, the Language” with some basic “functional programming is quite different” lessons. Elixir in Action drives briskly forward with FP, then gets BEAM-y by discussing the concurrency primitives to then quickly switch over to GenServers and Supervisors and how to build applications with them (Chapter 11.3 Building a Web Server). Of course there are tradeoffs - for example Programming Elixir discusses how to program some basic macros while Elixir in Action merely acknowledges their existence (Don’t Write Macros But Do Learn How They Work). Elixir in Action pursues “thinking and programming BEAM-style” much harder which I personally like but that isn’t necessarily to everybody’s liking or benefit.
I have a friend that has the first edition, is the second edition worth getting or I’ll be fine with the first?
There’ll likely be multiple opportunities this month to score a 50% discount on the manning site - if you are going to spend your time working with it, it’s likely worth to get hold of the updated version given that Elixir has evolved quite a bit since 2015. Depending on how far you have progressed with Programming Elixir you may be able to drop in at Chapter 5 Concurrency Primitives to then quickly get to the meat of things.
I bought the book and I’d say it’s worth starting from the beggining if you read Programming Elixir. The first chapters provide very useful information that is not present on Programming Elixir. Chapter 3 can be skipped but all the other chapters seems to complement Programming Elixir
Having finished Elixir in Action by now, my opinion is that this is a must-have book for learning Elixir. The book is way more complete than Programming Elixir, and provides super valuable info about process registry, supervisors, ETS and much more. The book is filled with insights about the nature of BEAM and distributed applications. The only thing that was missing is how to make live upgrades/downgrades, which is briefly mentioned in Programming Elixir, and Macros. However, the author explains Macros in depth on his blog, even better than in Programming Elixir.
Now I’m in the middle of Functional Web Development with Elixir, OTP and Phoenix, then I’ll read Programming Phoenix and Programming Ecto and will give more info about what I learned when I finish them