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

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
lc0815
hello from a real frustrated newbe… I’m reading this article Full-Stack React With Phoenix (Chapter 3 | Introduction to Phoenix) by mich...
New
markdev
What are the best beginner resources for learning Elixir and OTP (not Phoenix) in 2018?
New
eliottramirez
Hello, I’m trying to learn Phoenix but I constantly find difficult understanding how the framework works, and I think part of this is th...
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
davearonson
I am looking for smallish problems to solve, using Elixir concepts beyond the basic syntax and concepts of Elixir as a language, such as ...
New
ggwc82
Looking to get started with FP and Elixir coming mainly from an OOP Rails and PHP background. My first question is, whats the best cours...
New
zervis
Hello, I’m about to dive into web development. I was thinking about Laravel or Ruby on Rails, but then I found Phoenix. Do you recommen...
New
AstonJ
It’s been a while since we asked this - I’m sure others (especially newcomers to the language) will be interested to hear how you’ve all ...
New
pdgonzalez872
Do we have a list of academic/research papers: about Elixir/Erlang? that use Elixir/Erlang? about the Beam? If so, could you please po...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New

We're in Beta

About us Mission Statement