What is an area?

An area means a web service’s area.

Magento uses areas to efficiently make web service calls, loading only the dependent code for that area. Examples of areas include the storefront (frontend), Magento Admin (adminhtml, the administration interface), and the WebAPI framework (webapi_rest).
http://devdocs.magento.com/guides/v2.0/architecture/areas/areas.html


The purpose of areas is efficiency.
If you are invoking a REST web service call, for example, rather than load up all the code related to generating user HTML pages, there is a separate area (such as /rest) which loads code that knows only how to answer the REST call (and not generate HTML pages using layouts).
Each area can have completely different code on how to process URLs and requests.
http://devdocs.magento.com/guides/v2.0/architecture/modules/mod_and_areas.html

The Magento 2 core uses the following area codes:

  • admin
  • adminhtml
  • catalog
  • crontab
  • doc
  • frontend
  • global
  • setup
  • webapi_rest
  • webapi_soap

The official documentation mentions only 3 of them (may be because it is outdated, or for another reason):

http://devdocs.magento.com/guides/v2.0/architecture/modules/mod_and_areas.html
http://devdocs.magento.com/guides/v2.0/architecture/areas/areas.html

1 Like