3 ms·
Grouping related functionality in a class and using it as a namespace, and using inheritance to get a few useful common features in close proximity and handing
by treve 2y ago
Grouping related functionality in a class and using it as a namespace, and using inheritance to get a few useful common features in close proximity and handing hooks is perhaps not the most correct from an OOP perspective, but it's common and results in much less boilerplate than doing everything 'correctly'.
What's more egregious to me is that the methods should just match HTTP method names and have 1 controller per route.
- mewpmewp2 2y agoWhat about just having request handling functions in a single file or a directory?