Best Practices for Extension Developers
This Best Practices guide is a living document, meant to be improved and revised as the software and our recommendations change. This guide combines best practices our community requested with guidelines that our Magento User Experience (UX), Engineering, and Product teams create. If you have feedback about these recommendations, submit a pull request (PR) to the Admin Panel Placement and Design topic. Give us your best practices recommendations, tell us about your challenges, and tell us how we can help standardize these guidelines.
Magento consists of the core product code plus optional components that enhance or replace the core product code. There are over 100 out-of-the-box components in the form of modules, themes, and language packages available for Magento 2.
Magento’s architecture allows for enhancements by letting you develop your own component. Keep in mind that in addition to Magento’s own modules, your extension will be running alongside components from other developers. For this reason, it is important that your component behaves correctly in Magento’s modular environment.
The table below is data from a recent poll that shows the distribution of the amount of extensions installed on a Magento instance for each edition. So for example, 32% of merchants on EE have over 50 different extensions installed!
|Edition||1-9 extensions||10-30 extensions||31-50 extensions||50+ extensions|
This guide provides best practices, guidelines, and tips for creating extensions. We encourage you to follow our best practices when developing code for your Magento components.
- Admin Design Pattern Library - An in depth guide to the design patterns used in the Admin.
- PHP Developer Guide - An in depth guide to creating Magento components.
- Frontend Developer Guide - An in depth guide to creating a Magento storefront theme.