I am looking for examples of how people organise their code in a Joomla extensions, particularly components, that is beyond the basics shown in tutorials teaching you MVC and Joomla.
A look through existing popular, and otherwise, extensions I see plenty of SQL in Controllers and Models doing a lot more that just managing the data and Helpers that seem to be a catch-all for everything else.
In reading blogs about PHP, OO & MVC on good coding practices two points that get mentioned is to keep business logic out of the MVC files and in particular Controllers should only redirect and not do any processing themselves. However there is not much in the way of examples that show where that functionality should go.
A look at Laravel shows a page that describes their way of doing things, https://laravel.com/docs/8.x/structure#the-rules-directory, which is in the direction of what I am looking for in Joomla based on more experienced peoples habits.
To kick things off my own convention so far has been to put utility code(a .csv reader and FTP method) I use across some extensions into a /administrator/com_mycomponent/library/
folder and for methods used across all my extension to handle SQL functions not available in Joomla into a system wide folder /libraries/mycode/database/
that is loaded via plugin.
Still I am struggling with where to put the business logic code and in general better organise my extension code.
Any thoughts appreciated, thanks.