This site is archived.

"Intro to module development" Hands-On Training - Blisstering

Class Description

Creating Modules to make Drupal Dance: An Introduction

This is a hands-on introductory course on module development. We start by introducing the structure of a well-written module and place it in the context of Drupal's architecture. Sometimes you will come across an existing module that almost does what you need but not quite -- we will talk about to extend that module. Occasionally you simply have to write a new module from scratch. You will have your ownl development sandbox as we work through the Drupal API. You will leave the class sufficient understanding of Drupal’s menu, form and hook systems and the database. Below is the sequence in which topics will be covered.

  1. Drupal Architecture -- Technology Stack, Code Base, Database.
  2. Module Architecture -- Difference between Core, Contributed, Custom Module
  3. Building Blocks of module -- Different types of files and why we use them
  4. How to create simple page using hook_menu
  5. How to create a simple block using hook_block that can be displayed in any region.
  6. How to create schema using hook_install and hook_schema
  7. How to create a simple form using hook_form and various actions like validate and submit.
  8. How to display messages and errors using drupal_set_message and drupal_set_error functions.
  9. How to alter existing forms using hook_form_alter
  10. How to theme a simple block using theme functions
  11. How to set permissions using hook_perm to view the page created in step 4
  12. How to use hook_nodeapi to do node operations
  13. A demo module will be built using all the above hooks to demonstrate how various hooks works
  14. Bonus Topics : How to use coder module for coding standards, How to debug a module using xdebug, How to use drupal with eclipse IDE.

Prerequisite: We assume you have working knowledge of PHP.