by faangguyindia · 6mo ago · 0 comments
I don't understand Phoenix hype
For solo devs, Rails is arguably most productive webapp system. LLM is very good at writing ruby rails code. Much better than writing django in my experience even though python training corpus is huge.
I write my experimental apps in Rail when it stabilizes, i do a Go rewrite.
I don't write directly in Go because, it consumes lot more token when the app scope is unknown but it's very efficient for rails.
These day i don't need react or angular anymore, i use Hotwire in Rails and HTMX in Go.
Erlang forum itself uses Discourse (written in Rails)
You might want to broaden your horizons.
would you please recommend a good resource to get started with elixir ?
thanks for your time !
If you're on the fence, this'll convince you: https://www.youtube.com/watch?v=JvBT4XBdoUE
Ecto is not bad as well.
Claude Code is very good at writing Elixir.
Surprise, you'll be more productive with what you know, LLM or not.
Not writing api routes for the frontend (when you don't also have a mobile app etc) is nice though, and pairing it with PubSub for UI updates is a cool trick.
ActiveRecord is more pleasant to work with than the ORM of Phoenix IMHO, but not everyone shares the same feeling.
Despite having built in concurrency my team ended up building a version of Sidekiq because supervisors don't cover all use cases of job control.
I prefer deploying with Capistrano than with Elixir builds. Another matter of taste.
Structural pattern matching is the only feature I dearly miss, but that's a feature of the language.
We never used Liveview. We had a backend for a JSON API so I can't compare that feature.
A stateful mechanism vs a data mapper? Absolutely not. Being able to write `user.save()` is such a lunacy, thank god we have functional languages that (necessarily) decouple storage from data models.
I cringe every time I have to use imperative, stateful languages.
Well, depends on what you do. Ecto is closely follows SQL logic and allows to translate weird sql queries into code directly. All queries are explicit, e.g. you either do preload(...) or can't access nested records at all, no chance of N+1 by design.
Changesets are also different and are just functions you can define as needed.
defmodule MyApp.User do
...
def changeset(user, attrs) do
user
|> cast(attrs, [:email])
|> validate_required([:email])
# This matches the error from the DB uniq index to the :email field
|> unique_constraint(:email)
endYour example is a common anti pattern from PHP orms 15 years ago.
2) after ~8 years of using it, i find it ergonomic, light on congitive load and good for long term support
The absolute irony of writing this whole ramble and then revealing that you're not even the one writing the code.