Ash Framework Build Fast, Model Right (self-published)

Dear Elixir Alchemists

I’m happy to share that I’m working on my 2nd series of books (See my first one here) and this time it’s about Ash Framework. I have been using Ash lately for all my projects and I simply love it. It greatly reduces the amount of code that I write and helps me express my business requirements clearly once I understand how to use the Ash Framework.

What I noticed is that there aren’t enough structured learning resources for Ash Framework. Elixir Forum is a great place to get specific answers for problems you might encounter with Ash. I’m grateful for the Ash Core team who are always available to answer these questions. It’s my main learning resource. Ash Docs is a great place to look into for a detailed reference guide. Finally, the Ash Core team has recently released a book (currently in beta).

What I missed in my learning journey is, given a set of most common tasks that I would do in building an app, how can I get it done in Ash Framework. This is exactly what I’m covering in my upcoming books in the series Ash Framework Inside Out Series.

The first book “Ash Framework: Build Fast, Model Right” is in progress. With due respects to all the available resources that I have mentioned above, this book addresses the gap in quickly adopting Ash Framework. As there are ample resources for learning Phoenix and LiveView, this book exclusively focuses on Ash—helping you rapidly build models, relationships, migrations, and all types of simple to complex queries using an example of building a complete project management app.

The book covers more than 150+ common tasks that developers face in building applications using concrete examples.


What will you learn?

The book contains 10 different chapters with over 150+ learning objectives.

Ash Domain & Resources
Learn how to define structured data models using Ash. You’ll set up resources, organize data, and understand how Ash simplifies domain modeling.

Attributes
Define and manage data fields with type safety, default values, and constraints like required fields or unique values.

Relationships
Learn all the standard one-to-one, one-to-many, and many-to-many relationships, polymorphic associations the Ash way.

Aggregates
Fetch summarized data like counting tasks in a project or calculating averages without writing complex queries.

Calculations
Compute dynamic values, such as formatting names, calculating totals, or deriving statuses based on other fields.

Validations
Ensure data integrity by enforcing rules, like checking email formats, preventing empty fields, or restricting input ranges.

Identities
Set up unique identifiers like emails or usernames to prevent duplicate records and improve data consistency.

Actions
Learn to define how data is created, updated, deleted, or retrieved, using meaninful business-model related action names.

Changes & Preparations
Learn how to use Changes and Preparations to modify data before saving or modify how the data is fetched.

Notifiers
Trigger real-time updates, send emails, or call webhooks when data changes, making your app more interactive.

The book costs $39.95 when released but right now on pre-order, the book is available for ~40% discount at $23.95. Besides a great deal of savings, your pre-order is also a great motivation for me as I write this book. The book releases on 30 April, 2025. Preorder the book at:

with much regards to the community

Thank you
Shankar

17 Likes

Very cool :heart:. So excited to have more resources for folks to learn and apply Ash! Best of luck on the book :tada:

5 Likes

Thank you @zachdaniel . A lot of gratitude and respect for your great work with Ash Framework and your continuous support to the community.

2 Likes

I’m relatively new here, and I am unfamiliar with your previous work. But the comments in the thread from your other book/series seem to be quite positive, so I’ll give this a shot.

Cheers

2 Likes

I’ve only been skimming the Igniter docs, but a workshop or book appendix on using it for code generation would be great.

There’s new code generation tooling in Elm, for example, and a lot of interesting stuff is coming out of that, in large part because Elm lacks macros.

Elixir of course has macros, but Igniter still has a lot of potential in Elixir beyond being a smarter mix install. But of course you know that!

Can you please provide a summary of the features that the project management app will have by the end of your book, so I can better understand the scope of complexity your book will cover. I’m hoping it goes beyond a simple app with a few resources.

Even better, is there a site with a demo of the final app that we can look at?

5 Likes

Hello Shankar,

I remember you from the phoenix book, which I enjoyed. Then things got a little quiet around you.

So a book from you about Ash? That’s an instabuy.

2 Likes

@josh.nz, yes the book goes beyond building a simple crud app. It doesn’t deal with the UI part at all but focuses entirely on building the core business model with Ash. This gives enough room for diving deeper into the subject of Ash domain modeling without getting caught with explanations of Phoenix layer. The book is structured around the core Ash concepts in the following structure for each concept taught from the lens of an imaginary company Tuesday that sells project management software.

  1. Explanation of an Ash Concept (A)
  2. A business domain problem (B) addressable by concept (A)
  3. Solution for this business problem (C)
  4. Explanation of the solution (D)
  5. How to write test cases where applicable (E)
  6. Exercise to write a solution for a similar problem (F)
  7. Exercise to debug a solution that’s not working (G)

There will be sample chapter available beginning of April for you to download and see. Regarding the demo site, I’m still considering. For my first book series, I had this demo site: https://mango.shankardevy.com/ but now since I focus completely on Ash, I don’t want a demo site similar to this to misrepresent what I teach in the book giving the readers a wrong assumption that it teaches Phoenix as well. Everything in the book can be used in a Phoenix app but it doesn’t teach Phoenix on its own.

Hope this answers your questions. Let me know if you need anything more.

1 Like

Thanks for the details. I can appreciate not wanted a demo site when you don’t focus on the UI. And I think it’s a nice idea to not focus on the UI, gives you more room to focus on the domain concepts Ash helps with, as you state. A good decision.

I’m looking forward to the sample chapter. I have the Pragmatic Bookshelf Ash Framework book and need to determine if your book goes into more detail or covers most of the same ground. It would be very helpful if you could include a detailed table of contents (for the full book) with the sample chapter, or add this to your site.

I’m very exited to see another book about the Ash framework! How does this book complement the Ash framework book by Rebecca Le and Zach Daniel? Does it aim to go into more detail or cover different aspects? :blush:

@josh.nz @MikaelFangel
I haven’t read Pragmatic Bookshelf Ash Framework book yet so my sharing might not be accurate but looking at the table of contents available online, it might cover Ash core and non-core GraphQL, REST APIs, AshAuthentication which are separate Ash libraries. So in a way Pragmatic book gives an authoritative usage (as it comes the library authors) on a wide variety of core and non-core functions in Ash.

I’m covering primarily Ash core extensively (in the context of Ash Postgres for all db related stuff). So it give me more space to dive deeper and narrow on the core topics. So I think both books complementing each other.

1 Like

Great!
Would love to read about the reactor(mby for something like handling a booking a class with limited spots or payment process) as well as multitenancy in addition to the topics you mention.
Both the reactor and multitenancy seem very powerful if used correctly and including them would compliment the topics in the Pragmatic Bookshelf Ash Framework book very nicely.
Just recently paid for your book btw, looking forward to reading it!

1 Like

I purchased the book yesterday - should I have gotten an email confirmation about it? I didn’t get one…

A payment confirmation from Stripe. Will DM you for more details.

Thanks for sorting that out so quickly! I’m excited to read the book :smiley:

Me too: bought with Apple Pay, no email.
Great to see more Ash materials,
thanks in advance :slight_smile:

Me too. Got no confirmation.

Same here.

@Nefcairon @Kallee it looks like a setting in Stripe not turned on for email confirmation to the buyer. I was not aware of this. I just turned on and hopefully all new purchases get a confirmation. Nevertheless, I have your email ids for the preorder even if you haven’t got the confirmation email from stripe. So be assured that you will receive an email from me when the book is finally released. Thank you!

5 Likes

Do you have an updated date when we can expect the sample chapter to be available?

1 Like