AstonJ

AstonJ

Programming Phoenix LiveView Book Club!

Welcome to our Programming Phoenix LiveView Book Club! :048:

The book was recently updated for Phoenix 1.7 and LiveView 0.18 so we thought it was about time we had a book club on it!

The book cub is being led by @code-shoily and @mariusbutuc and participants are:

Everyone is welcome to join the book club or to simply comment on anything you find interesting :023:

Most Liked

m4hi2

m4hi2

Hello everyone! Looking forward to mastering Live View with you all! :smile:

ericdouglas

ericdouglas

Just started today reading the book! :tada:

I’ll share my learning strategy so maybe it can be useful to someone.

It consists of 4 steps:

  1. Read/watch the resource
  2. Copy the resource
  3. Transform the resource
  4. Build a project to validate and consolidate what I learned

1 - Read/watch
In this step, I consume the resource “passively”, without coding.

If I found the content not so good in this first step, I finish there and do not go to the next steps…

2 - Copy the resource
In this step, I copy the content (code) in the exact way the author of the book/course created it. Do not fight with the content. It also prevents you to make a small variation that later will become incompatible with the previous work.

3 - Transform the resource
In this step, I consume the resource again, but now creating a new project that is similar to the one taught. This will force your mind a bit but not too much…

E.g: the book taught you to create a to-do list, so in this step, you will create a book management system, something slightly more difficult.

4 - Build a project to validate and consolidate what I learned
In this final step, you should think about a new project that will use what you learned and maybe add some additional features to go beyond a little more to push your knowledge a little more and help you internalize better what you studied.

Tbobbe

Tbobbe

Chapter 3

Fantastic chapter! It is basically a chapter about structuring Elixir software, and some very valuable concepts are introduced.

The most important takeaway for me from this chapter was the concept of the Context and the Core of a resource.

The Context

The context is the API to the resource, every interaction with the resource goes through the context module (in this case the Products module). Every unpure function goes here (functions that can perform I/O, might fail, etc.). The with function can often be put to good use in the context.

The Core

All pure functions go here. The schema, query builders, etc. Core functions are often suitable for piping.

Best quotes of the chapter:

  • “The Context API is with-land”
  • “The Core is pipe-land”

Now, in the code used so far, the context and the core is very easy to separate since it’s just the Products module and the Product module. I hope the book will keep referring to these concepts as the application grows.

Next up is the frontend in Chapter 4 :smiley:

Where Next?

Popular in Discussions Top

vans163
So useless benchmarks aside, Its possible to write a webserver that can serve 300k requests per second (perhaps more with optimizations)....
New
jesse
Hi everyone, I hesitated to post this here because I don’t want you to think I’m spamming, but I’ve been working on a Platform-as-a-Serv...
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
shishini
I think this twitter post and youtube video didn’t get as much attention as I hoped I am still new to Elixir, so can’t really judge ...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
scouten
I’m looking for a host for the server part of a small (personal) side project that I’m working on. It’s currently written in Node.js and ...
New
New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New

Other popular topics Top

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
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31194 112
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement