Is there a way to optimize code in multiple controllers by creating a single helper/utility class?
For instance, let's say I have two controllers: UpdateItemCtrl
and CreateItemCtrl
. Both controllers contain similar functions which can lead to redundancy and decreased manageability.
I am considering implementing an ItemSaveHelper
class where I can consolidate these common methods and access them from any active controller.