Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Techniques for building Drupal Modules Quickly?

I'm looking to see if anyone has any resources or tips for developing basic Drupal modules faster? Have you come up with anything to make your Module development faster?

The Drupal module documentation is kinda hard to understand and pretty massive. I'm wondering if anyone has simplified it and given techniques/tips for getting specific things done quickly. I'm currently looking for Drupal 6 and 7. Any help saving time will be greatly appreciated :-)

like image 737
wajiw Avatar asked Feb 17 '11 15:02

wajiw


2 Answers

In general, I'd recommend picking up a copy of the Productive Programmer. There's nothing earth shattering in it, but there are lots of small tips that can increase your productivity incrementally.

For Drupal specifically, Pro Drupal Development and Pro Drupal 7 Development, though not focused strictly on speed of development, are indispensable.

Beyond that...

  • in the first place, if you don't have to, Don't Write Code
  • get familiar with the most commonly used hooks
  • learn to use Drush and Drush Make
  • learn to use Devel and Theme Developer modules
  • use the Schema module to generate your module's schema code, based on an existing table
  • use the Data module (+ this patch) to generate the code to expose your module's tables to Views
  • use the Form Builder module to generate form code
  • use Coder to learn the Drupal coding standards, which will help others help you
  • set up "quick searches" to allow you to quickly search api.drupal.org
  • learn the shortcuts in your IDE or text editor (I like Netbeans partially because of the Drupal plugin); print out a good cheatsheet
  • learn to use version control effectively
like image 149
Matt V. Avatar answered Sep 28 '22 06:09

Matt V.


Well, there really no fast track to it. If you understand the Drupal API regarding module development (install, menus, blocks, forms, etc) you will grasp it. The hardest part I remember was wrapping my head around the menu system.

One thing that helped was taking simple modules and seeing how they worked, and problem solving my own solutions. Reading Pro Drupal Development helps too.

like image 27
Kevin Avatar answered Sep 28 '22 06:09

Kevin