
Magento 2 Design Patterns: Proxies
Proxy classes look like boilerplate. They are lazy loading.
You've seen a class ending in Proxy referenced in di.xml and moved on without knowing why it was there, or whether you'd ever need to write one yourself.
That's because a proxy defers construction of an expensive dependency until it's actually called, and Magento generates the proxy class for you, which makes it invisible until the one time you need to write one by hand, and the generated code looks like nothing you've written before.
This course builds and wires a proxy class from a real performance problem.
The slow dependency first, then the proxy interface, then the di.xml wiring, then the measured performance difference. Each lesson ends with a benchmark you can run yourself.
This is specialized topics, step 3. Magento Code That Sucks is next, because a proxy is one fix among many for the messy code that shows up in real projects. It is also included in the University.
You leave able to spot when a proxy is the right tool, and to build one without guessing at the syntax.
Meet the instructor
Mark Shust has over 25 years of real-life development experience and holds 6 Adobe Commerce certifications. He has helped tens of thousands of developers all over the world learn and improve their Magento skills through courses, lessons and tutorials.
Mark's passion is taking complex topics and simplifying them down into easy-to-understand concepts. He enjoys teaching others, and strives getting you to that "ah ha!" moment as quickly as possible.

I used to be confused about proxy classes, but the explanations in this course clarified everything for me.
Foundational excellence
Step-by-step
This course breaks down Magento's complexities into easy-to-understand lessons that teach you exactly what you need to know, when you need to know it.
And you'll also not only get full access to the underlying source code which you can reference for years to come, but also a 24/7 Magento AI tutor to help you out when you get stuck.
Full 30-day money-back guarantee. Learn risk-free.
- Comprehensive understanding of proxy classes
- Unravel the mystery behind proxy classes in Magento, grasping their purpose and functionality within the framework.
- Practical application scenarios
- Learn exactly when and why to use proxy classes, so you can make informed decisions in your Magento projects.
- Step-by-step proxy creation
- Learn the process of creating and implementing proxy classes, with hands-on examples that solidify your understanding.
- Performance optimization techniques
- Discover how proxy classes can significantly improve your Magento application's performance, especially for resource-intensive operations.
- Deep dive into Magento's proxy system
- Explore where and how Magento generates proxy classes, giving you invaluable insights into the framework's inner workings.
- Real-world problem solving
- Apply your new knowledge to resolve common Magento development challenges, such as slowly-loading arguments in dependency injection.
There are a lot of very hard parts of Magento that are quite short to explain, but only if they are explained correctly.
This course does that.
Prerequisites
Solid understanding of M2 fundamentals
Familiarity with Magento's DI layer
Basic knowledge of Magento module dev
Experience with Magento CLI commands
Familiarity with PHP design patterns
Everything to succeed
Magento 2.3, 2.4+ support
Commerce 2.3, 2.4+ support
- 6 step-by-step lessons
- 25m of on-demand video
- Full source code
- Ability to ask tech questions
- Access to Maggie, the AI tutor
- Enhanced lesson transcripts
- Tech-friendly closed captions
- Multi-language support
- Certificate of completion
- Lifetime access
What you'll learn
Each video lesson can be played back & referenced as many times as you wish at slow or fast speed.
Perfect AI-enhanced tech-friendly closed captions available in 9 languages:
🇺🇸 ENEnglish🇪🇸 🇲🇽 ESSpanish🇵🇹 PTPortuguese🇫🇷 FRFrench🇩🇪 DEGerman🇵🇱 PLPolish🇮🇹 ITItalian🇺🇦 UAUkrainian🇷🇸 SRSerbian
Specialized topics, step 3
You are here: M2 Design Patterns: Proxies. When you finish, the next course on the path is below.
Includes our Magento AI tutor
Get instant, personalized support when you need it most, ...available from any lesson in this course.
- Answers any hour, in 183 languages
- Accessible from every lesson in this course
- Links the related lessons for you

Who should take this course?
Thanks for this short, clear instruction to proxies.
Choose your learning path
Start with this course, or take the whole path with the University.
Team
Up to 5 developers on the same course, one checkout.
- Everything in Individual
- Onboard up to 5 developers
- Save with a team rate
- Priority support
- 30-day money-back guarantee
Individual
Enroll in this course and put these skills to work right away.
- License for a single user
- One payment, keep it for good
- Lifetime updates included
- Full source code
- 30-day money-back guarantee

- Every course, in order, plus every new one as it ships
- Magento AI tutor and Campus
- Over $3,000 of courses and tools, priced individually
- Annual, or pay once for lifetime
Love it or your money back. Risk-free for 30 days.
Not on the path yet? Proxy classes make the most sense once you understand how Magento works, so start with the M2 Coding Kickstart course:

