there might (not) be a module for that

46
There Might (Not) Be a Module For That Karen Stevenson Lullabot Consulting

Upload: nyccamp

Post on 17-May-2015

557 views

Category:

Technology


0 download

DESCRIPTION

One of the first steps in a new Drupal project is to walk through the wireframes and functional requirements of the new site to try to decide exactly how you would implement them in Drupal. Sometimes that is dead easy to do. A simple list of the titles of the latest content can be constructed using Views. Done! Sometimes that is an enormously complicated problem because there isn't any existing Drupal solution, or there are multiple possible Drupal solutions, or the Drupal solutions won't meet the functional requirements, or they don't seem to be ready for production. If you've been around Drupal for any length of time, you've heard the phrase "There's a module for that", referring to the fact that there are over 15,000 contributed modules on Drupal.org that extend the core functionality and do almost anything you might imagine anyone would ever need. Sometimes you can do a quick search of the module list, find a module that is a perfect fit for your needs, and drop it in place. But often that's not sufficient. Both the cost and the timing of a Drupal project can be significantly affected by the decision about how to respond when there is no drop-in Drupal solution that will meet the project's requirements. At Lullabot we call this the 'discovery' phase of a project -- the process of understanding the functional requirements of a new site and exploring the best ways to achieve it in Drupal. We've helped clients of all sizes determine how to use existing contributed modules to build out the site that they need, and when (and how) to respond when the existing solutions just don't work. Some of the questions this session will cover include: - How to find existing modules that might solve your problems. - How to test drive potential modules to see if they work the way you need. - Digging for sometimes obscure or hidden documentation about how the module works. - Mining the module issue queues to tell if a module is really suitable for your needs. - Deciding which version of a module is really 'safe' to use. - Choosing between alternate modules that might solve the problem. - What to do if existing modules aren't ready? - When and how to roll your own solution. - When and how to contribute your modules and/or changes back. - Validating your decisions in the face of ambiguity and uncertainty. Speaker(s): Karen Stevenson Experience Level: Intermediate

TRANSCRIPT

Page 1: There Might (Not) Be a Module For That

There Might(Not)

Be a Module For ThatKaren Stevenson

Lullabot Consulting

Page 2: There Might (Not) Be a Module For That

Getting to Drupal

Page 3: There Might (Not) Be a Module For That

Core is Not Enough

Page 4: There Might (Not) Be a Module For That

Is There A Module For That?

Page 5: There Might (Not) Be a Module For That

The Process

Identify each problem/requirementFind modules that solve itEvaluate the quality & suitability of the solutionsChoose between alternativesIf necessary, roll your own solution

Page 6: There Might (Not) Be a Module For That

Find Modules That Solve A Problem

Page 7: There Might (Not) Be a Module For That

Know the Top 20

Page 8: There Might (Not) Be a Module For That

/project/usage

Page 9: There Might (Not) Be a Module For That

/project/modules/categories

Page 10: There Might (Not) Be a Module For That

/project/modules

Page 11: There Might (Not) Be a Module For That

Search Issues Too!

Page 12: There Might (Not) Be a Module For That

Google It

Page 13: There Might (Not) Be a Module For That

Evaluate the Solutions

Page 14: There Might (Not) Be a Module For That

Well Maintained?

Number of committers and commitsHow recently committed?How many bugs relative to total issues?Balance complexity of module against pure statsUsage numbers and patternsCode quality

Page 15: There Might (Not) Be a Module For That

Is It Well Maintained?

Page 16: There Might (Not) Be a Module For That

Which Version/Branch is Safe?

Page 17: There Might (Not) Be a Module For That

Check Usage Stats

Page 18: There Might (Not) Be a Module For That

Code Quality

Is it neat and well-documented?Does it comply with Drupal coding standards?Is there a lot of commented-out code?

Page 19: There Might (Not) Be a Module For That

How Well Does It Work?

Check those issue queuesTest driveDig for documentationGoogle it

Page 20: There Might (Not) Be a Module For That

Mine the Issue Queues

