This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I'm developing an administration page for managing different servers, domains etc. Kinda like a CRM logic actually. Now I'm wondering if it would be a better idea to create one plugin for all of these objects or a separate plugin for each one.
The same dilemma would be for an e-shop. One plugin that contains the cart, orders and products vs multiple plugins.
What would be the pros and cons of each approach?
You can be fine with one complex plugin if you develop for single project.
IMHO if you want to use it on several different sites, I would prefer to create more "single purpose" reusable plugins.
I faced a problem with several plugins approach. Because of uncontrolled plugins boot order you can't be sure that code from Plugin.php boot() method of one plugin will be available from another plugin.
I had the same issue. You can define your dependencies in your plugin registration file https://octobercms.com/docs/plugin/registration#dependency-definitions.
public $require = ['Acme.User'];
1-4 of 4