In Magento, files are grouped together based on functionality, which are called modules in Magento.
When you want to customize or extend Magento, rather than editing core files directly, or even placing you new
Controllers, Models, Helpers, Blocks, etc. next to Magento code, you'll create your own Modules
-- app/code/local/Package/Modulename (Package - unique name that identifies your company)
When you create a new Module, you need to tell Magento about it. This is done by adding an XML file to the folder:
There are two kinds of files in this folder, the first enables an individual Module, and is named in the form:
The second is a file that will enable multiple Modules from a Package/Namespace, and is named in the form:
In a convention-based MVC system, if you wanted to add, say, a new Controller or maybe a new Model, you'd just
create the file/class, and the system would pick it up automatically.
In a configuration-based system, like Magento, in addition to adding the new file/class to the codebase, you often
need to explicitly tell the system about the new class, or new group of classes. In Magento, each Module has a file
named config.xml. At runtime, all these files are loaded into one large configuration tree.
For example, want to use Models in your custom Module? You'll need to add some code to config.xml that tells
Magento you want to use Models, as well as what the base class name for all your Models should be.
The same goes for Helpers, Blocks, Routes for your Controllers, Event Handlers, and more. Almost anytime you
want to tap into the power of the Magento system, you'll need to make some change or addition to your config file.