Magento 2 Areas

When doing development in Magento, we define which resources are visible and accessible in a given area. We use this area to control behavior that we need for specific area.

For example:

  • we want to add some logic using event observer, which will happened customer data is saved by customer, but not when updated from admin page. To achieve this, we will need to define the observer configuration only in frontend area, but not in adminhtml.
  • we want to optimize our REST queries by providing only necessary data to answer a REST query, not the entire HTML

Magento is organized into following main areas:

  • adminhtml : Magento Admin.
  • frontend : Magento Storefront.
  • base : use as a fallback for files absent in adminhtml and frontend areas
  • crontab : Cron.
  • webapi_rest : Web API REST
  • webapi_soap : Web API SOAP
  • graphql : Web API GraphQL


Series Navigation<< Magento 2 Application ModesMagento 2 Request Flow >>

Leave a Reply