Elixir/Phoenix Liveview was a mistake

I made an expensive technical decision on Phoenix Liveview for the Smol Talk webapp about a year ago that I now regret, and am jotting down some notes to self for why.

To be clear this is definitely a skill issue, but also the learning curve was also just not worth it at all (for somebody already fluent in JS/Python).

What I Did

We needed a customizable summary pipeline platform. I had always admired Elixir and Liveview from afar, and had a friend who was up for building it. So I said yes.

Why I liked Elixir/LiveView

  • I always liked the idea of simple monolith serverside rendering
  • Should be fast and easy to render HTML diffs (kinda like React Server Components)
  • particularly when a nice integration with the ORM makes CRUD views of fields automatic
  • Elixir sounded fault tolerant and fast
  • Oban had a good reputation as a job runner

Reality

Instability/Slowness

Pages were AWFULLY slow to load.

and about 20? 30?% of page loads failed. I’m pretty sure it’s not a database issue, it just is slow as fuck to render a lot of UI.

Image

i felt like i was on dialup.

Image

immaturity of ecosystem

we were able to pick the SOTA things for our app. I count 20 out of 36 of our dependencies (55%) being 0.x versions.

Image

Couldnt do conditional forms

this is related to our choices for dependencies surely but i wanted some ui elements to come up or be addable, conditional upon some other elements. This cost us a week of fucking around with code before giving up and concluding it wasn’t possible without…

Image

Adding JS

to have any clientside interactivity you basicaly want JS. LiveView offers some nice ways to pass data into js components but and the moment you write components you want to write more and more until basically you’re only using Phoenix as an API backend. so you might as well write a SPA.

Godawful errors

i would show you these errors but right now the app isn’t loading so

Image
Leave a reaction if you liked this post! 🧡
Loading comments...
Webmentions
❤️ 0 💬 0
No replies yet. Tweet about this post and it will show up here!

Subscribe to the newsletter

Join >10,000 subscribers getting occasional updates on new posts and projects!

I also write an AI newsletter and a DevRel/DevTools newsletter.

Latest Posts

Search and see all content