Native Module Development
Many CiviCRM customizations have been packaged and distributed as Drupal modules. This can be desirable when a customization delves into both the CMS and CRM functionality, but -- when a customization focuses only on CiviCRM -- Drupal modules are a drag: they need to be patched for CMS upgrades (D6/D7) as well as CRM upgrades (Civi 2.x/Civi 3.x), and they don't work with CiviCRM's other CMS's (Joomla and WordPress).
Fortunately, dlobo has been making progress on support for native modules (built around the "CiviCRM Extension" system) in 4.1 and 4.2. An example module is here:
Of course, this still poses a challenge: a native module needs to use native tools for packaging code, adding new web pages, developing templates, etc. -- and all those tools come with a learning curve. To improve the learning curve, I've taken a first stab at implementing a code-generator:
For example, to make a new module with a new web-page, one would go to the command-line and enter:
- civix init com.example.mymodule
- cd com.example.mymodule
- civix add-page HelloWorld civicrm/hello
That works for development on one CiviCRM site; to create a redistributable .zip file, just do one more step:
- civix build
At this point, civix is a proof-of-concept -- it works for me, but it hasn't been stress-tested, and it lacks some important features (such as creating web-forms, web-services, or DB tables). Before doing another development session to tackle these features, I wanted to circulate the PoC for a few reactions.
So: what do you think?