|
|
|
|
|
by mike1o1
742 days ago
|
|
I've been using Elixir as a backend for a side project (with a Remix frontend) and it's been really pleasant and productive to work with on the backend. I appreciate how productive LiveView can be, but for my specific case I needed to handle poor network connections and LiveView was (as expected) a poor experience. I wish Elixir was able to decouple itself from LiveView in a sense in the minds of developers. Even without LiveView and realtime/channels, just using Elixir as a backend for a simple API has been really fun. |
|
I just can't do liveview. I have a very hard time grokking it, and it has a lot of footguns. (ex: if you need to remember to perform auth checks both doing a `pipe_through` in a router and using the `on_mount` callback in a LiveView, see [0].)
In fact, the fact that the above sentence has zero meaning to a new-to-phoenix-and-liveview dev is proof enough to me that liveview should not be the default way of doing things.
It creates a very steep learning curve where, crucially none is required. elixir/phoenix are easy.
I would even say that the correct learning order for a new-to-elixir/phoenix dev should be:
- Phoenix with deadviews (MVC style).
- "Elixir in action" to learn the basics of OTP. This book is was both easy and utterly eye-opening to me and changed the way I code basically everything.
- Then, and only then, LiveView.
[0]: https://hexdocs.pm/phoenix_live_view/security-model.html#liv...