Page 21: There Might (Not) Be a Module For That

Google It

Page 22: There Might (Not) Be a Module For That

DocumentationLook for README.txt or INSTALL.txtFind ‘Configure’ and ‘Help’ links on module listLook for documentation link on d.o. project pageSearch Drupal.org or Groups.Drupal.orgRead the code

Use hook_menu() to find configuration urlsLook for internal documentation

Page 23: There Might (Not) Be a Module For That

Choosing Between Alternatives

Page 24: There Might (Not) Be a Module For That

drupal.org/node/266179

Page 25: There Might (Not) Be a Module For That

Google It

Page 26: There Might (Not) Be a Module For That

Can you re-use this module?

Page 27: There Might (Not) Be a Module For That

Take Them For a Ride

Page 28: There Might (Not) Be a Module For That

Prototype

Set up a prototype siteTry out key modulesCreate a content type and key fieldsUse Devel Generate

Make fields requiredImage min/max settings

Page 29: There Might (Not) Be a Module For That

That’s a Lot of Work!!

Page 30: There Might (Not) Be a Module For That

What if the Module Won’t Do?

Too many bugsNo solid releaseBadly maintainedBadly writtenNot a good fit

Page 31: There Might (Not) Be a Module For That

Bugs

Could it be operator error?Did you try the dev version?Is there a patch?Can you write a patch?Make sure the patch is posted and marked RTBCLooking for co-maintainer?

Page 32: There Might (Not) Be a Module For That

Wrong Features

Can you adjust the requirements?Is there a feature request?Can you propose a patch?Can you use it as-is for now and customize in phase 2?

Page 33: There Might (Not) Be a Module For That

Rolling Your Own

Google. Again.Search d.o. sandbox projects.There may be issues with code snippets to get you started.Can you make it work with existing modules and some ‘glue’, rather than a total custom solution?Can you phase a custom solution in?

Page 34: There Might (Not) Be a Module For That

Contributing Back Code

Is this a problem others will have?Is there an existing module that does something similar?Can you add a new feature to existing module?Can you write code general enough for wide use?

Page 35: There Might (Not) Be a Module For That

Contributing Back

Describe what you learnedAdd documentationTest and bump patchesAdd comparisons to drupal.org/node/266179

Page 36: There Might (Not) Be a Module For That

Validating Your Decisions

Be worried if:You jumped straight to custom code instead of looking for an existing solutionYou avoided a time-tested solution because it was missing one tiny featureYou didn’t do your due diligence

Page 37: There Might (Not) Be a Module For That

Examples

Page 38: There Might (Not) Be a Module For That

Alternative Solutions for Address + GeolocationSolution #1 Solution #2

Location Module1,620 KB

Addressfield Module52 KB

Geofield Module32 KB

Geocoder Module20 KB

GeoPHP Module + Library110 KB + 193 KB

Page 39: There Might (Not) Be a Module For That

Statistics for Location

Page 40: There Might (Not) Be a Module For That

Statistics for Addressfield

Page 41: There Might (Not) Be a Module For That

Custom Code - Views Calc

Page 42: There Might (Not) Be a Module For That

Alternative Solutions for Multilingual

Content Translation or Entity Translation?Contributing Back

http://lullabot.com/articles/localized-and-multi-lingual-content-drupal-7Description and comparison of multilingual optionsSeveral pages of links to resources uncovered during research

Page 43: There Might (Not) Be a Module For That

Which Version for Organic Groups?

Version 7.1 or Version 7.2?Lack of documentationProblems in 7.1, Patches needed for 7.2

Contributing Back:lullabot.com/articles/organic-groups-drupal-7drupalize.me/series/organic-groups-drupal-7drupal.org/project/og_extras

Page 44: There Might (Not) Be a Module For That

Other Examples

Features + GlueViews Gallery Module

Choosing Between AlternativesCCK vs FlexinodeImage module vs Imagefield

Page 45: There Might (Not) Be a Module For That

Custom Code

ViewsPanelsTokenDateCalendar

Page 46: There Might (Not) Be a Module For That

Questions??