Joomla vs. Drupal Development

drhansenjr - July 5, 2009 - 06:19

I have been working with Joomla for a few years now and am finding myself a little frustrated by the complexity/difficulty of component (module in Drupal-speak, I believe) development, and am exploring Drupal as an alternative. Does anyone have any thoughts on this issue? What are some of the key, high-level differences?

=-=

VM - July 5, 2009 - 07:25

I'd think the most major difference is drupal hook mechanisms.

api.drupal.org may be of benefit and the module developer guide in the documentation area.

I have never written

marcvangend - July 5, 2009 - 08:02

I have never written components myself back in the days I used Joomla, but I can tell you a couple of things I have learned since I switched to Drupal. The most important difference is what I call the 'API mentality'. Drupal developers tend to write flexible, re-usable, more abstracted modules, so their code can be extended by other modules. Joomla components are (or at least used to be) monolithic scripts that do not work together easily.

Once you have learned some basic concepts, writing a simple Drupal module is actually quite easy. Common tasks (ie. adding a field to a form, directing a url with parameters to a custom function, adding db tables when a module is installed) can be accomplished with only a couple of lines of code. However the initial learning curve is known to be steeper than Joomla's. Some of the basic concepts you will have to learn about are:
- The basic building blocks like nodes, taxonomy, users, roles, permissions.
- Hooks (http://api.drupal.org/api/group/hooks). A 'hook' is a point in another module where other modules are asked for their input or changes. A 'hook implementation' is a function in your own module which responds when a hook is invoked.
- The Forms API (FAPI, http://api.drupal.org/api/file/developer/topics/forms_api.html/6): a way to describe forms in arrays (so they can be altered easily), to render forms and to standardize form handling.
- The menu system (http://api.drupal.org/api/group/menu/6) does more than just putting menu's on your page: it takes care of routing http requests (a url) to the appropriate function.

I hope that helps.

 
 

Drupal is a registered trademark of Dries Buytaert.