How to Use ObjectManager?
0
- Instantiation and configuration of an Object via two main methods: GET and CREATE.
- Singleton pattern implementation.
- Dependency management.
- Automatic initialization of parameters.
Why is this one of the Magento tricky questions? Because ObjectManager is never used directly in classes/templates. A Magento developer should know that, if referenced directly, ObjectManager will break dependency injection principles, make code testing more difficult, and breach best coding practices.
Sign in to add a comment
0 Answers
0
📝 No answers yet!
Be the first to answer this interview question.
Your Answer
Sign in to post your answer and help the community.