LiveView vs. Astro 3.0

Astro 3.0 dropped a few days ago and there seems to be a decent amount of hype in the broader webdev community around many of its new features.

This video provides a pretty extensive breakdown (and a lot of said hype).

Looking through the release, there seems to be some genuinely awesome stuff – support for the new View Transitions API and their story for Image Optimization via easy CDN integration seem particularly compelling.

As someone who loves Elixir/LiveView, but hasn’t had the chance to work extensively with either in a professional environment (yet), I’m curious to hear some thoughts from the more experienced members of the community…

How does LiveView today compare with Astro 3.0 (and perhaps the server-side JS world more broadly) in your eyes? Are there any features Astro now offers that you wish could be added to LiveView, or even features compelling enough to get you to switch? Is there any reason LiveView couldn’t (or shouldn’t) do everything Astro now does?

Personally, I’d almost certainly choose LiveView when I have complex needs on the back-end and want tight integration with the BEAM, but then (reluctantly) reach for something like Astro when I have a simpler back-end and care more about building a flashy front-end for my content.

Curious how y’all feel!

7 Likes

I’m using Astro to generate the company and marketing website for a LiveView app :v:t2: Terrific experience and the combo for the different purposes fits great so for.

:otter:

4 Likes

Biggest drawback is that I would have to use JS/TS and all the other “fun” stuff that comes with that
:sweat_smile:

10 Likes

Nice! It’s cool to hear that both tools can be used side-by-side successfully.

So is Astro simple enough to use that context switching between it & LiveView isn’t much of a problem? Or do you have separate teams working on each?

1 Like

Oh I completely agree – tho I have to admit… Some of the transitions on their demo app just might be slick enough for me to take on a little bit of JS/TS pain :sweat_smile:

1 Like

Well, the company and marketing site is so basic and simple, that thus far we’re talking about a mobile menu show/hide and a contact form validation.

Not having to do the whole React thing was so nice. The Astro components can be kept so simple. It’s more than enough for such a project. Getting started was easy peasy :lemon:

Coming from that angle, I myself wouldn’t have considered Astro over LiveView for anything else than a very simple use case. Others I guess would be more happy to do something more ambitious.

2 Likes

View transitions :heart_eyes:

2 Likes

Astro is explicitly not targeting the same group of projects as LiveView:

Astro was designed for building content-rich websites. This includes most marketing sites, publishing sites, documentation sites, blogs, portfolios, and some ecommerce sites.

By contrast, most modern web frameworks are designed for building web applications. These frameworks work best for building more complex, application-like experiences in the browser: logged-in admin dashboards, inboxes, social networks, todo lists, and even native-like applications like Figma and Ping.

4 Likes

Would it be feasible to use view transitions with live view? (I know next to nothing about how it works).

2 Likes

In theory nothing would prevent that. But afaik chris stance is that he won’t use features in LV, which are not available cross browser or are otherwise in draft status. But LV could provide callbacks to allow for manually adding view transitions.

6 Likes

9 Likes

I’ve been tracking the view transition API, but it’s chrome-only so not really something we’re targeting until it gets broader adoption. In general I’m open to adding evergreen features that aren’t supported everywhere, but they have to at least be standardized. Last I checked view transitions were still in the experimental stage. Very slick transitions tho. If someone has the time, we could explore what kind of interfaces LiveView would need to open up to allow a third-party lib/user-land to provide view transitions for live navigation until things become standard.

32 Likes

Edge now too apparently, FWIW.

Nevermind me, somehow hadn’t realized Edge uses Chromium :slight_smile:

2 Likes

And Opera, apparently!

I’m genuinely curious where this hype is occurring as I haven’t seen anything on Hacker News or Reddit, which are my go-to places for tech buzz. Astro seems pretty interesting though.

1 Like

Those animations are top notch. If LiveView can pull that off without jumping through major hoops that would be a game changer.

5 Likes

I’m mainly seeing it in the YouTube/Twitch developer communities (which I think overlap considerably with Twitter but I can’t confirm because I don’t go there often).

Probably a separate bubble than the HN/Reddit communities.

2 Likes

There is a considerable hype in the frontend community. But I agree I didn’t see anything about astro3 on HN.

FYI: Both WebKit and mozilla are supporting the transition API:

WebKit/standards-positions#48

mozilla/standards-positions#677

It’s only a matter of time, and I think that adding support just the way Astro did (with a small js lib loading when a browser that doesn’t support view transtions) is a good way to pressure other browser to adopt it.

2 Likes