As many people seem confused, it seems that this framework is a declarative framework (think: expressing a solution like you would in SQL or Prolog), in Elixir, that seems to have the goal of separating out core logic from control flows within web apps, APIs and so on.
Over the course of 15+ years of playing with Rails, I've come to the view of CRUD being a poor choice for most real-world applications and MVC being a useful but often-abused concept. That took me down a bit of a rabbit hole of trying to think about DDD within the constraints of an opinionated framework that thinks CRUD and MVC are the thing that makes you go fast. I, on the other hand, want the thing that makes it easy to extend and maintain. I want actual events to be modeled for all sorts of real-World reasons.
I've been learning Elixir recently because it's something new, the actor model appeals from a concurrency perspective to some of the problems I want to solve, and because Phoenix looks like an interesting and elegant web app framework. However, there was a nag in the back of my head that I'd just end up hitting the same frustrations: I was, and am, ready for that and seeing if anything about Elixir + Phoenix makes life easier than Rails made it.
Ash seems to be a good candidate for part of the puzzle. A declarative framework that brings some packages for useful, often-needed parts of the puzzle (like authentication, authorization, and so on), and it seems to encourage a way of thinking about some key DDD concepts. Resources sound like domains or bounded contexts. Declarative style sounds like it might lend itself to event modeling more easily. Calculated values are a nudge towards "view models".
Never tried, I'm early on my journey, but I think the Ash book will be the first thing I pick up after I've finished the Elixir and Phoenix books I'm reading through. Curious to hear stories from people further down this journey, though!
I've always been a fan of Model Driven Development (MDD), which is by today's standards an ancient paradigm. You define the core data model (resources), properties (attributes), and actions, and auto-generate the UI/API. It was more popular back when OOP first met Web Development. It seems to have fallen to the wayside with manually constructed "fat controllers" being the dominant way to organize web apps today. I have my own framework in MDD style. For a long time I've told people "I can code at the speed of thought." My apps are 80% the data model, 20% the UI, with the middle layer almost entirely generated. Tools like GraphQL, Supabase, and auto-admins kind of go in the same direction.
FWIW, I have the book and I've found it a really good read so far.
Stylewise, It reminded me of reading the original PragProg Rails book back in the day.
It's mostly finished. I just saw it's 40% off this week with the code 2025PERSPECTIVES at https://pragprog.com/titles/ldash/ash-framework/
I am a total noob, ok programmer but not a very good developer.
I'm coming to Phoenix with a Django background and I really enjoy what I've been messing around with so far, but I haven't done anything serious with it.
When I hear people say "ash is like an orm" then that fills me with dread. I actually come to enjoy how elixir/Phoenix/ecto has done things
If I'm trying to build something ie a news aggregator site (like hackernews ) - how would "make it in ash" help me? If it does things for me, does that mean I lose control of those things? Or they are hidden behind some macro magic that I have to pull apart to get to?
I'd love to hear from someone who's shipped a product into production with Ash. I've been considering using it for a new project but I'm a bit weary of introducing a whole second language. With it being macro based rather than functions, I can't help but think it might be tricky to break out of for areas where its opinionated approach don't fit so well.
> sh <(curl 'https://ash-hq.org/install/ai_personal_chef
Thanks no thanks.
I have shipped half a dozen projects based on Phoenix, Ecto and Live View. I love them all, and the language itself the most.
What does Ash Framework offer me? What pain points that I don’t think I have does it solve for me? This I still do not understand.
I guess I'll give it another try. I quite liked the idea behind it but last time I tried, I gave up mid way. Because everything was a macro, there was no auto-complete and that coupled with sparse documentation with buggy website (at the time, looks like its completely different now) was too frustrating.
I also wonder how well this would work with upcoming type system.
I ran the install link in the home page and got an empty phoenix project. How am I supposed to understand what to do next? How to add a resource/domain etc. I thought it was a full example. Or at least I'd get a CLI tutorial to create my first resource i.e.
1. Does Ash supports CQRS/ES architecture?
Or alternatively can it be combined with a framework like Commanded?
2. How customizable is GraphQL layer? Specifically error handling/idempotency for mutations?
I feel as though this website does a poor job of telling me what the framework actually does. There's the mostly-fluffy marketing lead text, followed by an overly-complicated configurator to generate a project.
What can I actually do with this? What problems does it solve? Where is it located relative to other solutions in the same space? What is that space?
[dead]
Everything old is new again. From my perspective as a Rails developer in the past, who landed on Elixir/Phoenix 10 years ago, Elixir and Phoenix were both born from Rails devs who were tired of Rails magic, keeping just the structure and bare minimum.
I've watched Ash spring up and build steam over these past several years with a bit of dread. From my perspective, it's kind of counter to the philosophy I liked in Elixir. I don't want to "derive" things based on a definition, for the most part. Elixir tends to avoid codegen and macros as much as possible, and José has recommended that if there _are_ macros, they should be a very light layer over calling functions, which should be the primary interface.
All this is said without having tried Ash, so I could be way off base. But I've been mostly ignoring it and wondering if I'll have to actually use it someday, and then be back in Rails-y magic land. I also use Scala at work, and saw how a philosophical split in the community just kind of trashed the language (from my perspective). It used to be a cool, better Java, but then those dang Haskell type astronauts found it and made everything impossible to understand.
Just taking the automatic Authentication, for example: Phoenix settled on a `mix` generator for it, to actually put the code and logic into the app itself. This is surely informed from José's years of experience maintaining Devise. If the best those two could come up with is a code generator, then I'm skeptical whatever Ash does here will be better. It feels like it's just heading right back to Devise land. And that was a successful place, and Rails and all its gems are still around, but that's kind of the "old world" philosophy and again doesn't square with us old Elixir developers who were Rails refugees.