r/lowcode • u/jeff377 • 5d ago
Definition-driven development: describe each form once as data, and drop to code only where you need it (open-source .NET, videos)
To be upfront: this isn't a drag-and-drop platform. It's an open-source (MIT) .NET framework I maintain, called Polhem, and it's aimed at developers. But the idea behind it is a low-code one, so I'm curious how it looks to people here.
In business systems, one field gets restated in a lot of places: the table, the SQL, the validation, the API, the form, the list. Polhem describes each form once, as data, and derives the tables, the CRUD SQL, the rules and the screens from that description. The description can start as an Excel workbook, one row per field.
The part I think fits this sub is that there are three levels on the same form, not three separate stacks:
NoCode: the form definition alone gives you the tables, CRUD, lookups, computed fields, save rules and screens. Standard data-entry forms stop here.
LowCode: events, conditions and rules on the form's business object, for light customization.
AnyCode: plain C#. Custom UI, business object methods, your own SQL for reports and batch jobs, integration with other modules.
When a form outgrows one level, you go down to the next on that form only, instead of hitting a wall and moving off the platform. And when the same kind of AnyCode keeps showing up, it gets pulled back into the definitions or the base classes, so the next form needs less of it.
The definitions also don't tie you to a UI technology or a database. The layout definition only says which fields there are and how they're arranged, and each front end draws its screens from it: Avalonia for desktop, browser, iOS and Android, and Blazor (Server or WebAssembly, with MudBlazor or Fluent UI). The SQL is generated per dialect, so the same forms run on SQL Server, PostgreSQL, MySQL, Oracle and SQLite, and switching is configuration.
Architecture diagram: https://github.com/polhem-dev/polhem/blob/main/docs/en/architecture/architecture-overview.md#11-overall-architecture-diagram
I recorded the whole process with Northwind. Six workbooks are imported, and the app runs with lookups, computed amounts and rules that block saving, without any form code. Then the requirements change: customers get a grade field and orders get a quantity limit. The change is made in a definition editor, only that form's table is upgraded, and after signing in again the new column, the drop-down and the new rule are there. A second video builds the same app as a Blazor Server site from the same workbooks.
The costs: you need a .NET developer, reports and batch jobs are hand-written, and if a system has only a few screens that are all heavily customized, writing the code directly is probably simpler. In return it's self-hosted, and the definitions are plain files in your own repo.
For those who've built real apps on low-code platforms: where did you hit the wall? Was it the rules, the reports, the integrations, or something else?
Avalonia, desktop to mobile (10 min): https://youtu.be/5WjUTwoPyGw
Blazor Server (7 min): https://youtu.be/HwQXMhrWtKM