brainlid
Elixir Blog Post: Plucking the "A" from PETAL
This post asks if we can remove Alpine from the PETAL stack. Can we do everything we need with just LiveView? Also, let’s explore an area where LiveView can still improve.
Most Liked
Sebb
Arrr good stuff. Only a deleted line of JS-code is a good line of JS-code.
mgibowski
Furthermore, once Phoenix v1.8 arrives and starts using TailwindCSS by default, I don’t think calling this stack anything more than just LiveView is very useful…
The acronym PETAL played it’s role before, when we had to compose our own stack on top of LiveView.
Now, as LiveView comes with all the necessary elements built-in (JS commands, TailwindCSS set up by default), I think the PETAL acronym can be retired and we don’t need any replacement for it.
trisolaran
Same here. I never understood the appeal of AlpineJS for a LiveView project. When I started using LiveView (long before LiveView.JS) I decided to use JS hooks to keep things simple, cause I didn’t want to add a JS framework. Later on, because everyone was talking about Alpine, I gave it a try out of curiosity. I tried to replace my hooks with AlpineJS. I really had a hard time trying to make it all work, and I came to the conclusion that LV hooks are more flexible and better suited than Alpine for a LiveView project, also because they can hook into LV life-cycle events directly. So I stripped the “A” from PETAL a long time ago. Even more so now that we have LiveView.JS. I suspect Alpine is something so many people were using mainly because so many people were using it.
Popular in Blog Posts
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










