Definition A method of treating your developed modules as contributed modules that you use and or adapt for your clients needs.
What it isn’t Creating a module for your client with the best intentions to go back once the site has launched and submit it to drupal.org
Why Good for the community Good for the company Good for you Good for your client/project
But we release modules! Really? How many? How many were never released?
Won’t it take more time? Public modules/sandboxes are a give and take Community will sometimes provide patches Community will often times request new features Either way, you, the company and the community are benefiting
Eat our own dog food Save fellow developers from recreating the wheel Its always nice when a module’s author is on staff You code to a higher standard when others are watching
Module Anatomy 101
“Glue” module Glues together two or more contrib modules Quick and dirty Addresses client needs but is very client specific Isn’t reusable Not always a bad thing (when used properly)
Contrib Module Exposes hooks for other modules to use Has a defined administration/configuration section Has documentation* Is reusable Follows coding standards
How to Contrib First
Steps Figure out how client specific your requirements are Find out if it already exists Can you hook or modify an existing module* Write your contrib module and commit it Write your glue module Profit? Your module is already published on d.o.
Client Specific? How much of this module will only be used by this client? Can you split out client specific code into a glue module? In this case does “client specific” really mean “industry specific”? Does it really have to be client specific?
Don’t duplicate work How close is an existing module? Does the related module provide hooks for you to use? Could your functionality help an existing contrib module? Is there an abandoned contrib module?
Write your own No hardcodes and limited constants Include an administration/config page for everything Add in hooks. You may not need them but somebody else might. It doesn’t have to be perfect. USE THE CODER MODULE
drupal.org You NEED to have access to create full projects Anybody can create sandboxes You can have multiple sandboxes Sandboxes are baby projects for development
The Cost Overall making a contrib first module costs anywhere between 5 - 20% additional time over creating a hardcoded client specific module.
End Result? You have either: Saved your company time/money by re-using existing modules (and contributing back changes) - or - Made yourself and your company more marketable by publishing a new module all while helping out the community and your client/project.
Recap Figure out your requirements Search for existing modules Create your own module Host it on drupal.org
Mediacurrent helps organizations architect custom websites byleveraging our proven processes and deep expertise in Drupal. @mediacurrent mediacurrent.com