I am developing a custom plugin that adds a new product entity with its own tables to the database.
I would like to perform custom queries on those products through a custom search form -the classic search input with "advanced search" options-.
The results should be displayed in a list, with links to individual items.
What would be considered a best practice for implmenting both plugin and theme?
I have thought of writing a plugin that performs all CRUD oeprations, and a custom theme to display the results:
The plugin will add backend forms to let the admin perform basic operations on products.
The theme will include
myproduct.phptemplates to render both search results and individual products.
The search box and advanced search options will be rendered throug shortcodes written in
funcions.phpinside the theme.
Are there better options to make the plugin and template be as independant to each other as possible?
Are there any design patterns that provide general guidance on separation of concerns relative to Wordpress plugins and themes development?