CodeIgniter Forums
Plugin Architecture: Hooks and Callbacks - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Plugin Architecture: Hooks and Callbacks (/showthread.php?tid=4948)

Pages: 1 2


Plugin Architecture: Hooks and Callbacks - El Forum - 08-05-2008

[eluser]Colin Williams[/eluser]
Heh.. I got my answer in your other thread Smile

I think it's a really nice extension of CI's Hook system. Whether or not that's what I think is needed is another thing altogether...


Plugin Architecture: Hooks and Callbacks - El Forum - 10-27-2008

[eluser]vendiddy[/eluser]
I would really like a feature like this. I am also a Drupal developer so I am aware of how useful a hook system is. Smile

Edit: To clarify, I do not develop Drupal's core. I have used Drupal to make websites.


Plugin Architecture: Hooks and Callbacks - El Forum - 10-27-2008

[eluser]Colin Williams[/eluser]
Actually, what I am (was) working on, vendiddy, was based on Drupal's hook system. PM if you want the code.


Plugin Architecture: Hooks and Callbacks - El Forum - 09-11-2012

[eluser]Unknown[/eluser]
I just wanted to throw Magento in here as a good example of extensibility, I know it might seem too complex at first, but it's actually a very well thought out modular architecture.

It employs an event driven architecture, which is a take on the hook/callback architecture mention in the OP. Callback (observer) methods are paired to events (hooks) via XML config files in each module's directory, which are parsed (and cached) by the Core. This is similar to CI's implementation, but even more flexible, as it allows all modules to create events, they aren't limited to core hooks.