3 ms·
> now most recently ash I've been using Ash in a side project and it's slowly growing on me. You have to twist your brain a bit to grok it (and I haven't, not
by troupo 3y ago
> now most recently ash
I've been using Ash in a side project and it's slowly growing on me. You have to twist your brain a bit to grok it (and I haven't, not fully).
Pros:
- a lot of things happen where you want them to happen.
I found that writing stuff with Ecto involves more boilerplate than with Ash because you have to write your queries, and your changelogs, and your API accesses, and wire them together, but what if you want a separate API.... With Ash it's a single resource with a few macros.
- quite a few escape hatches into regular Elixir
You don't want magic behind actions? There are several ways to hook into what's happening, or even write everything manually. And to the calling code... it will still look the same
- Despite all the macros the errors are usually quite good and pinpoint the problems
Cons:
- too few people who truly understand Ash
- documentation is often too terse and concise. But you can't really blame the author who is doing a lot
- errors are not always good :)
I do agree with you on overreliance on macros in parts of the ecosystem
- throwawaymaths 3y agoI am working at a company that uses ash and have a data science side project that doesn't. The data science project did a sql query that I couldn't figure how to optimize in SQL and I turned it into simple elixir code. Queries that took minutes now took seconds. Now, I know that ash can do both but I don't know how I would diagnose that problem or test alternatives in ash, because it hides way too fucking much of the underlying code.
- troupo 3y agoI guess you'd do it the same way: look at logs, write an optimized query manually :) But I do get what you mean.