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.
- 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
webapi_rest: Web API REST
webapi_soap: Web API SOAP
graphql: Web API GraphQL