Welcome Guest, Not a member yet? Register   Sign In
Plugin Architecture: Hooks and Callbacks

[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...

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.

[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.

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.

Theme © iAndrew 2016 - Forum software by © MyBB