Hacker News new | ask | show | jobs
by pydry 403 days ago
This is not a new problem. It is exactly what a web application framework like, e.g. django has been handling for one and a half decades.

What does it do that django doesn't?

A lot of competitors to django have also fallen behind because they either railroad you too much (e.g. by making immutable assumptions about how you want authentication to work which often end up being faulty) or go too far in the other direction and require an excess of boilerplate. This is a very subtle and tricky trade off that most newcomers to the space fail badly at.

2 comments

I’d consider Phoenix to be like Flask. Ash fills the gap that brings Phoenix up to feature parity with a batteries included framework like Django.

Ash Admin (Django admin), Ash Resource & Domain (Django models & ORM), Ash JSON (Django Rest Framework), Ash Auth (Django Allauth), Ash Phoenix (Django Forms), Ash policies (Django permissions)

But you aren’t required to use Phoenix with an Ash project. Ash will happily work as a standalone CLI, terminal app or some other Elixir web framework that comes out tomorrow.

The forms https://hexdocs.pm/ash_phoenix/AshPhoenix.Form.html seem even more low level than Django forms, and those are notorious for being too low level and annoying to work with. This to me seems to run counter to the tagline. Compare with iommi for Django where you can truly "derive the rest" from the domain model to get forms and tables.
There is definitely room for the Phoenix Form helpers to do more. Iommi looks like a really interesting approach I hadn't seen before.

For example AshAdmin (https://github.com/ash-project/ash_admin) takes these ideas further and generates a full super admin interface for you. It's a bit clunky and you should ultimately write your own admin, but it lets you focus on the important parts first.

For anyone else who hasn't seen it Iommi's motivation and docs are here:

Motivation https://kodare.net/2024/09/11/why-we-wrote-a-new-form-librar...

Iommi Forms https://docs.iommi.rocks/forms.html

Iommi Github repo https://github.com/iommirocks/iommi

Yea, the thing with the transparent APIs thing in iommi is that there's an admin and you can customize it just as much and as detailed as your own code. So you don't get the thing with the Django admin where you get a rough thing first and then spend hours and hours customizing and then when you hit the limit, you have to throw all that away and start from scratch. I hate that.

You can literally take 100% of the iommi admin config and copy paste it into your own custom edit forms or tables or whatever it is. It's the same config language.

This type of thing is the real measure of a framework.

Thank you for digging.

Exactly! That's a great way to think about it in Django terms.
Hi Josh!

Scott from the Gig City conference ;)

Oh hey Scott! :)
Thanks. This is exactly what the website should say!
They really should put something to that effect on the homepage.
Unlike Django, Ash is not a web framework, it’s an *application* framework.

One way to think of it is that it’s a flexible and extensible domain modelling language that also happens to derive an Elixir application which can be called from Phoenix web UI (or something else like an API, a terminal UI or even an MCP server.