Recipes for Drupal distributions

1,752 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,752
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Recipes for Drupal distributions

  1. 1. Recipes for Drupal distributions Lakshmi Narasimhan @lakshminp
  2. 2. Outline of this talkChapter 0 – IntroChapter 1 – Anotomy of a distributionChapter 2 – So, one fine saturday afternoon...Chapter 3– Business modelsChapter 4 – Now what?Questions
  3. 3. Chapter 0 Intro
  4. 4. About meZero web programmingexperienceuntil 2 years agoInitially a djangonautstarted tinkering withdrupal in 2010Havent looked back
  5. 5. The drupal model of a site
  6. 6. Its a cms
  7. 7. A Framework?
  8. 8. Platform...
  9. 9. er... Product.
  10. 10. So, I want to create a blog
  11. 11. api Daily, weekly and wysiwyg monthly archives Tag cloud CAPTCHASEO Recent comments, recent posts etc. sitemap Media management search Backupn Wp import restore polling
  12. 12. Any drupal solution which does this...
  13. 13. Any drupal solution which does this... Out of the box?
  14. 14. Enter distributions.
  15. 15. Custom editions of drupal
  16. 16. Custom editions of drupal Tuned to a desired set of features
  17. 17. Custom editions of drupal Tuned to a desired set of featuresDoes one job well
  18. 18. Custom editions of drupal Tuned to a desired set of featuresDoes one job well ...usually.
  19. 19. wiki blog Online shop videos Q&A Social network
  20. 20. Distributions can even be non-functionalpressflow mongodb
  21. 21. Chapter 1Anatomy of Drupal distributions
  22. 22. Distros started life in Drupal 5. Gained good momentum in 6.Improved in drupal 7.
  23. 23. Each distro is wrapped in a profile Profile similar to a module .info, .profile, .install, .make.
  24. 24. .infobasic info aboutyour distro.your module andtheme dependencies..installperform upgrades andinstall tasks
  25. 25. .profilesite specificinstallationEx:1. adding avocabulary2. sample content3. adding new users.
  26. 26. configurations to be presentin site before starting touse it.core modules already importedby drupal.contrib modules.Ex:ctools, pathauto.best practice: put under"contrib"custom modules.your own modules, but notunder drupal.org(yet!)best practice: put under"custom"
  27. 27. .make file contents:(contd)Themes, both custom andcontrib.Libraries.Any other dependecies foryour module.Ex:CKEditor js library forwysiwyg module.
  28. 28. projects[ctools][subdir] = "contrib"projects[ctools][version] = "1.0-rc1"...projects[save_as_draft][type] = moduleprojects[save_as_draft][download][type] = "git"projects[save_as_draft][subdir] = "custom"projects[save_as_draft][download][url] =git://github.com/druplug/save_as_draft.git...; Themesprojects[blogbuzz][subdir] = "contrib"projects[blogbuzz][version] = "1.0-rc2"...libraries[ckeditor][download][type] = "get"libraries[ckeditor][download][url] ="http://ckeditor/download/source"libraries[ckeditor][download][directory_name] = "ckeditor"libraries[ckeditor][download][destination] =
  29. 29. Features. Best way to package drupal distributions.
  30. 30. Features. Best way to package drupal distributions. Modular piece of functionality for a distro
  31. 31. Features. Best way to package drupal distributions. Modular piece of functionality for a distroAll configuration is stored in code http://bit.ly/dev-staging-workflow
  32. 32. Some drupal entities exported byfeature content types views nodes & taxonomies(using uuid) variables andsettings(strongarm) user permissions text input formats <insert your fav. here>
  33. 33. Writing your own featurefeatures work on a set of hooks.Each hook does a specific tasktowards building an exportablefeature.
  34. 34. Feature hookshook_features_api()defines the entity we are goingto export. Ex: views.
  35. 35. Feature hookshook_features_export()defines the contents of theentity we are going to export.Ex: the widget type and displayoptions if we are exporting afield.Related dependencies.
  36. 36. Feature hookshook_features_export_render()renders the exported part ascode.
  37. 37. functionbloggio_features_filter_default_formats() { $formats = array(); // Exported format: CKEditor $formats[ckeditor] = array( format => ckeditor, name => CKEditor, cache => 1, status => 1, weight => 0, filters => array(), ); return $formats;}
  38. 38. Drush make
  39. 39. Drush make One step makefile for your distro
  40. 40. Drush make One step makefile for your distroStub makefile
  41. 41. Drush make One step makefile for your distroStub makefile profile makefile
  42. 42. Contrib stuff + features + drush make = distributions
  43. 43. Missing ingradient
  44. 44. testing
  45. 45. Things break.
  46. 46. Things break. Core upgrade?
  47. 47. Things break. Core upgrade? New version of a module
  48. 48. Simpletest.
  49. 49. simpletestmodelled after simpletest phplibrary.
  50. 50. simpletestmodelled after simpletest phplibrary.Part of the core in Drupal 7.
  51. 51. simpletestmodelled after simpletest phplibrary.Part of the core in Drupal 7.can be automated fromcommandline(drush).
  52. 52. simpletestmodelled after simpletest phplibrary.Part of the core in Drupal 7.can be automated fromcommandline(drush).Which begs the question....
  53. 53. How to automate all this?
  54. 54. How to automate all this?Continuous integration
  55. 55. Drupal + CIhook up your version controlwith Jenkins.(in case of github, a postreceive hook.)
  56. 56. Drupal + CIhook up your version controlwith Jenkins.(in case of github, a postreceive hook.)Jenkins runs the simpletest foryour distro
  57. 57. Drupal + CIhook up your version controlwith Jenkins.(in case of github, a postreceive hook.)Jenkins runs the simpletest foryour distroyou get a report of some sort.
  58. 58. Drupal + CIdownload this book.(free!).(http://www.wakaleo.com/books/jenkins-the-definitive-guide)
  59. 59. Drupal + CIrun-tests.sh is yourfriend.Emits junit-compatibleXML, plays well withJenkins.
  60. 60. Other testing ideasCoder module(http://drupal.org/project/coder)Selenium(http://drupal.org/project/selenium)
  61. 61. Site ideas + hard testing +distributions = reliable, reusable, zero config apps.
  62. 62. Chapter 2So, one fine saturday afternoon...
  63. 63. We started an idea calledDruplug.
  64. 64. We started an idea calledDruplug.Wordpress is a platform superoptimized for blogs.
  65. 65. We started an idea calledDruplug.Wordpress is a platform superoptimized for blogs.Drupal is aCMS/framework/platform which canbe super optimized for wiki,blogs, forums, Q&A sites,<insertyour own site pattern here>
  66. 66. We started an idea calledDruplug.Wordpress is a platform superoptimized for blogs.Drupal is aCMS/framework/platform which canbe super optimized for wiki,blogs, forums, Q&A sites,<insertyour own site pattern here>Some awesome distros already outthere.
  67. 67. We want to make them better.
  68. 68. We want to make them better. Portmanteau of Drupal and pluggable.
  69. 69. We want to make them better. Portmanteau of Drupal and pluggable. Conquering the world, one distribution at a time.
  70. 70. We thrive on a set of visions
  71. 71. We thrive on a set of visionsMake superb distributions
  72. 72. We thrive on a set of visionsMake superb distributions Test, test, test.
  73. 73. We thrive on a set of visionsMake superb distributions Test, test, test. Stick to the Drupal way.
  74. 74. Dont hack core. Collaboration rather than competition. Follow module writing guidelines. http://bit.ly/module-manifesto
  75. 75. Chapter 3Business models
  76. 76. How to make money?
  77. 77. The open source wayGive away distributions forfree.
  78. 78. The open source wayGive away distributions forfree.Build an ecosystem around it.
  79. 79. The open source wayGive away distributions forfree.Build an ecosystem around it.Themes, support, customizationetc.
  80. 80. Examples of customizationwiki with a badge systemmultiuser blog with affiliatemanagementEmerging pattern:<base part> + <custom fitting>
  81. 81. There are other models too.
  82. 82. bleeding edge -> open source andfreeTested and stable -> $$
  83. 83. Offer distributions as SaaS.
  84. 84. Chapter 4 Now what?
  85. 85. Go and build distributions.
  86. 86. Fork us on github. Github.com/druplug
  87. 87. Report bugs.
  88. 88. Spread the word.
  89. 89. Spread the word.Follow or development in twitter.
  90. 90. @druplugSpread the word.Follow or development in twitter.
  91. 91. Slides will be madeavailable online @ lanyrdand slideshare in a while.
  92. 92. Thank you for having me.
  93. 93. ?
  94. 94. Image creditshttp://www.flickr.com/photos/origamiancy/3595747075/http://www.flickr.com/photos/yandle/3347966806/http://www.flickr.com/photos/kazk/198640938/http://www.flickr.com/photos/kinghuang/3226925608/http://www.flickr.com/photos/alexkerhead/3495304775/http://www.flickr.com/photos/jennycu/3602064857/http://www.flickr.com/photos/colinkinner/2200500024/http://www.flickr.com/photos/vfsdigitaldesign/5396011779/http://www.flickr.com/photos/vfsdigitaldesign/5396638970/http://www.flickr.com/photos/dnwallace/4344120241/http://www.flickr.com/photos/joeshlabotnik/305410323/http://www.flickr.com/photos/jetalone/1787639152/http://www.flickr.com/photos/evergreenkamal/384258822/http://www.flickr.com/photos/restlessglobetrotter/448362507/http://www.flickr.com/photos/blyzz/4534655474/http://www.flickr.com/photos/askdavetaylor/4261149346/http://www.flickr.com/photos/myfuturedotcom/6053500178/http://www.flickr.com/photos/lizadaly/2945260782/http://www.flickr.com/photos/enerva/4302079406/http://www.flickr.com/photos/thales/5249512668/http://www.flickr.com/photos/roblee/2697052/http://www.flickr.com/photos/39747297@N05/5229733647/http://www.flickr.com/photos/stopbits/5422661273/http://www.flickr.com/photos/54400117@N03/5069108088/http://www.flickr.com/photos/carbonnyc/365132202/http://www.flickr.com/photos/vizzzual-dot-com/2232185965/http://www.flickr.com/photos/hulagway/5162234765/http://www.flickr.com/photos/eusebius/4486572552/
  95. 95. Colophon:made using Open office 3.2.1 on anUbuntu.Fonts used:PurisaFranchiseInconsolata

×