Discussion and demo of current Drupal development trends focusing on the Features module solution to the Drupal migration and revision control problem.
2. Old Drupal Paradigm Extend Drupal core with modules in order to add functionality Modules added content types, blocks, and queries with Drupal API calls and hooks Modules added site functionality including end to end workflow
4. “Functionality” Modules Pros One click install Worked out of the box Established workflow Cons Inflexible Too many assumptions made Required coding to change Tough to customize
6. CCK/Views Paradigm Create some content types with the fields we need (text, images, videos, dates, currency, locations, etc) Reference content types to content and users Create nice lists of these things for display and search (Views, Node & User References) Create some blocks to display when our users are interacting with these features
7. Contrib Module developers began contributing smaller modules made to target specific tasks Sitebuilders use these lighter modules to build their desired functionality in a more custom way like assemblingLego™ blocks Examples: Views plugins, specific CCK fields, Nodereference widgets, GMAP, Rules, Workflow - all geared towards a CCK/Views paradigm
8. CCK/Views Functionality Pros Incredibly flexible Only minor glue modules needed if any code at all Can completely control workflow, forms, queries, lists, and display Clients now get almost exactly what they want Cons Configuration is in the database Lots of time spent on configuration clicking through the U/I Portability, Version Control, Dev+Staging+Production We lost the one click install
9. This is great, this “feature” works exactly how I want it to.
10. Oh crap, now everything’s in the database. How do I get it out?
12. Exportables Views (Export/Import UI) CCK Export/Import Panels 3 Context Boxes Strongarm (Drupal Variables Table) Ctools – API to expose custom module vars
13. Context and Features Wouldn’t it be great if you could define the functionality you want your site to have, build the pieces separately, or maybe, some for now and some for later. It sure would be nice if I could build a cool feature once and deploy it wherever I want by clicking a check box. Or better yet, develop it offline and deploy it.
14. The Features Module A module that builds modules from exportables Provides a UI to gather exportables related to site functionality (a feature) Creates and manages .info, .module and other files Custom hooks can be added The best of both worlds
15. Context A module that allows sitebuilders to layout their site into logical sections by controlling conditions and reactions Block visibility, body classes, active menus, custom plugins Replaces block admin page Exportable
16. Context Theme Gotchas Theme functions hook_block Menu Trees Primary Links preprocess_page