patrickbucher

patrickbucher

How much "Elixir in Action" (i.e. OTP) to get started with Phoenix?

I worked through the first six chapters of Elixir in Action (Third Edition), ans so far absolutely like the book. The first four chapters are about the language, and chapters five and six are about concurrency primitives and generic server processes.

However, starting with chapter 7, the book is mostly about OTP, which is a bit overwhelming at the beginning.

Now my goal is to write some PostgreSQL-backed CRUD applications providing a REST API. How much of OTP am I required to master until I can seriously start working with Phoenix and Ecto?

Most Liked

venkatd

venkatd

From my own personal experience, you do not need to learn OTP, processes, GenServers, etc to get started with Phoenix.

What’s nice is that Phoenix and Ecto both use OTP and processes under the hood. So you’re getting a good amount of concurrency and fault tolerance for free. For example, every HTTP request to Phoenix already spawns a process to handle that request.

A common mistake for beginners in Elixir is to use GenServers when plain Elixir will get the job done.

LostKobrakai

LostKobrakai

I’d argue after the chapters you’ve gone through you’re fine digging into phoenix and ecto. I’d however suggest not dropping the book. Even if things might go over your head right now there will come the place where having read about those things will become something you need.

vkryukov

vkryukov

Personally, I would read at least chapters 7-10, it’s not as hard at it might seem, and explains important concepts.

You could probably start writing Phoenix apps right aways with your current knowledge (plus asking your favorite LLM to explain certain aspects from time to time), but having the right understanding of fundamentals is very very useful in the long term.

You can also just skip the hard parts and continue reading; the things will get progressively easier once you revisit the book after some real experience with the language.

patrickbucher

patrickbucher

Thanks for the answers. So a reasonable compromise would be to give chapters 7-10 a quick read, start working with Phoenix and Ecto, and then coming back to those chapters for a deeper read.

AstonJ

AstonJ

I agree with the general sentiment in this thread.. just finish the book - it will be well worth it :icon_biggrin:

If you get overwhelmed when reading a chapter don’t be afraid to restart it/take a step back. Whenever I read a book I have a general rule that I make sure I understand everything as I am going and I do not proceed unless what I’ve read makes sense. If it doesn’t, I will re-read it or restart the chapter or even quickly skim through what I have read in the whole book just in case I forgot something. Most good books will usually build upon prior chapters ensuring you know everything needed to tackle what’s next in the book.

You might also want to read it concurrently with Programming Elixir - when I read them I felt they both complemented each other very well.

The tips on my blog might also help:

Where Next?

Popular in Chat/Questions Top

ericdouglas
I think that would be really interesting to have official books created by the community about all kinds of development we can do with El...
New
Fl4m3Ph03n1x
Background I have been reading quite a lot about design and architecture in Elixir and overall FP. My latest incursions took to me the On...
New
markdev
What are the best beginner resources for learning Elixir and OTP (not Phoenix) in 2018?
New
New
mchean
I was wondering if anyone is using some learning tools that they can recommend? I’ve been looking at two specifically so would also be ...
New
makeitrein
More Ecto questions! More madness! The context: there’s a list of books that I want to filter with a dropdown… The dropdown: looks some...
New
tom_s
Hello Elixir Community! I’m new to functional programming in general and to Elixir in particular but I’m very intrigued and would like t...
New
woohaaha
I’m coming from Ruby and Rails. I have read some Elixir and Phoenix books. They shed a lot of light about building applications in Elixir...
New
Besto
I've been trying to start learning Elixir for a couple of weeks while I develop a tiny project I have on node.js, but every time I try to...
New
logesh
Could someone provide a learning path for functional programming for who came from oops background.? Thanks in advance
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement