1 / 34

Are You in the Right Room?

Want to learn about Features module Are a beginner or intermediate drupaler who hasn't really used it yet Don't have an aversion to cute animals. Are You in the Right Room?. Kristen Pol CruzTech, LLC (Freelance) ‏ Web, Drupal & SEO drupal@kristen.org Santa Cruz, CA.

jasia
Télécharger la présentation

Are You in the Right Room?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Want to learn about Features module Are a beginner or intermediate drupaler who hasn't really used it yet Don't have an aversion to cute animals Are You in the Right Room?

  2. Kristen Pol CruzTech, LLC (Freelance)‏ Web, Drupal & SEO drupal@kristen.org Santa Cruz, CA Features in the Real World... The Good, The Bad & The Ugly

  3. What is the Features module Common use case How to create a feature module Reasons you should use it What can and cannot be saved What you should not save Pushing features to staging or live What We'll Cover

  4. “The features module enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together satisfy a certain use-case.” ---- drupal.org/project/features What is Features?

  5. Clear as Mud?

  6. What is Features? mycoolmodule.module

  7. Common Use Case The Old Way... DEV SITE - Step #1: Configure your content types

  8. Common Use Case The Old Way... DEV SITE - Step #2: Configure your views

  9. Common Use Case The Old Way... DEV SITE - Step #3: Configure your imagecache presets

  10. Common Use Case The Old Way... DEV SITE - Step #4: Configure your permissions

  11. Common Use Case The Old Way... DEV SITE - Step #5: Configure some other stuff

  12. How do I get all these changes to the staging and live site??? Step #1: Configure your content types Step #2: Configure your views Step #3: Configure your imagecache presets Step #4: Configure your permissions Step #5: Configure some other stuff Step #6: Pray that you didn't screw anything up Step #7: Figure out what is wrong and fix it

  13. Common Use Case The New Way... Step #1: Configure your content types Step #2: Configure your views Step #3: Configure your imagecache presets Step #4: Configure your permissions Step #5: Configure some other stuff Step #6: Create your feature module

  14. How do I get all these changes to the staging and live site??? Step #1: Copy feature module Step #2: Enable feature module Step #3: Smile!

  15. 10:45 Demo...

  16. 11:00 More Reasons...

  17. Settings are Saved in Code • Revisioning system • See changes in module • Tag revisions • Revert back to old tags

  18. Port your Module to Another Site • Reusable features • Requires careful thought • Beware of dependencies • Watch out for conflicts

  19. Share Between Developers • Sharing is nice! • Coordination is required • Different feature modules for different developers

  20. Push Changes to Staging & Live Sites • Streamline deployment • Keep sites in better sync • Less downtime

  21. Know If Something Has Changed • Spying is good • Diff module is your friend • Catch problems before they break your site

  22. What Can Be Saved? Anything* exportable or jiggered to work with features module... • CCK fields • contexts • content types • dependencies • imagecache presets • menus • menu links • mini panels • panels • permissions • roles • rules • taxonomy • variables (strongarm)‏ • views • etc...

  23. What Cannot Be Saved? • Anything already in code • Content (nodes, comments, etc.)‏ • Blocks* • Module settings that aren't exportable & aren't in variables table • * try features_extra module (in dev)‏

  24. What Should NOT Be Saved? Do NOT save variables that change automatically in code or very BAD or very UGLY things may happen...

  25. Push to Staging & Live • Make sure your feature modules are updated • Check in code to repository & create tag • Put staging/live site in maintenance mode • Back up staging/live database • Add/update any contrib modules if necessary • Push code to staging/live site • Revert feature modules on staging/live site • Do additional configuration as needed • Test! • Take out of maintenance mode

  26. The Good • Config in code • Reusable features • Better collaboration • Easier deployment • Track changes

  27. The Bad • Cannot save everything • Can have a gazillion checkboxes • UI is slow for large features • Javascript-only UI

  28. 11:15 The Ugly • Browser can crash after you have clicked a gazillion checkboxes • Saving certain variables can cause ugly things to happen • Site can crash if you update feature modules before contrib modules

  29. EXTRA Drush • drush features • drush features-update [feature-module(s)] • drush features-update-all • drush features-revert [feature-module(s)] • drush features-revert-all • drush features-diff [feature-module(s)] • drush features-export ...

  30. EXTRA Features Hooks • hook_features_api • hook_features_export • hook_features_export_alter • hook_features_export_options • hook_features_export_rebuild • hook_features_export_render • hook_features_export_revert • hook_features_pipe_component_alter

  31. Q&A

  32. Thank you...

More Related