diff options
author | EuAndreh <eu@euandre.org> | 2019-06-08 19:32:03 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-08 19:32:03 -0300 |
commit | 70973b28c85eed27c589282fe13a0b86be2ccae8 (patch) | |
tree | b91cff5291cf0c834f26cce99418bd0f599e145d /drafts | |
parent | Pastebin: add link to derivation source (diff) | |
download | euandre.org-70973b28c85eed27c589282fe13a0b86be2ccae8.tar.gz euandre.org-70973b28c85eed27c589282fe13a0b86be2ccae8.tar.xz |
WIP: work on phoenix post
Diffstat (limited to 'drafts')
-rw-r--r-- | drafts/2019-05-06-book-review-programming-phoenix.org | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drafts/2019-05-06-book-review-programming-phoenix.org b/drafts/2019-05-06-book-review-programming-phoenix.org index 15c5bb6..62ba18a 100644 --- a/drafts/2019-05-06-book-review-programming-phoenix.org +++ b/drafts/2019-05-06-book-review-programming-phoenix.org @@ -2,9 +2,19 @@ title: Book review - Programming Phoenix date: 2019-05-06 --- -Book review: Programming Phoenix +I've recently finished reading [[https://pragprog.com/book/phoenix/programming-phoenix][Programming Phoenix: Productive |> Reliable |> Fast]] by Chris McCord, Bruce Tate, and JosĂ© Valim, and I wanted to share my impressions on it. + +Overall I liked the book, and it incentivized me to keep learning about Elixir, Phoenix, Erlang and OTP. After a few years working with Clojure and using functional programming techniques daily, Elixir feels very natural, and it met many of my expectations, like having persisten immutable data structures, or have smooth interop with Erlang. + +IO bound[fn:io-bound] +This is a format +https://git.sr.ht/~euandreh/songbooks + +feed ** Part one: functional MVC -The first chapters really give a proper introduction to Phoenix. The first steps are to write down every line of code, from Ecto schema to view helper. +The first chapters really give a proper introduction to Phoenix. + +The first steps are to write down, as I learned later in the book, every single line of code that the default Phoenix scaffolding tool would generate, from Ecto schema to view helper. I liked this approach of showing what task needs to be accomplished before introducing a tool that automates the task. It gave me a stronger understanding of what code was being generated, and empowered me to change the later generated code. On chapter X the =mix gen.html= was introduced, but only a as shorthand way of writing some of tue setup code from the provided input. I really liked that. It used scaffolding not as a magic wa Ășltima of generating the all the code of your application, and it wasn't promoted that way. Not only that, after all the steps, I could read all of the generated code and say: "well, I could've written that!" (Which is what I imagine was the authors goal). @@ -21,3 +31,5 @@ It was interesting to see how Phoenix embraces OTP and builds o top of it. Inst From Building a simple GenServer to having authenticated channels, I felt that the Phoenix solution towards persistent connections is pretty elegant, and chapters X, Y and Z presented it very well. I noticed the same functional mindset from Plug as chaining of functions present in GenServers and channels, as an state is the previous state plus a function. ** Conclusion Overall, I liked both the book and the framework, and would readily recommend it to someone interested in learning Phoenix. + +[fn:io-bound] I'm using an oldish computer with HDD to write this piece, and it is now running with very low CPU load but stuck at writing to the disk some email indexes from [[https://notmuchmail.org/][notmuch]]. IO bound. |