woohaaha

woohaaha

Elixir design and refactoring books

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. What I’m not clear on is what patterns are promoted for growing Elixir applications. Little things are promoted, as far as I can tell, but it doesn’t get too specific. I’m a heavy book consumer and in Ruby the books that I view as extremely well thought out and thorough include:

Rails antipatterns
99 Bottles of OOP
Confident Ruby
Practical Object Oriented Design using Ruby (POODR)
Refactoring - Ruby Edition
Ruby Science
(and the list goes on)

Are there any books in the Elixir world that cover these topics (design, refactoring) as deeply as these books do in Ruby?

Thank you

Most Liked

kokolegorille

kokolegorille

Hello, welcome to the forum.

As I also comes from Ruby/Rails I had the same questions when I started :slight_smile:

But functional programming is not OOP, no object, no classes, and known design patterns doesn’t apply.

It’s just different.

But You might soon see that functional proramming brings You a lot of safety (no mutation) and a different mindset.

Now, when I write Ruby, I try to apply functional paradigm principles :slight_smile:

Here are videos You might enjoy (as I did…)

There is also this recent topic, where some books are recommended…

kokolegorille

kokolegorille

I hope You enjoyed presentations, as they were kind of mind blowing for me.

Here is my 2 cents advises…

  • pattern matching is THE thing
  • |> creates beautiful and descriptive transformation pipeline
  • The Enum module is a must
  • Lists are not arrays
  • Polymorphism can be achieved via protocols

And many more that I forget, all of these You can learn on https://elixir-lang.org

The last advise, for Rails developpers, Ecto is not AR, but You can do equal job… (same same, but different) Here is a post about a free resource on Ecto.

FP is just a mean to achieve greater goal, Here is a post from Erlang creator, about Erlang.

Once You reach the syntax barrier, You will see it allows You to have a complete isolation…

In complete isolation, You can have millions of processes working together. Coupled with a faillback mecanism (Supervisor) You can build softwares that are fault tolerant.

Apart from Functional patterns, there are Design Patterns for processes, it’s called OTP.

kokolegorille

kokolegorille

I took the same way You did, just a bit earlier. As You, I read all the Ruby books You mentionned…

I can remember the depressing feeling of not finding the equivalent of what I learned, all those things Sandi Metz was praising… is it just replaced by MFA?

In Ruby, often You find small objects, used for one function only, that could be parser.parse(), presenter.present()… anything like this. In FP You pass a function.

High order functions are so powerful (something Ruby touch with Lambda) that You don’t need Template, or Strategy patterns.

In Erlang/Elixir, we have some famous Erlangelist… this is one of my favourite talk to understand why this difference is so appealing.

He is the author of Elixir in action, and runs https://www.theerlangelist.com/

Where Next?

Popular in Chat/Questions Top

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
pillaiindu
I am a VSCode and Sublime user and I know VIM, though I don’t use VIM directly but whenever I code inside Sublime or VSCode, I use Vim em...
New
Iex.new
Hello!, I just started this week to discover Elixir. I’m a PHP-Programmer and did some sutff in Go too. The more I read about Elixir t...
New
yachnytskyi
Hello everyone. I am gonna start with Elixir/Phoenix, thinking to use Stephen Grider as a start point, then elixir school and other sourc...
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
Scoty
Hey, I am currently reading Programming Elixir and I am doing one of the exercises where you should write a solution to the “I’m thinkin...
New
Nopp
Hey guys and girls, i am completely “new” to programming, recently played a bit with Python, Ruby and PureBasic, but i want to try somet...
New
koen_vb
Hi, I was looking for a pointer of how I could most easily start with phoenix regarding deploying it to something like linode or google c...
New
maqbool
what books/Resources do you recommend to learn about distributed system(theory)?
New
Fl4m3Ph03n1x
Background I am trying to do the typical Ceaser cypher exercise in Elixir. The description of the exercise is as follows: Create an impl...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
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
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement