Studyon Minte9.com
Magento




Modules



In Magento, files are grouped together based on functionality, which are called modules in Magento. 
	-- app/code/core/Mage/Checkout

Your Code

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:

	-- app/etc/modules

There are two kinds of files in this folder, the first enables an individual Module, and is named in the form: 

	-- Packagename_Modulename.xml

The second is a file that will enable multiple Modules from a Package/Namespace, and is named in the form: 

	-- Packagename_All.xml


Configuration-Based MVC

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.

	<models>
	     <packagename>
		  <class>Packagename_Modulename_Model</class>
	    <packagename>
	</models> 

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.


http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-1-introduction-to-magento#1