A new form builder that generates real PHP modules
Introduction
Here is the new version of MilkAdmin, introducing an important new feature: the Projects module, designed to assist developers in creating new modules for displaying and editing data.
In practice, it is a system that can generate custom modules. This allows developers to build even fairly complex forms directly from the user interface, without having to write code from scratch.
The system supports many types of fields, from simple text inputs to more advanced components such as autocomplete fields connected to other tables, file uploads, and several other input types.
MilkAdmin is not a form builder that hides the code.
It is a form builder that generates code.
The goal is not to replace development, but to accelerate it, while always keeping full control in the hands of the developer.
What makes this system different from typical form builders
Compared to most form builders, this approach stands out for two fundamental differences.
1. Generation of real PHP modules
Most form builders store their configuration in the database and dynamically generate forms and tables at runtime. Other systems generate PHP code, but once the code is generated, the developer is expected to maintain and modify it manually.
The idea behind MilkAdmin was different: to create a system capable of generating PHP modules while still allowing the module structure to evolve through the interface.
The solution was to generate modules that extend their configuration through JSON files. The form builder continues to update the JSON configuration, while developers remain free to modify the PHP code of the module to add custom logic.
This way, the two systems can coexist naturally.
In practice:
- the graphical interface allows developers to quickly generate and configure modules
- the PHP code always remains the final authority
This means that a module can start from an automatically generated configuration and then be extended, modified, or even completely rewritten, exactly as if it had been written manually from the start.
The two approaches therefore do not exclude each other and can coexist within the same project.
An additional advantage of this architecture is that the JSON configuration is easy to manipulate programmatically, including through AI-assisted tools. This makes it possible to generate even complex modules using prompts or automated development workflows.
2. Relational data structure (no EAV)
The second major difference concerns how the data is stored.
Many form builders rely on a model called EAV (Entity–Attribute–Value).
In an EAV system, instead of creating a dedicated column for each field in a form, all values are stored in a generic structure, for example:
| entity_id | field | value |
|---|---|---|
| 10 | name | Mario |
| 10 | age | 42 |
| 10 | city | Rome |
This approach has one major advantage: new fields can be created without modifying the database schema.
For this reason it is widely used in form builders and CMS platforms (for example Magento, many WordPress form plugins, and several low-code systems).
However, this model also introduces several drawbacks:
- more complex SQL queries
- harder filtering and reporting
- potential performance issues with large datasets
- more difficult integration with external systems
MilkAdmin follows a different approach: each field in a module generates a real column in the database.
For example:
| id | name | age | city |
|---|---|---|---|
| 10 | Mario | 42 | Rome |
This provides several benefits:
- simpler SQL queries
- better performance
- a clearer and more transparent data structure
- easier integration with other systems
In other words, the system preserves the flexibility of a form builder, while storing data using traditional relational database structures.