Class Naming Conventions and the Autoloader

The way classes are named in Magento was taken from the Zend Framework, upon which Magento was developed.

Class names are standardized depending on their location on the file system. This standardization enables automatic class loading. The Magento autoloader is built in /app/Mage.php. Because class names are directly related to a specific path in the file system, the autoloader allows developers to include them without using include_once or require_once. A class named Mage_Page_Helper_Data, for example, would be found at /app/code/core/Mage/Page/Helper/Data.php

The Main Magento Design Areas

Magento Design Areas
Magento Design Areas
All UI files are contained in three main Magento design areas.

  • /install – files controlling display during installation process
  • /adminhtml – files controlling display of everything you observe while working in the admin panel.
  • /frontend – files controlling display of everything you observe as a customer of the store