coreBOS permits the implementor/developer to add functionality to the existing application in three different ways: Events, Links and Hooks.

Events occur at special points in the execution of the application and the eventing system permits us to insert our own code and functionality at these points, while Hooks permit us to enhance the existing functionality of objects and modules as if the code had always been there. The difference is very subtle and basically resides in the way the developer's new code must be added for it to be functional. The Events system requires the developer to create a new class that extends the base event class, add the functionality to this class and register it into the system for it to be called, while the Hooks system will require adding specifically named functions and files to certain places for it to be found and executed accordingly.

Links are a mix between Events and Hooks as they permit us to load specific code as if it had always been there, including buttons and links, but they require to be registered in the application to be loaded.

As I have already said the difference between events and hooks is very subtle, even some types of links are hard to distinguish from hooks. In the end, they are simply different ways of changing the default behavior of the application and you need to choose which one you need depending on the goal of your change.

If you read the official definition of a hook or a webhook, you can see that there is really no distinction, they are all ways to change the behavior of the application. coreBOS makes a distinction based on the way you insert the hook into the application, in other words, depending on the steps the programmer has to take to get the hook into the system. Looking at it that way we have:

  • Events: require that you create a specific class and launch some specific code to register the new functionality

  • Links: require that you create a URL and register the action using some specific code

  • Hooks: require that you create some specific code and do some steps that do not fall into the previous two categories

So, in the end, the only difference is how you insert your code into the application depending on what you need to hook into.

Admin Manual
Developer Manual