Live data from Hacker News

Phoenix LiveView 1.2

phoenixframework.org

21–30 of 62 posts

Re: Phoenix LiveView 1.2

#21
post #6
post #5

Earlier quoted context omitted.

But it doesn't have neither AOT nor JIT.

elixir/erlang gets compiled into beam byte code. It's a vm. why does this matter..

It's an interpreted byte code run (interpreted) by BEAM. Not a native binary run by CPU.

But apparently BeamAsm JIT solves the issue? As mentioned in the sibling comment.

Re: Phoenix LiveView 1.2

#22
I've been using Phoenix for super basic things for a very long time since I first discovered it at the Elixir meetup in ATX.

I haven't touched it in a while, Since writing code these days, as most of us know, it's basically steering an LLM.

So I wonder how good are LLMs at writing Phoenix or Elixir so to speak? Time for me to create another side project... and figure it out.

Re: Phoenix LiveView 1.2

#23

Earlier quoted context omitted.

TLDR; LiveView is web only. There have been efforts to make LiveView native, but it’s extremely difficult to do so, and thus far (to my knowledge) all have failed. I was thinking about this the other day because carsandbids (Doug DeMuro’s car auction site) uses Blazor (at least as far as I can tell). And I think that’s one of its biggest advantages of Blazor—- is that it is capable of producing native apps and web ap…

I am a fan of the idea, but the websocket is also quite a big attack surface; you can do a lot more by sending messages over this socket to your phoenix app than you would likely expect to have exposed via some api on another framework. It’s difficult to secure, in my opinion. Perhaps not impossible but the cost of doing so pretty much eclipses the benefits of using liveview imo.

Why? It's the client that initiates the connection.

Re: Phoenix LiveView 1.2

#24

I've been using Phoenix for super basic things for a very long time since I first discovered it at the Elixir meetup in ATX. I haven't touched it in a while, Since writing code these days, as most of us know, it's basically steering an LLM. So I wonder how good are LLMs at writing Phoenix or Elixir so to speak? Time for me to create another side project... and figure it out.

They were pretty good a year ago, so I am sure it is even better than that now.

Re: Phoenix LiveView 1.2

#25
I like this familly of technologies. Having an SPA-type app that's mostly backend.

Recently i've redone my app website (https://alt-tab.app), and I implemented a minimal spa.js that has a similar approach. I find the end result blazing fast, simple to maintain / reason about, few moving pieces. I used Early Hints, compressed every single thing, inlined CSS, etc. I don't know how i could even make it faster.

I recommend this approach for websites that are not very complex. Of course if i made a browser-based music player with a super dynamic UI, that would have been a different story~

Re: Phoenix LiveView 1.2

#26
post #2

LiveView is such a breath of fresh air, especially over the vibe coded NextJS rats nests that have become the norm (that need specialized hosting, are dog slow and require a ton of proprietary paid services bolted on like caching, background workers and even auth which Elixir and Phoenix provide out of the box). https://elixirisallyouneed.dev

> specialized hosting

What do you mean?

My private next.js fullstack slop runs dockerized on my kubernetes cluster and for auth I use auth0, because I am too lazy to run keycloak or whatever dockerized auth slop is currently en vogue.

Re: Phoenix LiveView 1.2

#27
post #25

I like this familly of technologies. Having an SPA-type app that's mostly backend. Recently i've redone my app website ( https://alt-tab.app ), and I implemented a minimal spa.js that has a similar approach. I find the end result blazing fast, simple to maintain / reason about, few moving pieces. I used Early Hints, compressed every single thing, inlined CSS, etc. I don't know how i could even make it faster. I recom…

Very cool concept with AltTab. Have always been looking for something like it!

Re: Phoenix LiveView 1.2

#28
post #25

I like this familly of technologies. Having an SPA-type app that's mostly backend. Recently i've redone my app website ( https://alt-tab.app ), and I implemented a minimal spa.js that has a similar approach. I find the end result blazing fast, simple to maintain / reason about, few moving pieces. I used Early Hints, compressed every single thing, inlined CSS, etc. I don't know how i could even make it faster. I recom…

Can't the website be literally static HTML for 99% of it? I don't really see any user defined input that would change the output.

It's really fast, and seems fine, but is it just static pages? If not, why not. That's the question most front end devs don't ask themselves enough.

Re: Phoenix LiveView 1.2

#29
post #3

What are the pros and cons compared to ASP.Net/Blazor?

Many people love liveview.

Many people dislike blazor and it has had its reputation sullied by Microsoft treating it as “new webforms” (yes, they do. It is literally the official migration path for legacy webforms projects).

The pro of blazor, arguably, is c# and the .Net ecosystem.

If I personally had to choose, I wouldn't choose blazor over almost any other technology because I’ve had bad experiences with it.

Technically, they're very similar, but the devexp matters, in my oppinion.

Re: Phoenix LiveView 1.2

#30
post #25

I like this familly of technologies. Having an SPA-type app that's mostly backend. Recently i've redone my app website ( https://alt-tab.app ), and I implemented a minimal spa.js that has a similar approach. I find the end result blazing fast, simple to maintain / reason about, few moving pieces. I used Early Hints, compressed every single thing, inlined CSS, etc. I don't know how i could even make it faster. I recom…

Can't the website be literally static HTML for 99% of it? I don't really see any user defined input that would change the output. It's really fast, and seems fine, but is it just static pages? If not, why not. That's the question most front end devs don't ask themselves enough.

> I don't really see any user defined input that would change the output.

I feel like the distinction between static websites and SPAs has been lost in the last decade, despite it being in the name _single page application_.

The point of SPAs is not "it's more interactive than a static website is", but "I don't need to fetch the new page and wait it to load as I navigate". You can have any custom behavior just by adding JavaScript. That's something we have from 30+ years.

"applications" don't interrupt the user as you navigate, and we tried to replicate that on the browser, by having history and render JavaScript controlled.

Post reply on HN