AstonJ
Do you know Ruby on Rails? Did you come from Rails?
If so do you have any tips to share? Was there anything that helped your grok the similarities/differences? Any articles, books, talks/vids/screencasts, or courses (or even forum posts) you found particularly helpful?
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
:warning: Security advisory: Decimal DoS vulnerability
A vulnerability has been published for decimal where very large exponents can cau...
New
Other Trending Topics
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
travisf
I’m likely not the best person to respond to this, Ruby & Rails was my first foray into development. I’d been doing Ruby stuff for about 3 years but my first real job as a developer was with Elixir. As much as I love Ruby, the Elixir world felt pretty much the same but everything was demystified. No special magic going on under the hood, if I wanted to know how something worked I could just go to the module/function and find it.
Admittedly, this was most frustrating moving from ActiveRecord to Ecto, I missed all the out of the box magic ActiveRecord provided.
I think https://elixircasts.io/ was a big help when I was first learning Elixir (it still is sometimes). My office also had an older copy of Programming Phoenix I worked through a few chapters of.
al2o3cr
I found the ebook with the same name as this thread really useful, but that was also because it was 1.3-specific content close to the release of 1.3:
https://phoenixforrailsdevelopers.com/
kanishka
I don’t know rails well, but maybe Ecto’s preload is one of the concepts you have to learn when moving to elixir?
cpgo
Well, you kinda need that on rails too.
Rails’s ActiveRecord will not force you to preload anything, unless you are using the
strict_loadingsetting on your models, but you might risk running inn+1queries when looping through the resultssodapopcan
Ignore any notion you got that “Elixir is Erlang for Rubyists” If you are coming to Elixir from Ruby, wipe this sentiment from your brain. Elixir merely takes the syntactic elements from Ruby that Rubyists love and brings them to Erlang (by which I mean the BEAM, of course)—that’s it. The similarities end there. Seriously. The quicker you accept that the quicker you’ll make progress. At least that’s how it was for me.
In terms of Phoenix, for me it was to accept that Phoenix is nowhere near as opinionated as Rails is. That one actually took me a while. Phoenix is looking a lot less like Rails these days so this isn’t as much of a thing. You can, however, bring the spirit of those concepts over to Phoenix to great effect, however, my second piece of advice here is don’t get frustrated and try and jam specific Rails concepts into Phoenix. Just be uncomfortable for a few weeks and learn why things are the way they are, then you can break the rules if you see fit.
In terms of Ecto, it can be tough at first, but if you ever worked on a Rails project where a bunch of arel or raw SQL was necessary, Ecto will be a breathe of fresh air. I tell my Rails buddies that Ecto is “…like an actually good version of Arel” (sorry Arel devs, but it’s how I feel). I personally don’t miss ActiveRecord even a little.
AstonJ
Not sure I agree with that (or that specific wording) Andrew
If Elixir isn’t the Erlang for Rubyists, which BEAM language is?
I’d agree that Elixir isn’t Ruby on Erlang though, and that it only bears a superficial resemblance (under the hood it’s very much Erlang’s baby) but I do think Elixir helps give Rubyists some familiarity and thus comfort, even if just for the aesthetics. Hence that’s what I think helps make it the closest (production-worthy) Erlang-language we currently have for Ruby users.
I also think that because José and Chris were Rubyists they are giving us what feels like the spiritual successor to Rails - because Phoenix is understandably going to be their version of what they feel is a ‘better’ framework than frameworks that came before it (afaik they were more experienced with Rails than any other web framework).
So for me I see Elixir and Phoenix as the language and framework many Ruby and Rails users might naturally levitate towards… when they begin to reach the same kind of limits or issues José and Chris and many others did while using Ruby and Rails. That’s how I see it anyway, maybe others feel differently
jbz3n
Seems like Rails is looking a lot like Phoenix instead.
I could even say that some JS frameworks are finally “seeing the light” because of Liveview.
sodapopcan
Well, when you put it like that it’s hard to argue with!
I certainly didn’t mean any disrespect with my wording and I agree with everything you said. I was trying to word my answer as if speaking to a total Elixir n00b coming from Rails (eg, saying “Erlang” instead of “the BEAM”). When I was learning Elixir, I was under the impression that it was supposed to have a lot more in common with Ruby than just the syntax and it’s a sentiment I’ve heard from others several times over the past few years (mostly from non-Elixirist thinking that “Elixir is basically just Ruby with better concurrency”).
I’ve noticed this too and it’s a good thing.
I recently did a moderately deep dive into Rails 7 due to job opportunities being how they currently are—there is just more Rails stuff out there. Even so, I ended up back with LiveView because it’s so much simpler. Hotwire is really nice if you want to do full progressive enhancement out of the box, though.
cpgo
Totally agree. I experimented a bit with Phoenix + Hotwire and I really liked it.
To me, Hotwire makes so much more sense to use with Phoenix.Components than it does with Rails views+partials.
sodapopcan
Ya, if I ever get back to a certain project was working on I should switch to Phoenix + Hotwire. I was using Hotwire with View Component which is nicer than partials but it’s no heex (and Ruby is no Elixir).