A single set of CRUD pages or one set per table? #91
germain-italic
started this conversation in
Polls
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Existing behaviour
Cruddiy is now generating one set of pages per table entity, ex:
app/products-create.php
app/products-update.php
app/products-delete.php
app/products-read.php
app/products-index.php
So if you have 10 entities in your DB, you end up with 50 generated files.
IMHO uneasy to maintain, but very versatile (ie you can completely redesign the pages for one specific entity).
In this case we should improve templating, and add includes for header, footer, etc (like navbar.php).
Proposed behaviour
A single set of CRUD pages for all entities, with the entity as a GET parameter, ex:
app/create.php?entity=products
app/update.php?entity=products
app/delete.php?entity=products
app/read.php?entity=products
app/list.php?entity=products
There will always be 5 files, no matter how many entities you have.
Instead of generating files, we would be generating config.
In this case we could get rid of templating and focus on new features.
I've made a first step in this direction in #73.
However as we lose on versatility, maybe we need hooks, or per-entity stylesheets?
How do you take advantage of the multiple sets of CRUD files per entity?
Asking all users and contributors, but hopefully @jan-vandenberg can give us guidance here.
1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions