Drupalcon notes: Best Practices in Contrib Development and Support

For new, improving, and prospective module maintainers.

What's expected

You're not forced to do anything. However, if you post it, you're endorsing it. At that point, you have some responsibility. You'll need to work with the security team on fixing vulnerabilities, and support your code. Clearly communicating your intentions to your users is good, too. Poorly maintained projects give us a bad name.

Best practices: Community Management

How to enlist help:

Finding maintainers / co-maintainers:

  • Put it on your project page
  • Blog, tweet, IRC, etc
  • What makes you a good co-maintainer? Involved with issue queues, IRC, forums; likes communicating; Sloppy Sam
  • http://drupal.org/node/363367

Good tips:

  • Be responsive.
  • Involve community members.
  • Provide docs!
  • Train contributors.
  • http://drupal.org/node/467548 templates for issue status transitions
  • Remember that not everyone speaks English natively.

Best practices: Drupal Project Management

When to branch? How to maintain branches?

Release management:

Source code control:

Coding Best Practices

  • http://drupal.org/node/1354 - Doxygen doc standards
  • http://drupal.org/project/api - make your own API site!
  • http://drupal.org/handbook - put a doc page for your module in the Drupal handbook
  • Add README.txt and INSTALL.txt files to your module.
  • If your module provides hooks, make a mymodule.api.php file.
  • Always start with the module's short name
  • Avoid collisions
  • Files: mymodule.stuff.inc
  • Functions are generally modulename_noun_subject
  • Constants: define('MYMODULE_STUFFED', TRUE);
  • Hooks: function hook_mmodule_stuff_alter()
  • Classes: class MyModuleTestCase
  • Don't ever give a module, theme, or install profile the same name

Testing

Drupal standard methods and APIs

Internationalization (i19n)

Make your module themable:

all tags: