I have a set of functions shared between all my controllers and I’m doubting whether I should place them in a component, loaded from every controller (or from AppController), or add them in the AppController class (with visibility set to protected), so all the controllers inherit them.
Which is the better?
Creating a component is recommended, IMO. Components are lazy loaded and also help keep your code look clean. Also in use cases where you need access to some sort of model data, you DO NOT want to load models and call them from AppController!