Studyon Minte9.com
Magento




Controllers



In any PHP system, the main PHP entry point remains a PHP file. Magento is no different, and that file is index.php.
          
	http://example.com/catalog/category/view/id/25
	
	catalog (module)	-- app/code/core/Mage/Catalog
	category (controller)	-- app/code/core/Mage/Catalog/controllers/CategoryController.php

As previously mentioned, if you want your Module to use Controllers, you'll need to configure them. 
Below is the configuration chunk that enables Controllers for the Catalog Module:
	
	<frontend>
	    <routers>
		<catalog>
		    <use>standard</use>
		    <args>
			<module>Mage_Catalog</module>
			<frontName>catalog</frontName>
		    </args>
		</catalog>
	    </routers>
	</frontend> 

Notice the <frontName>catalog</frontName>
This is what links a Module with a URL frontname.


Context-Based URI Model Loading

Magento offers a special way to instantiate Models, Helpers and Blocks using static factory methods on the global
 Mage class.

	Mage::getModel('catalog/product');
		//Mage_Catalog_Model_Product
	Mage::helper('catalog/product');
		//Mage_Catalog_Helper_Product 

These rules are bound by what's been setup in each Module's config file. 
When you create your own custom Module, you'll have your own grouped classnames to work with 

	Mage::getModel('myspecialprefix/modelname');


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