2 respostas
We can differentiate the Controller and extension through the Constructors.The controller will have non parameterised constructor. The extenstion will have parameterised constructor with parameter of the Controller or Stand Controller which it extends.For the usage part, its best practice to extend the custom controller than to implement more logic in it.If page 1 needs 1 logic and page 2 needs 2 logics, instead of putting the second logic into controller, we can create a extension to controller and put the second logic there.So page 1 will have controller only and page 2 will have controller and extension.Hope it helps.