by ianbutler · 5y ago · 0 comments
You couldn't pay me to give up Phoenix in Elixir for backend work but it does lock off a healthy amount of the neat things being done to make data loading on the frontend more optimal. Phoenix has LiveView + AlpineJS but I really don't want to give up React which still feels more productive to me.
This looks neat but just like NextJS and Sapper it will not nicely play with my stack.
It only technically is built for Rails and Laravel but reading the “spec” and the code I got it to work pretty quickly with a Rust backend.
It would be nice for more of these frontend niceties to be built around an API contract rather than a particular JS on the server implementation.
When you need to move in a slightly or severely different direction, you're better of with a set of libraries. They allow you to build a contraption that matches your unique problem space. They require much more time and thought to achieve the first results. Their keyword is composability, and their drink is a cocktail.
At the start, or if you are a contractor, you want something really fast, so a framework is usually inevitable, unless you're overqualified.
Down the road you keep needing to move across the rails, so you slowly switch to using more libraries.
The real problem is switching languages. I sure get slow when I change from Elixir to JavaScript. There's not a bright line between backend/frontend in a fullstack app, so I've been much happier minimizing how often I have to switch languages.
Agree Remix looks good though!
I think for remix to be able to do what it does, it kind of needs to run as a JS (not node!) backend, because a big part of it is running react on the server. Also, you are literally writing the server and client code in the same file. Closure and Reason which have strong react ports/bindings might be able to do it, but otherwise I don‘t see how.
What other backends need is probably a totally different framework, that wraps up a react server renderer with native language bindings. Might be neat, but totally different.
I agree with you in the sense that I don’t want to write server code in Node since I like batteries-included frameworks (Django)…
I guess you’re talking about features like form validation and whatnot?