Ash Framework
Create Declarative Elixir Web Apps
by: Rebecca Le and Zach Daniel
Published | 2025-08-15 |
---|---|
Internal code | ldash |
Print status | In Print |
Pages | 294 |
User level | Intermediate |
Keywords | web applications, domain modeling, LiveView, Phoenix, Elixir, web development |
Related titles | It would pair well with Programming Phoenix and Programming Phoenix LiveView, as the web app being built is a Phoenix and LiveView application. Those books cover core concepts that we’ll not be going into huge detail about. |
ISBN | 9798888651520 |
Other ISBN |
Channel epub: 9798888651865 |
BISACs | COM060130COM060160COM060160 |
Highlight
Ash Framework is the game-changing toolkit for Elixir developers. With modular, plug-and-play building blocks, Ash slashes development time, effort, and complexity, letting you do more with less code. Design declarative, customizable domain models that are easy to maintain and optimized for performance. Shift your focus to what to build, instead of how, using Ash’s intuitive design principles. Tackle bigger challenges and build scalable, future-proof web applications with confidence. Elevate your Elixir skills and revolutionize your workflow with Ash.
Description
Discover a dynamic new way to build web applications with Elixir and Ash Framework. Ash enables you to structure and organize the code you write in a declarative programming style so you can build functionality more quickly and answer complex questions about data more easily.
Start with a Phoenix LiveView app and grow it into a fully functional system as you master Ash’s core principles. You’ll build the domain model for a music database throughout the book. As you create this model, you’ll learn how to define resources with ease, connect them through adaptable relationships, and enrich your models with calculated attributes and aggregates to make your data work smarter. Secure your app with seamless authentication and authorization policies that integrate cleanly across APIs and user interfaces. Skip the busywork by generating REST and GraphQL APIs from your resources, freeing you to focus on building standout features. From dynamic search and nested forms to pubsub and real-time updates, you’ll explore practical, real-world scenarios at every turn.
Coauthored by the creator of Ash, this book is packed with insider knowledge, best practices, and actionable guidance to get you started fast. By the end, you’ll have the skills and confidence to create applications that grow with your needs.
Contents and Extracts
- Welcome!
- Building Our First Resource
- Getting the Ball Rolling
- Oh, CRUD! — Defining Basic Actions excerpt
- Integrating Actions into LiveViews
- Extending Resources with Business Logic
- Resources and Relationships
- Loading Related Resource Data
- Structured Data with Validations and Identities
- Deleting All of the Things
- Changing Data Within Actions
- Creating a Better Search UI
- Custom Actions with Arguments
- Dynamically Sorting Artists
- Pagination of Search Results
- No DB field? No Problems, with Calculations
- Relationship Calculations as Aggregates excerpt
- Generating APIs Without Writing Code
- Model Your Domain, Derive the Rest
- Building a JSON REST Interface
- Building a GraphQL Interface
- Authentication: Who Are You?
- Introducing AshAuthentication
- Setting Up Password Authentication
- Automatic UIs with AshAuthenticationPhoenix
- Setting Up Magic Link Authentication
- Authorization: What Can You Do?
- Introducing Policies
- Authorizing API Access for Authentication
- Assigning Roles to Users
- Writing Policies for Artists
- Removing Forbidden Actions from the UI excerpt
- Writing Policies for Albums
- Testing Your Application
- What Should We Test?
- Setting Up Data
- Consolidating Test Setup Logic
- Testing Resources
- Testing Interfaces
- Having Fun With Nested Forms
- Setting Up a Track Resource
- Managing Relationships for Related Resources
- Reorder All of the Tracks!!!
- Automatic Conversions Between Seconds and Minutes
- Adding Track Data to API Responses
- Following Your Favorite Artists
- Modelling with a Many-to-Many Relationship
- Who Do You Follow?
- Spicing Up the Artist Catalog
- Delivering Real-Time Updates with PubSub
- Notifying Users About New Albums
- Running Actions in Bulk
- Showing Notifications to Users
- Updating Notifications in Real Time
- We Need to Talk About Atomics
- Wrapping Everything Up