Building and Deployment of Drupal sites with Features and Context
Upcoming SlideShare
Loading in...5
×
 

Building and Deployment of Drupal sites with Features and Context

on

  • 4,471 views

Slides for Features and Context modules in Drupal presented at Drupalcamp Bulgaria 2011.

Slides for Features and Context modules in Drupal presented at Drupalcamp Bulgaria 2011.

Statistics

Views

Total Views
4,471
Views on SlideShare
4,471
Embed Views
0

Actions

Likes
6
Downloads
69
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  •   Hello everyone, My name is Svilen Sabev. I started exploring open source since 2003 and met Drupal in 2007. I work for Propeople more than 4 years. I guess you already know that Propeople is a great company.

Building and Deployment of Drupal sites with Features and Context Building and Deployment of Drupal sites with Features and Context Presentation Transcript

    • Building and Deployment of
    • Drupal sites with
    • Features and Context
    • by Svilen Sabev
    • at DrupalCamp Sofia 2011
    • on 23 Jan 2011
    • We love Drupal because
    • Drupal is robust content management system with great possibilities that can be used to build almost any kind of website
    • Drupal has a lot of contributed modules to solve problems and to make different desirable solutions
    • Drupal has great community all over the world
    • Frequent tasks
    • create content types and CCK fields
    • create taxonomy vocabularies and terms
    • configure imagecache presets
    • create views to display content
    • build panel pages to position content
    • setup user roles and permissions
    • Problems
    • Business decisions and configuration settings are in database
    • Making changes and deployment is time consuming and error prone process
    • No history log of modifications
    • No organization of site’s features
    • The Solution
    • A module that would automatically package any of your site’s features into another module for you to download and share
    • Features module
    • Features is a Drupal module created by Development Seed
    • Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module
    • http://drupal.org/project/features
    • Features moves configuration from the database to code
    • Features lets you organize your project
    • Features lets you control your site’s features with version-controlled systems
    • Features makes deployment easy
    • Features lets you share and reuse configurations
  •  
    • What can be exported?
    • Content types
    • CCK fields
    • Views
    • Imagecache presets
    • Ctools (Panels, Variables, Feeds, Data and more)
    • User roles and permissions
    • Menus and menu links
    • Input formats
    • Context
    • What is difficult to be exported?
    • Vocabularies
    • Nodequeues
    • Nodes, Terms and Users *
    • because Features hates sequential IDs
    • http://drupal.org/project/features_extra
    • http://drupal.org/project/uuid_features
    • Let’s see Features in demo
    • Think how to organize
    • Separate features by context
    • (News, Events, Gallery, Videos, Homepage)
    • Separate features by components
    • (Imagecache, Views, Panels, Permissions, Menus)
    • Make reusable features
    • Don’t share same CCK field with different configurations between two features
    • Be careful with dependencies
    • Deployment process
    • Build on development site locally
    • Show staging site to the client
    • Update the result on production site
    • Workflow of Deployment Process in team
    • Darin create a content type and the CCK fields on his local development site. He package everything as a feature and commit that module to the repository
    • I update my repository, install the feature and automatically receive the configuration that Darin created. I add couple views and imagecache presets and attach them to that feature.
    • Darin update and make adjustments on fields. He commits the changes.
    • I update and overwrite styles for views and commit again.
    • Jens update his repository and fixes our configurations. He commits the changes to our staging site and install the feature. If the client is satisfied he can upload the feature to production site.
    • The advantages
    • Every feature modification is logged
    • Features makes deployment easy
    • Features makes reuse of configuration possible
    • Changes by clients will be logged and can be easily reverted.
    • Component states
    • Feature keeps tracks on following things to define its component states:
    • Current configuration in code
    • Change of current configuration in code with svn update
    • Configuration represented in database
    • Features determines components in following states:
    • Default, Overridden, Needs Review, Rebuilding, Conflict
    • Drush and Features
    drush features List all the available features on your site and their status. drush features-export [feature name] [component list] Write a new feature in code containing the components listed. drush features-update [feature name] Update the code of an existing feature to include any overrides from your database drush features-revert [feature name] Revert a feature in your site's database to the state described in your code drush features-diff [feature name] Show a diff between a feature's database components and those in code.
    • Kit
    • A set of guidelines that facilitates
    • building compatible and interoperable
    • Feature modules.
    • KIT Feature Specification (kitf 1.0-draft)
    • KIT Theme Specification (kitt 1.0-draft)
    • http://drupal.org/project/kit
    • Context module
    • Context allows you to manage contextual conditions and reactions for portions of your site.
      • Conditions are set of rules that are checked during page load to see what context is active.
      • Any reactions that are associated with active contexts are then fired.
    • Think for context like sections of the site
    • Basic “News” context
    • Conditions
      • Menu item “News” is clicked
      • Node type “News” is opened
    • Reactions
      • Menu item “News” is active
      • News categories block in right sidebar
    • Define context layouts
    • layouts[columns][name] = "Columns"
    • layouts[columns][description] = "Three column layout."
    • layouts[columns][stylesheet] = "layout-columns.css"
    • layouts[columns][template] = "layout-columns"
    • layouts[columns][regions][] = "header"
    • layouts[columns][regions][] = "content"
    • layouts[columns][regions][] = "left"
    • layouts[columns][regions][] = "right"
    • Drupal Thursdays
    • For you that want to learn advanced Drupal from the developers and themers in Propeople
    • Location: Sofia, Pirin 40A street
    • Date: Every Thursday from ~19.30
    • More info: http://groups.drupal.org/bulgaria
    • We’re hiring 
    • Team Lead / Senior PHP developer
    • PHP / Drupal developers
    • Senior HTML developer
    • Interested?
    • Talk with Welin or Rumen
    • Thank You!
    • Any questions?