This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dragontree
dragontree

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?

jan-vince
jan-vince

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.

vdomah
vdomah

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.

ricmas
ricmas

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

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.