Where to put (calculation) logic in a plugin (cakephp 3)?



I would like to make (my first) plugin for german tax calculation in cakephp 3.

There is a logic scheme available for each year (http://www.bundesfinanzministerium.de/Content/DE/Downloads/Steuern/Steuerarten/Lohnsteuer/Programmablaufplan/2016-11-11-PAP-2017.pdf?__blob=publicationFile&v=3).

Until now I’ve put this logic in a single component which Ive updated every single year and copied manually to several projects. Works like a charme :slight_smile:

But I think a “closed” plugin is a better place for this for easier distribution and community-availablity :wink:

I am struggling where to but calculation logic :frowning: Is a component (in a plugin) the right place for this? No database access is required. And whats the best practice for managing different years?



What about a simple class in the plugin that isn’t connected to any framework bits?

Perhaps include a data file in the plugin that you can update?