[Koha-bugs] [Bug 30796] New: Standardize CRUD HTML forms to use 1 controller
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed May 18 01:28:11 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30796
Bug ID: 30796
Summary: Standardize CRUD HTML forms to use 1 controller
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: dcook at prosentient.com.au
QA Contact: testopia at bugs.koha-community.org
I would love it if we only had 1 controller for handling the input from CRUD
HTML forms.
At the moment, we have hundreds of different Perl scripts for CRUD operations
where the logic is embedded in the Perl controller scripts and not the
underlying Perl model modules.
Having so many controller scripts means it's difficult to make system-wide
changes. Whether changes are made manually or automatically it, it also
increases the chance of errors, since you're having to make so many changes (to
Perl code or HTML templates).
When you have the 1 standard controller, you can use the same base template,
the same base error handling, etc. You take advantage of the DRY principle to
make old code easier to maintain and you make it easier to add new code. You
can put your base code in a base Perl module, subclass it, and then only make
the modifications you need to make for special cases.
--
I work on other PHP and Perl projects that use this model and it's so much
nicer.
Of course, a similar alternative is something along the lines of Bug 30225. I'd
be happy for there to be a standard Vue3 based form that used the APIs to
handle CRUD.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list