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!

Most Liked

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

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.

Where Next?

Popular in Discussions Top

mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14049 124
New
AstonJ
Are there any Elixir or Erlang libraries that help with this? I’ve been thinking how streaming services like twitch have exploded recentl...
New
rms.mrcs
A couple of days ago I was discussing with a friend about different approaches to write microservices. He said that if he was going to w...
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
New
MarioFlach
Hello, I want to share a project I’ve been working on for a while: https://github.com/almightycouch/gitgud Background Some time ago I ...
New
fireproofsocks
This is more of a general question, but I’m wondering how other people in the community think about the pattern matching in function sign...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48475 226
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29703 241
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31307 143
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New

We're in Beta

About us Mission Statement