Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"I recommend you to go with Actix or Axum" ... for what use case? Choice is good. But too many options creates decision fatigue. Really wish the creators/maintainers of Rust would adopt one Web framework and standardise on it so the Rust-curious could have an easier entry point.

That's what I really like about the Elixir ecosystem; Phoenix is the automatic no-brainer choice. Just crack on with building your idea.



> That's what I really like about the Elixir ecosystem; Phoenix is the automatic no-brainer choice. Just crack on with building your idea.

Yes cohesion is great! For C# we have ASP.NET dominance (and Java has Spring?).

At the end of the day our job is to deliver value.


I've been learning .NET recently and there are several choices for building a webapp, such as MVC, Razor pages, and Blazor (further split into server vs web assembly). MVC uses Razor views, Razor pages use Razor pages, and Blazor uses Razor components. MVC without the V is apparently the recommended way to create APIs.

I spent quite a bit of time trying to understand the distinction between these options and when you would choose one over the other, and I would have to disagree that it's a no-brainer choice. Perhaps if you've been in the .NET ecosystem for years and have followed the changes but definitely not if you're new to it.


For something that was released 21 years ago, it's not that complicated:

- Razor pages, views and components use the same templating language.

- If you want MVC you can use Razor views and Components to render things from your Controller.

- If you want something simpler like a website, you can use Razor Pages and Components.

- Blazor is the new shinny thing. It still uses the same Razor templating language but targets for webassembly or Phoenix-style LiveView.

And for APIs, it's just the ordinary Controller -> Action -> JSON as every other framework.


> At the end of the day our job is to deliver value.

If people just saw coding as that, none of this innovation would have happened.


Delivering value and innovation are orthogonal concepts. Sometimes innovation is required to deliver value, but not always.

Take Uber for example, it required no technological innovation (still great feat of engineering of scale).

Meanwhile ChatGPT did.

Both deliver value.


I think Phoenix benefits by being the only game in town, and it's a much smaller town.

Also, there was a moment in Rust history where people near the core Rust community were striving for a std library variant and that didn't go well, politically. There were several options already in the ecosystem and it was a pet project that would challenge incumbents.


After a quick check on crates.io, Axum stands at over 5,000,000 „recent downloads“ which is 5x as much as the next most popular contender, actix-web. Seems to me like the Rust community is already converging towards Axum as the default choice.


you could say the same of rails/python.

the REAL befit of elixir is also that the entire underlying ecosystem is one big toolbox for networked applications and the performance for most web tasks (IO bound stuff) is on par with rust.

I run a startup on elixir myself. unless it was an exceptionally small service (or serverless lambda), I couldn't see myself choosing rust over elixir. that said, I could see myself writing a nif in rust via rustler if i ever need the performance benefits.


Is your startup using Phoenix liveviews? Front-end development with liveviews isn't something to bet a startup on. The learning curve is a major pain in the ass once you go beyond hello-world. The community is very small. The lack of up-to-date reference material lends Phoenix liveview development towards the wild frontier of adventure type of development that isn't compatible with 2-week sprints.

Anyone reading this who wants to jump in the ring-- show me how to handle an event triggered by a row in a table accessed through a tab-navigation component, updating the table. As an encore, show me how to carry state from plug middleware to a liveview function. Each situation involves contortions and passing state between steps due to designs yet to be refactored.


> Is your startup using Phoenix liveviews?

nope, liveview didn't exist when I started this startup. its an ios app connected to an elixir api over graphql and channels.

> The learning curve is a major pain in the ass once you go beyond hello-world.

I made an app in in while back. there's def a bit of a learning curve but its not that crazy. I was able to build a few fairly complex modal workflows in about a day. conceptually, its juts a genserver with a set of frontend components into which you load state. which can send back and forth events. Nothing anyone not familiar with react/redux wouldn't understand.

> show me how to handle an event triggered by a row in a table accessed through a tab-navigation component, updating the table.

the live view way there if I understand you correctly would be to give each sub component an id that it can pass back to a stateful main component whihc it would then modify in place and autoupdate. in practice, if performance is an issue, you can embed a javscript widget and send only necessary information back and forth using phx-hook. elixir's ecosystem has been great about getting out of your way when its not the best tool for the job.


not to be that guy, but the python ecosystem isn't at all in the same boat as ruby or elixir and it's actually chock-full of web frameworks (and package managers); the insane quantity of churn, fomo, hype and garbage code that circulates makes the JS ecosystem looks tame in comparison.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: