168 karma · joined December 16, 2017
I think I'll probably keep it front and center for now, given that the book will be launched out of beta in the near future, but I can see how it might give the wrong idea, and will reconsider its placement going forward
Ash is a declarative application framework. You define your application logic using Ash.Resource, which model things like state, but most importantly actions.
Another analogy is that it's similar to GraphQL, but lowered down to the backend layer. It's a declarative, typed application description and implementation framework, that you can derive a GraphQL from (amongst many other things).
Another way to think of it is a whole ecosystem of packages that standardize the vast majority of things you want to do when building an Elixir backend, instead of trying to kludge together a bunch of different tools. Pagination, sorting, filtering, authentication, authorization, all builtin and designed to work together.
New homepage and installer builder - https://ash-hq.org
Ash Weekly newsletter - https://ashweekly.substack.com
with rebinding:
def thing() do
x = 10
do_something(x)
# x is 10, non negotiably, it is never not 10
end
with mutability def thing() do
x = 10
do_something(x)
# who knows what x is? Could be anything.
end
Additionally, because rebinding is a syntactic construct, you can use a linter to detect it: https://hexdocs.pm/credo/Credo.Check.Refactor.VariableRebind...If you call `Process.put(:something, 10)`, any references you have to whatever was already in the process dictionary will not have changed, and the only way to "observe" that there was some mutating state is that now subsequent calls to `Process.get(:something)` return a different value than it would have before.
So with immutable variables, there is a strict contract for observing mutation.
But I will update my example in that case. Someone else mentioned this but I was waiting to hear back. I will alter the example to `await doSomethingElse`.
In a lot of ways, it tries to cut a good balance between a lot of concepts. The examples at the bottom of the front page show some examples of the way you use it. There are example apps linked from the Media page as well that can illustrate how it works.
I know the front page is missing a lot of key information, but I promise there is tons of useful stuff in Ash, not just buzzwords
In all honesty, though, documentation is still a major hassle for people using the framework today. There is a lot to it, and even with a wholistic docs site it can often be hard to find what you want. But with this we at least have a singular vision to build towards, and its grown in leaps & bounds over the last 6-8 months.