here you can see i am loading my helper 2 ways one is factory and second non factory but i dont know what will be the advantage if i call it through factory and non factory please help me to understand this difference thanks.

\My\Basic\Helper\DataFactory $helper,
        \My\Basic\Helper\Data $helpers)

1 Answer 1


This is not related to magento directly. Factory is a design pattern which is allowing you to gain abstraction and loose the strong coupling of the code which makes it easier to maintain. Meaning if you change the class code you don't need to change it everywhere mater as you call it with the factory abstraction level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.