As a component developer I can see how useful is to include events to call plugins so other people can extend you component without hacking your core files.
However I am always concerned about this “callings” to have a negative impact in performance.
If you create a component let ‘call it “com_mycomponent” it is also common to create a folder called “mycomponent” inside the plugins folder, and to make event triggers in strategic points in the component
JPluginHelper::importPlugin(“mycomponent”); $dispatcher =& JDispatcher::getInstance(); $dispatcher->trigger('OnThisThingToHappen', array() )
What happened if I have several active plugins inside “plugins/mycomponent”? I guess each time you trigger an event all these plugins are going to be loaded and their code interpreted by php to check it the respond to the event? It is not that heavy?
And finally, the question that brought me to write this.
If I have a list view of an Item, can I include an event trigger in the item template? It would run on every item so the loading and parsing of all active plugin in your group would be repeated too.