top | item 44660802

(no title)

mike1o1 | 7 months ago

I've been using Elixir for about a year on a side project and I've been enjoying it more than any other backend I've used (Node, Rails and C#). I recently discovered Ash and I feel like after that initial learning curve my productivity (and code quality) has improved quite a bit.

I wish Elixir had more mindshare beside just LiveView and "real time" type functionality. Even building a GraphQL/JSON endpoint without real-time requirements, the functional nature (no side effects), pattern matching and ruby inspired syntax makes writing plain old JSON controllers a joy.

While Elixir might not have a package for every use case under the sun, the low level primitives are there.

discuss

order

realusername|7 months ago

Personally while I enjoy Elixir/Phoenix, I didn't like Ash because there's way too many keyword DSL to learn.

It's like Rails except that there's much more resources for Rails to find if you made a mistake in the DSL

mike1o1|7 months ago

Yes, the learning curve is a extremely high. It took a few false starts over time, but after the "Ash book" came out, I gave it a more serious try and it finally started to click for me.

I think it helped that at the time I was trying to build some pretty advanced filtering functionality using Ecto and was having a pretty tough time. While searching for solutions I saw a few mentions of Ash and that it could solve the problem out of the box.

After a few days of experiments, I found that it was able to do the filtering I wanted out of the box and was even more functional than what I was trying to build.

For reference, I was trying to add some tagging functionality to a resource and I wanted to be able to filter by that tag, including multiple tags. Can I do that in Ecto? Of course, but Ash provided that out of the box after modeling the resource.

pmarreck|7 months ago

Except that it's not like Rails in the sense that in Rails, you will eventually develop extremely difficult to debug race conditions thanks to mutability that Elixir lacks.

Source: Has worked on million-line Ruby on Rails codebase