Live data from Hacker News

Phoenix 1.7 is View-less

germanvelasco.com

51–60 of 224 posts

Re: Phoenix 1.7 is View-less

#51

Speaking as an amateur programmer, is this like Laravel's livewire or intertiajs with inline blade component? (but in Elixir). Or is this something else?

live view is the original and best.

imitators use long polling to periodically check for updates. liveview spins up a dedicated vm process for each active user and can push updates over websocket to update things. This process can do things like listen for serverside events as well.

Re: Phoenix 1.7 is View-less

#52

Earlier quoted context omitted.

@chrismccord If you’re reading this, would be super interesting to update this 7-year-old benchmark to use Live View (and the latest stack). Thanks for all you do btw.

Could even switch over to Bandit which was on a recent Thinking Elixir podcast > In recent performance tests, Bandit's HTTP/1.x engine is up to 5x faster than Cowboy depending on the number of concurrent requests. When comparing HTTP/2 performance, Bandit is up to 2.3x faster than Cowboy https://github.com/mtrudel/bandit

That’s a great point and Phoenix 1.7 is the first release to support the usage of other web servers.

2-5x speed up would make Erlang surprise Java/Go/etc.

https://stressgrid.com/blog/webserver_benchmark/

Re: Phoenix 1.7 is View-less

#53

Earlier quoted context omitted.

Jose has been working with some PhDs to attempt to implement static typing https://elixir-lang.org/blog/2022/10/05/my-future-with-elixi... In the meantime I don’t know what people have against using @spec. It’s a far more powerful type specification than the majority of static-typed languages out there

> Actually, I think the next big unlock in user adoption is static typing. From reading that post, it sounds like Jose does not believe static typing is needed. But a nice to have to address a very narrow set of use cases that primarily would help for documentation, not bug mitigation.

I think that Jose makes a solid case that static typing doesn’t bring as much to the table to Elixir as most people believe, but enough people point to the lack of it as a reason not to adopt the language that it’s worth addressing. Again, I think @spec is great and people should use it more – just treat the dialyzer warnings as errors.

Edit: Not sure why the downvotes, but the talking points by Jose are on his ElixirConf keynote

https://www.youtube.com/watch?v=Jf5Hsa1KOc8&t=408s

I'm not saying that types aren't a useful addition to Elixir, just that many people have wrong claims as to how they could be a useful addition to Elixir.

Re: Phoenix 1.7 is View-less

#54

I'm building a startup in my free hours using Phoenix Liveview. I can ship features in hours vs days thanks to the simplicity liveview gives me. ZERO react/JS nonsense. I back to writing server side rendered templates with for-free reactivity. Give it a try it's very productive

> ZERO react/JS nonsense.

As someone who knows js really well, I love liveview's hooks system. the js interop is the bees knees and lets me save my js chops for where I really need it. Also, I can emit js events that get picked up server side and vice versa. ie: no having to write any ajax calls. My frontend can react to server events with very little boilerplate. Thats a WAY better proposition than merely zero js.

PS: the frontend buildchain is esbuild so you get out of the box support for typescript.

Re: Phoenix 1.7 is View-less

#58
post #9

People using Phoenix Liveview -- how do you serve native apps relying on the same backend?

like others have said, you'd probably write a JSON API separately. One thing I'll mention though, is that the conventional design of Phoenix to use context modules often makes that very easy, in that your liveviews and API can just call the same business logic functions to crud resources.

Re: Phoenix 1.7 is View-less

#59
post #6

Elixir/Phoenix has hit full-stride. I feel like the next big unlock in user adoption is continued improvements to BeamAsm. Hopefully something on the order of 100-200% raw performance speed up. Note: I’m talking about raw perf, not concurrency. A few other additions to Phoenix 1.7 include: - verified routes - tailwind built in - additional web server support (bandit) https://www.phoenixframework.org/blog/phoenix-1.7-…

Actually, I think the next big unlock in user adoption is static typing. Lack of it is frequently cited as the number one reason that makes people hesitate in switching to Elixir. I know it is an active research project right now, and I hope it bears fruit.

I really don’t get this, personally. I’ve worked in Java, Ruby, Typescript, Elixir, JS, and a bit of Elm and I literally never feel like I’m missing anything by not having static types in Elixir. This is doubly true with web based projects.

What are people looking for that they might get from static types?

Re: Phoenix 1.7 is View-less

#60

Speaking as an amateur programmer, is this like Laravel's livewire or intertiajs with inline blade component? (but in Elixir). Or is this something else?

Pig backing here… is this like Blazor server-side?

Yes, Blazor is inspired by LiveView.
Post reply on HN