As we know now magento directory structure (refer for directory structure). Now, let’s create one basic Hello World custom module. In that we just display one static message. So for that create below mentioned directory structure in side your root directory.

app/etc/modules/Webmull_Helloworld.xml
app/code/local/Webmull/Helloworld/etc/config.xml
app/code/local/Webmull/Helloworld/Block/Helloworld.php
app/code/local/Webmull/Helloworld/controllers/IndexController.php
app/design/frontend/rwd/webmull/layout/helloworld.xml
app/design/frontend/rwd/webmull/template/helloworld/helloworld.phtml

Create global configuration file inside etc directory:

As for custom module, we have to tell to magento system for it global configuration like it’s active or not and/or which ‘Code Pool’ we have to use for our module. This can we done with global ‘etc/module’ directory. We have to create one file under the app/etc/modules/Modulename.xml. Please remember name of first character of ‘namespace’ and ‘modulename’ must be Capital. In our case we can set our global configuration under below file:

Create module configuration file inside app/code/coodPool/Namespace/Modulename/etc/config.xml:

In module configuration file we mention module version, block path, resources path, routers information & layout information. Please add below code into below mentioned file:

 Create block file :

Block file is a class file and extended from Mage_Core_Block_Template. Please add below code in mentioned file:

 Create controller file:

Controller is use for write business logic which also responsible to load layout and render layout. Controller file is class which extends with Mage_Core_Controller_Front_Action. Please add below code in mentioned file:

  Create layout configuration file:

In layout configuration file we are specify the layout reference, controller name, block information. Please add below mentioned code into layout file:

 Create template file:

Template file responsible to display output on website. We generally create phtml file for same. So our simple module we just put static message. Please add below mentioned code into specific file:
So we are done. Now just link module url (helloworld/index/index) with any menu as per other article. We will add more functionality into this module with other article.