brainlid

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

Sebb

Arrr good stuff. Only a deleted line of JS-code is a good line of JS-code.

11
Post #2
mgibowski

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

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.

Where Next?

Popular in Blog Posts Top

SmartLogic
Season four of the Elixir Wizards podcast launches today! This season we’re focused on system and application architecture. We’ll be doin...
New
brainlid
Livebook was created for machine learning in Elixir but Livebook isn’t limited to machine learning. I found it works really well for docu...
New
fredwu
Hi folks, I wrote a blog post the other day on how I built my MVP in 3 months whilst having a day job, using Elixir/Phoenix/LiveView. Th...
New
RudManusachi
Hi there! Recently I was playing around with extracting and updating data in the DB and for fun challenged myself to try to implement a ...
New
paulanthonywilson
Following up on the previous post on using UDP multicasting to broadcast and detect peers on a network, I create a registry of those peer...
New
ragamuf
Does the world need another How to create a blog article? Maybe not. But then again, creating something out of nothing is what we love....
New
aymanosman
The desire to produce structured logs is common. In this article, I will survey the major approaches one could take to achieve this goal ...
New
hauleth
I wanted to write down some of the main guides I use when writing Elixir tests, so I have summarised them in blogpost. Furthermore, I th...
New
AstonJ
Update: How to use the blogs section You can post in one of the Official Blog Posts threads (like this one), or, via Devtalk and a new t...
New
davydog187
Hello all! I wrote a blog post called Elixir Observability: OpenTelemetry, Lightstep, Honeycomb. The post post covers how to integrate ...
New

Other popular topics Top

New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement