fullpin

fullpin

Is there a target audience for Ash?

Hey there, this is my first post on the forum! Been following elixir for the last probably 3 years, but never really ‘dove in’ other than exercism/reading/podcasts/following the community growth. And I have to say it seems like amazing growth, even from an outsider.

I am exploring using Elixir, and specifically Ash for some core stuff in a future whitelabeled production application. For me, something just never clicked with the way phoenix generates/handles the ‘core’ of your application.

I think the web side is amazing, but I’ve bounced off ‘how to model/structure x thing?’ many times.

I really resonate with the abstractions of Ash, they just kind of ‘click’ to me, even though there’s a lot of terminology.

ANYWAY

I am wondering: who (in your opinion) should be using Ash for future production work?

And more importantly: do you think it’s for newcomers to elixir (but with extensive programming experience in other languages and domain modelling)? Or those who have already cut their teeth on elixir and the broader ecosystem for a bit?

Thanks for any replies!

First 7 of 7 Posts Switch mode

barnabasJ

barnabasJ

Ash Core Team

First of all, welcome to the community. :tada:

I started using Ash about 2.5 years ago without doing anything substantial in elixir before.
I mainly worked with Typescript before, with a bit of Java and Python mixed in.

When we evaluated Elixir, we also considered how we would create the Application layer. The Phoenix generators felt a bit too bare-bones, leaving many questions open.

There is also the phrase Phoenix is not your Application. Phoenix’s primary concern is not how you structure your application layer. Ash fits nicely into that slot.

After doing Ash for 2.5 years, I have a hard time seeing myself creating an elixir application without it. It solves so many problems you would otherwise have to solve yourself, one example being authorization. There are also common places to put your files and logic, which reduces bikeshedding on less impactful decisions and lets you concentrate on the things that add value for the end user.

Another important thing is that Ash doesn’t try to replace commonly used libraries like phoenix and ecto but rather builds on top of what is already there. In that way, I feel like even if I would need to build something without it, I still learned things about those technologies and not just specific Ash knowledge that might not be transferable to other projects.

I would give it a try if I were you :wink:

sodapopcan

sodapopcan

I just wanted to add that the way Ash does this isn’t too different than how you might say Phoenix’s context are “supposed” (very heavy quotes) to be used, it just abstracts a lot away (with many additional benefits, of course). Ash resources bundled in an Ash domain exposed by an Ash code interface is very generally the idea behind the DDD concept of Bounded Contexts which is where Phoenix contexts get their name. If you aren’t already familiar, reading up on them can help a lot in vanilla Phoenix and Ash (especially if you get a job where you have to use vanilla Phoenix). A very short intro is available here.

I’m just finally getting into Ash myself and can already tell I will not be looking back—except for every day at work when I’m forced to :sweat_smile: So ya, I have nothing to add to what @barnabasJ has said other than to reinforce that the target audience of Ash is everyone :slight_smile:

And welcome to the forum!

fullpin

fullpin OP

Obligatory disclaimer: I am NOT dissing phoenix in ANY way. I think both Elixir and Phoenix are the most sane, pragmatic, but also wonderful to work with languages/web frameworks I have ever encountered. So many powerful things exist – and I just really want to understand them at depth, just takes some time ^^.

And yeah I am very familiar with DDD and bounded contexts!

Where I bounced in phoenix contexts was like:

  • use context generator to generate some context
  • now what?

Especially when I don’t really need phoenix itself because I am doing domain modelling without UI, which is usually how I like to work for the ‘core’ stuff.

Whereas, with Ash my feeling after even walking through some tutorials is like: make a resource, define an action, go from there.

fullpin

fullpin OP

Amazing, thank you for the insight @barnabasJ, it is very akin to the situation I am in :slight_smile:

sodapopcan

sodapopcan

I certainly didn’t get that impression!

Ah apologies for explaining then!

The problem with the generators is that they are designed for learning purposes and just give you basic CRUD actions which kind fly against DDD. But that’s a bit off topic of this thread (and there are a whole lot of other threads regarding Phoenix contexts around here).

fullpin

fullpin OP

ty! sucks there isn’t a reaction that isn’t a :heart: haha

sodapopcan

sodapopcan

Ha, I’ve come to think of it as a cross between a like and an up vote depending on context (no pun intended).

— All posts loaded —

Where Next?

Trending in Discussions Top

AstonJ
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...
2977 91561 914
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
AstonJ
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
bjorng
We want to introduce a new native datatype to Erlang: native records. Although replacing all tuple records with native records is not our...
New

We're in Beta

About us Mission Statement