Adobe Commerce Developer Professional cheat sheet
Adobe Commerce Developer Professional · Keep the key ideas within reach.
Adobe Commerce Architecture and Development Fundamentals
Adobe Commerce follows MVC architecture: models encapsulate business logic and data, views handle presentation, controllers process requests.
Request flow: index.php → Bootstrap → Front Controller → Router → Controller Action → Layout/Block rendering → Response.
Dependency Injection (DI) is configured via di.xml; it defines preferences, virtual types, argument injections, and plugins (interceptors).
Plugins (interceptors) allow modifying behavior of public methods: before, around, after; around plugins receive a callable $proceed.
The Object Manager is a service container that instantiates classes and resolves dependencies; direct use is discouraged in favor of DI.
Events and observers: events are dispatched via the event manager; observers are configured in events.xml and execute synchronously.
Cron jobs are defined in crontab.xml; groups and schedules are configured in Magento framework; cron runs via system cron.
The module system uses module.xml (declaration) and registration.php (registration); modules are enabled via bin/magento module:enable.
Areas (adminhtml, frontend, webapi, crontab, etc.) determine configuration scope and DI; area-specific di.xml files override global ones.
Adobe Commerce Setup and Configuration
CLI tool bin/magento provides commands for setup, cache, index, module, config, and deployment.
Configuration is stored in app/etc/env.php (system-specific) and app/etc/config.php (module list and scopes); admin settings are in core_config_data.
Configuration scopes: default, websites, stores, store views; values cascade from default to store view unless overridden.
Cache types are managed via bin/magento cache:enable/disable/clean/flush; cache types include config, layout, block_html, full_page, etc.
Indexers are managed via bin/magento indexer:reindex; indexer modes: Update on Save or Update by Schedule.
Deployment modes: default, developer, production; set via bin/magento deploy:mode:set; production mode requires static content deployment.
Static content deployment: bin/magento setup:static-content:deploy; required in production mode; can specify languages and themes.
Setup install/upgrade: bin/magento setup:install, setup:upgrade; setup:di:compile generates DI configuration and proxies.
Cron configuration: crontab.xml defines jobs; cron groups configured in app/etc/env.php; must set up system cron.
Customization: Themes, Layouts, and Templates
Theme structure: theme.xml, registration.php, etc/view.xml, media/, web/, Magento_Module/layout/, templates/, web/css/source/.
Layout XML files: default.xml, page_layouts.xml, and module-specific layout files; they define blocks, containers, and actions.
Block classes extend Magento\Framework\View\Element\Template; templates are .phtml files rendered by blocks.
Fallback order for templates and layouts: module → parent theme → child theme → base theme; configured in theme.xml.
View models (Magento\Framework\View\Element\BlockArgumentInterface) can be used to add logic to templates without modifying blocks.
Layout handles: default, page-specific (e.g., cms_index_index), and custom handles added via controller or observer.
UI Components are configured via XML (ui_component) and used in admin and frontend; they use KnockoutJS and RequireJS.
Static files: CSS and JS are merged/minified based on configuration; in production mode, static files are deployed to pub/static.
Template overrides: place .phtml in theme's Magento_Module/templates/; layout overrides: place .xml in theme's Magento_Module/layout/.
Working with Modules and Extension Development
Module structure: app/code/Vendor/Module/ with registration.php, etc/module.xml, etc/di.xml, etc/frontend/di.xml, etc/adminhtml/di.xml, etc/events.xml, etc/crontab.xml, etc/routes.xml, Controller/, Model/, Block/, view/.
module.xml declares module name and dependencies (sequence); dependencies affect load order and schema.
Routes are defined in etc/frontend/routes.xml (or adminhtml); route frontName maps to URL path.
Controllers: action classes in Controller/ directory; must extend \Magento\Framework\App\Action\Action and implement execute().
Database schema: InstallSchema (deprecated in favor of declarative schema), UpgradeSchema, and recurring scripts; declarative schema in etc/db_schema.xml.
Data patches (Magento\Framework\Setup\Patch\DataPatchInterface) are used for data changes and run once.
Plugins (interceptors) defined in di.xml: type, plugin, before/after/around methods; sort order via sortOrder attribute.
Preferences in di.xml: for a given interface/class, specify a preference to replace implementation.
Web API: expose services via webapi.xml; REST/SOAP endpoints; authentication via token or OAuth.
Database, EAV, and Data Manipulation
EAV (Entity-Attribute-Value) model used for products, customers, categories; attributes stored in eav_attribute and backend tables (catalog_product_entity_*).
Attribute types: static (in main entity table), varchar, int, text, decimal, datetime; backend type determines storage table.
Attribute sets and groups organize attributes; attribute set ID and attribute group ID stored in eav_entity_attribute.
Flat tables (catalog_product_flat, catalog_category_flat) can be enabled for performance; indexed via flat indexer.
Collections (Magento\Framework\Model\ResourceModel\Collection) are used to fetch sets of entities; addAttributeToSelect, addFieldToFilter.
Direct SQL: use Magento\Framework\App\ResourceConnection to get connection; always use prepared statements to prevent SQL injection.
Declarative schema: db_schema.xml defines tables, columns, indexes, foreign keys; db_schema_whitelist.json tracks changes.
Data patches and schema patches run during setup:upgrade; patches are recorded in patch_list table.
Indexers update materialized views (e.g., catalog_product_index_price) from EAV data; indexer mode affects update timing.