O'Reilly logo

Microsoft Dynamics NAV by Mark Brummel, Christopher Studebaker, David Studebaker, David Roys, Vjekoslav Babić, Cristina Nicolàs Lorente, Laura Nicolàs Lorente, Alex Chow

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hooks

While the Façade has to be explicitly implemented to allow different code paths at runtime, there might also be scenarios where we are required to make changes to the code that we don't own. In these scenarios, we can implement a hook, which is nothing more than a function call that executes business logic outside of the code, but inside the transaction. The alternative to implementing hooks is raw source code modification, including creating additional variables.

The advantages of implementing hooks can be found in the area of upgradability. It does not increase maintainability, mainly because the name of the hook does not indicate what the hook does, but where it is called from. Hence we can see in the original source that there is a hook, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required