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

Contrib First

on

  • 936 views

 

Statistics

Views

Total Views
936
Views on SlideShare
671
Embed Views
265

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 265

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

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Contrib First Contrib First Presentation Transcript

  • Contrib FirstA change to how we write modules
  • By Andrew RileyDirector of Drupal Development @andrewmriley
  • Contrib First?http://www.mediacurrent.com/drupal-give
  • 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