• Save
Contrib First
Upcoming SlideShare
Loading in...5

Like this? Share it with your network

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 265

http://www.mediacurrent.com 261
http://mis-gryphon.mediacurrentstaging.info 4

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n


  • 1. Contrib FirstA change to how we write modules
  • 2. By Andrew RileyDirector of Drupal Development @andrewmriley
  • 3. Contrib First?http://www.mediacurrent.com/drupal-give
  • 4. Definition A method of treating your developed modules as contributed modules that you use and or adapt for your clients needs.
  • 5. 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
  • 6. Why Good for the community Good for the company Good for you Good for your client/project
  • 7. But we release modules! Really? How many? How many were never released?
  • 8. 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
  • 9. 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
  • 10. Module Anatomy 101
  • 11. “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)
  • 12. Contrib Module Exposes hooks for other modules to use Has a defined administration/configuration section Has documentation* Is reusable Follows coding standards
  • 13. How to Contrib First
  • 14. 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.
  • 15. 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?
  • 16. 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?
  • 17. 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
  • 18. 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
  • 19. The Cost Overall making a contrib first module costs anywhere between 5 - 20% additional time over creating a hardcoded client specific module.
  • 20. 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.
  • 21. Recap Figure out your requirements Search for existing modules Create your own module Host it on drupal.org
  • 22. Mediacurrent helps organizations architect custom websites byleveraging our proven processes and deep expertise in Drupal. @mediacurrent mediacurrent.com