patterns drupal camp pune09

15
Vojislav Jovanovic | [email protected] Jonathan Hebel | [email protected] Patterns Module Managing and automating site configuration Drupal Camp, Pune 2009

Upload: drupalindia

Post on 24-May-2015

920 views

Category:

Technology


1 download

DESCRIPTION

This presentation will be delivered by vaish and jonathan on 31st jan '09 in drupal camp pune.

TRANSCRIPT

Page 1: Patterns Drupal Camp Pune09

Vojislav Jovanovic | [email protected]

Jonathan Hebel | [email protected]

Patterns ModuleManaging and automating site configuration

Drupal Camp, Pune 2009

Page 2: Patterns Drupal Camp Pune09

The Problem

Drupal site configuration is:● time consuming● tedious● repetitive● lacking a streamlined approach

Page 3: Patterns Drupal Camp Pune09

The Solution

With Patterns Module site configuration can be:● saved● managed● automated ● shared

Page 4: Patterns Drupal Camp Pune09

How it works

Basic outline:● site configuration is saved in XML files called “Patterns”

● Patterns module handles programmatic form submissions using configuration defined in the XML Pattern file

Page 5: Patterns Drupal Camp Pune09

Demo

Let's begin with a fresh install of Drupal 6:● add Patterns module● add any/all required modules● run a Pattern● oooh! aaah!

Page 6: Patterns Drupal Camp Pune09

Patterns

A closer look at Patterns and how to create them:● XML● essential tags: <pattern>, <info>, <modules> and <actions>

● defining functionality● calling other Patterns● Patterns form helper

Page 7: Patterns Drupal Camp Pune09

Patterns Module architecture

Core module:● Patterns management● Import● Execution

Page 8: Patterns Drupal Camp Pune09

Patterns Module architecture

● block● content● imagecache● menu● node● pathauto

● patterns● profile● system● taxonomy● user● views● and more coming...

Components:

Page 9: Patterns Drupal Camp Pune09

Patterns execution workflow

A closer look at how the module works:● enable all required modules● execute all actions in the order they were defined in the Pattern file

● each action emulates one form submission● build $form_values array and additional params and pass it to drupal_execute()

Page 10: Patterns Drupal Camp Pune09

The Future

What's in store for the future:● pattern exporter, recorder● configuration framework● pluggable input format support (YAML)● make it easier to write components● Integration with install profiles● possible inclusion of configuration framework in Drupal Core

Page 11: Patterns Drupal Camp Pune09

Getting started

A few helpful resources:● Get the Patterns modulehttp://drupal.org/projects/patterns

● Check out the documentationhttp://drupal.org/node/346509

Page 12: Patterns Drupal Camp Pune09

User involvement

Participate!● use module and report bugs, request featureshttp://drupal.org/project/issues/patterns

● help improve documentation● Pattern user group on D.O.http://groups.drupal.org/patterns

Page 13: Patterns Drupal Camp Pune09

Developer involvement

Possible ways to help:● submit patches● write components● write patterns

Page 14: Patterns Drupal Camp Pune09

Module Maintainers

Possible ways to take advantage and/or help:● write components for your own module● consider using patterns for defining your module configuration or example setups

Page 15: Patterns Drupal Camp Pune09

Questions, please.

If any questions, ideas etc. came to your mind during the presentation, feel free to ask/share!