Upload
nyccamp
View
557
Download
0
Tags:
Embed Size (px)
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
Citation preview
There Might(Not)
Be a Module For ThatKaren Stevenson
Lullabot Consulting
Getting to Drupal
Core is Not Enough
Is There 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
Find Modules That Solve A Problem
Know the Top 20
/project/usage
/project/modules/categories
/project/modules
Search Issues Too!
Google It
Evaluate the Solutions
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
Is It Well Maintained?
Which Version/Branch is Safe?
Check Usage Stats
Code Quality
Is it neat and well-documented?Does it comply with Drupal coding standards?Is there a lot of commented-out code?
How Well Does It Work?
Check those issue queuesTest driveDig for documentationGoogle it
Mine the Issue Queues
Google It
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
Choosing Between Alternatives
drupal.org/node/266179
Google It
Can you re-use this module?
Take Them For a Ride
Prototype
Set up a prototype siteTry out key modulesCreate a content type and key fieldsUse Devel Generate
Make fields requiredImage min/max settings
That’s a Lot of Work!!
What if the Module Won’t Do?
Too many bugsNo solid releaseBadly maintainedBadly writtenNot a good fit
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?
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?
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?
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?
Contributing Back
Describe what you learnedAdd documentationTest and bump patchesAdd comparisons to drupal.org/node/266179
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
Examples
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
Statistics for Location
Statistics for Addressfield
Custom Code - Views Calc
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
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
Other Examples
Features + GlueViews Gallery Module
Choosing Between AlternativesCCK vs FlexinodeImage module vs Imagefield
Custom Code
ViewsPanelsTokenDateCalendar
Questions??