SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
Automating Drupal
Development with Patterns:
    introducing 7.x-2.x
              David Rozas and many others


   This work was partly supported by the Future and Emerging
   Technologies Programme (FP7-COSI-ICT) of the European
   Commission through the project QLectives (grant no.:231200).
A brief presentation ...
    David Rozas Domingo (@drozas)

●   Almost 3 years working with Drupal.

●   Recently joined CRESS (Centre for Research in Social
    Simulation) at University of Surrey (UK).

●   Interest areas: free software, education and technology,
    distributed systems programming, CSCW, collaborative
    learning, socially intelligent information systems, …

●   +info: http://www.davidrozas.com
                         DrupalCamp London 2013
     02-03-2013                                            2
                             www.qlectives.eu
the others…

    Stefano Balietti (ETH)

    Liao Hao (Uni Fribourg)

    Xiao Rui 肖锐 (Uni Science & Tech. China)

    Dengcheng Yan 颜登程 (Uni Science & Tech. China)

    Matus Medo (Uni Fribourg)

    Zhou Yanbo 周艳波 (Uni Fribourg)

    Dirk Helbing (ETH)

    Vahe Tshitoyan (ETH)

    Vahan Hovhannisyan (ETH)

    Christoph Schwirzer (ETH)

    Christian Schulz (ETH)

    Sasa Tomic (ETH)

    Mark Jelasity (Uni Szeged)

    Kornél Csernai (Uni Szeged)

    Tamas Kojedzinszky (Uni Szeged)

    Nigel Gilbert (Uni Surrey)

    Maria Xenitidou (Uni Surrey)




                             DrupalCamp London 2013
02-03-2013                                            3
                                 www.qlectives.eu
Outline
 ●
     The big picture: QLectives and QScience
 ●
     Patterns overview: components and
     Patterns files
 ●
     Patterns 7.x-1.x
 ●
     Introducing Patterns 7.x-2.x new
     features


                      DrupalCamp London 2013
02-03-2013                                     4
                          www.qlectives.eu
Outline
    ●
        The future: CM in Drupal 8
    ●
        A bit of code: making a module
        “Patterns Ready”
    ●
        Future Work
    ●
        Demo
    ●
        Q&A

                      DrupalCamp London 2013
02-03-2013                                     5
                          www.qlectives.eu
The big picture: QLectives
●
    What is quality?

●
    If half a million people give a YouTube
    video the thumbs up, does that mean it is
    good?

●
    Perhaps... but you would probably rather
    watch a recommendation from a friend

●
    Can we do it in a “P2P” way?
                   DrupalCamp London 2013
02-03-2013                                      6
                       www.qlectives.eu
The big picture: QLectives

 ●
     Take features of social networking to
     help groups of people share
     resources: from home videos to
     scientific papers

 ●
     Quality ratings in a distributed way


                  DrupalCamp London 2013
02-03-2013                                   7
                      www.qlectives.eu
The big picture: QLectives
Two application domains:

●
    QMedia: P2P media distribution fully
    decentralized - http://www.tribler.org

●
    QScience: distributed platform for
    scientists allowing them to locate or
    form new communities and quality
    reviewing mechanisms
                  DrupalCamp London 2013
02-03-2013                                   8
                      www.qlectives.eu
QScience: Science today
From...




        Rembrandt, “A Scholar” (1631)



                 To...



                           Community
                                                                  Networks

                                                       Big Data

                                        DrupalCamp Spain 2012
02-03-2013                                                                   9
                                           www.qlectives.eu
Can we have it all?

●
    Many software packages are available that fit
    one (or more) of those needs, but not all.

●
    QScience is an attempt to pull them all
    together in a modular fashion: a Drupal
    distribution




                     DrupalCamp London 2013
02-03-2013                                          10
                         www.qlectives.eu
QScience: contributing back
●
    Patterns: configuration management

●
    D2D (DrupalToDrupal): secure exchange of
    information between different Drupal instances in
    a P2P network.

●
    QTR: Implements a Quality Trust and Reputation
    algorithm to rate contents (e.g.: academic
    publications) in Drupal.

●
    Living Science: Drupal based search and
    visualization tool.
                      DrupalCamp London 2013
02-03-2013                                              11
                          www.qlectives.eu
Patterns

●   What we want: reuse and share
    configuration.

●   The main issue: configuration and
    data are mixed up in the DB.

●   Patterns allows developers to take
    control of it.

                 DrupalCamp London 2013
02-03-2013                                12
                     www.qlectives.eu
Patterns




             DrupalCamp London 2013
02-03-2013                            13
                 www.qlectives.eu
Patterns
●   Patterns is built to bypass this bottleneck by
    managing and automating site configuration

●   Patterns' approach to solve it:

    ●   Components (“Software driver concept”)

    ●   Store the configuration in files – decoupled
        architecture                       Node Taxonomy
                                                         …     …
                                                     User



                                                   Variables



                          DrupalCamp London 2013
02-03-2013
                              www.qlectives.eu        …        14
Patterns Components
●
    Each Drupal module can have a
    corresponding component, e.g. Blocks,
    Nodes, Taxonomy, Users, System settings.

●
    The component handles tasks directed at
    the module, acts much like a software
    driver.




                   DrupalCamp London 2013
02-03-2013                                     15
                       www.qlectives.eu
Patterns Components

●
    Defines a set of hooks which are accessed
    by the Patterns core during the different
    phases: prepare, validate, callbacks,
    execution, cleanup...

●
    Actions are preprocessed and
    reformatted so that they can be the input
    of one or more Drupal forms.


                   DrupalCamp London 2013
02-03-2013                                      16
                       www.qlectives.eu
Patterns Overview




                  DrupalCamp London 2013
02-03-2013                                 17
                      www.qlectives.eu
Patterns Files
●
    Store configuration in files

●
    There is not any dependency with any
    specific format: hook_patterns_parser():
    http://drupal.org/node/1545346

●
    Currently supported formats
    ●
      YAML: easy to read and write                      (human-readable
        data serialization format)
    ●
      XML: interoperability
    ●
      PHP arrays: performance
                               DrupalCamp London 2013
02-03-2013                                                                18
                                   www.qlectives.eu
Patterns Files: structure
●
    Divided in sections:

    ●
        Metadata: author, category, version,
        description, etc.

    ●
        Sub-sections:
        ●
          Actions: create, modify, delete, include




                        DrupalCamp London 2013
02-03-2013                                           19
                            www.qlectives.eu
Patterns Files




                DrupalCamp London 2013
02-03-2013                               20
                    www.qlectives.eu
Patterns 7.x-1.x
●
    Write or re-use patterns using the already
    developed components (content types,
    menus, blocks, users, permissions, roles,
    etc.)

●
    Make your module “Patterns Ready”

●
    Export configuration automatically (in a
    more “raw” way than the new version)

                   DrupalCamp London 2013
02-03-2013                                       21
                       www.qlectives.eu
Introducing Patterns 7.x-2.x

    Major new release: 7.x-2.0-rc1 (26th Feb
    2013)

    ●
        Syntantic and Semantic validation: assistance
        to solve conflicts.

    ●
        Automatic extraction of the configuration
        improved.

    ●
        Patterns server/client: new (sub)modules to
        allow pushing/pulling patterns.
                        DrupalCamp London 2013
    02-03-2013                                        22
                            www.qlectives.eu
Patterns 7.x-2.x: syntactic and
               semantic validation

    Similar approach to name collision and
    dependencies resolution of compilers.


    Two separated layers and different type of
    warnings/errors:
    ●
      Already Defined Element
    ●
      Element Undefined
    ●
      Unmet Dependency
    ●
      Not Unique Alias
      ...

                     DrupalCamp London 2013
    02-03-2013                                   23
                         www.qlectives.eu
Patterns 7.x-2.x: syntactic and
               semantic validation

    Rule of thumb:
    ●
      Syntactic errors/warnings: wrong grammar
      statements.

    ●
        Semantic warnings: related to the meaning of
        that pattern itself in certain “context”.

    ●
        Inclusive relationship: “a pattern semantically
        valid will always be syntactically valid, but not
        the other way around”.

                         DrupalCamp London 2013
    02-03-2013                                          24
                             www.qlectives.eu
Patterns 7.x-2.x: syntactic and
               semantic validation

    Example: Roles name collision (semantic warning)




                      DrupalCamp London 2013
    02-03-2013                                         25
                          www.qlectives.eu
Patterns 7.x-2.x: export functions

    All the main core components possess now
    automatic export capabilities.


    Options to choose the type of actions generated:
     ●
       CREATE actions: intended for the creation of
       patterns for “fresh installation”.

      ●
          MODIFY actions: intended for the creation of
          patterns to override the current settings (i.e.: to
          deploy changes from test to stage).


    Depends on the component: certain actions might
    not make sense in some cases: “create colour”?
                           DrupalCamp London 2013
    02-03-2013                                                  26
                               www.qlectives.eu
Patterns 7.x-2.x: export functions




              DrupalCamp London 2013
02-03-2013                             27
                  www.qlectives.eu
Patterns 7.x-2.x: server/client

    Act as a HUB to share Patterns between Drupal
    users using a secure channel.


    Pushed via UI / Drush


    Implemented as a module: anyone can set up
    his/her own server


    Provides functionalities to search patterns,
    generate statistics, etc.


    “Default Patterns Server”: drupal-patterns.org (coming
    soon)

                        DrupalCamp London 2013
    02-03-2013                                               28
                            www.qlectives.eu
Patterns 7.x-2.x: server/client




                 DrupalCamp London 2013
02-03-2013                                29
                     www.qlectives.eu
So, what ¡s the difference
              between Patterns and...?
    ●   Distribution/Installation Profile:

        ●   Granularity: the configuration can be
            split into smaller definitions

        ●   Simplicity: easier to write YAML files
            than an installation profile

        ●   Can be used in existing sites


                         DrupalCamp London 2013
02-03-2013                                           30
                             www.qlectives.eu
So, what ¡s the difference
              between Patterns and...?

     ●   Features+Strongarm:

         ●   Paradigm: Features is more 'use case
             oriented', Patterns is more 'CM oriented'
             (Interesting blog post from Tom Friedhof about this
             at
             http://activelamp.com/blog/new-way-manage-config
             uration-your-site)




                             DrupalCamp London 2013
02-03-2013                                                         31
                                 www.qlectives.eu
So, what ¡s the difference
              between Patterns and...?

     ●   Features+Strongarm:

         ●   Storage: Features stores the
             configuration in Drupal modules,
             patterns stores it in files as D8 will
             (see D8 Config Management Initiative)




                            DrupalCamp London 2013
02-03-2013                                            32
                                www.qlectives.eu
So, what ¡s the difference
              between Patterns and...?

     ●   Features+Strongarm:

         ●   Implementation: Features uses module specific
             APIs (e.g: Views API), Patterns uses mostly FAPI
             (although can use specific ones as well).

             ●   The “trick” is drupal_form_submit()

             ●   Advantage: Validation for free!

             ●   Disadvantage: Performance

                              DrupalCamp London 2013
02-03-2013                                                      33
                                  www.qlectives.eu
The future?




              DrupalCamp London 2013
02-03-2013                             34
                  www.qlectives.eu
The future?




              DrupalCamp London 2013
02-03-2013                             35
                  www.qlectives.eu
CM in Drupal 8
●    Two issues to address:
      #1: Save configuration data into files (in core!): CMI
         [!] @alexpott's presentation tomorrow: “Drupal 8
            Configuration System for Coders”

       #2: Bundle functionality into a “package” that can
         be re-used in another site: Features v3.x,
         Patterns v3.x?

•    Patterns (as features) currently combines #1 & #2

•    Features' maintainers contacted to collaborate since
     we are working on the same direction
                        DrupalCamp London 2013
    02-03-2013                                          36
                            www.qlectives.eu
Getting a bit
 “teckie”...




                           “How to create your own Drupalicon Munny”, by Andre Molnar
                           (http://becircle.com/how_create_your_own_custom_drupalicon_munny)

             DrupalCamp London 2013
02-03-2013                                                                                37
                 www.qlectives.eu
How to make my module
           “Patterns Ready”?

    You need to implement hook_patterns() to
    declare which actions your module is able to
    handle:




                     DrupalCamp London 2013
    02-03-2013                                     38
                         www.qlectives.eu
How to make my module
           “Patterns Ready”?
Hooks available to interact
on each phase:

hook_patterns_prepare($action, $tag, &$data)

hook_patterns_validate($action, $tag, &$data)

hook_patterns_callbacks($action, $tag, &$data)

hook_patterns_build($action, $form_id, &$data,
&$action_state)

hook_patterns_params($action, $form_id,
&$data &$action_state)                           Source:
                                                 https://github.com/QScience/patterns-flowcharts/blob/master/running-pattern-workflow.dia


hook_patterns_cleanup($action, $tag, &$data)



                                      DrupalCamp London 2013
   02-03-2013                                                                                                                39
                                          www.qlectives.eu
How to make the settings of my
module automatically exportable?


    You need to declare in hook_patterns() a
    function that will gather the data


    Write that function: can be more or less
    complex depending on the component




                   DrupalCamp London 2013
02-03-2013                                     40
                       www.qlectives.eu
How to make the settings of my
 module automatically exportable?




             DrupalCamp London 2013
02-03-2013                            41
                 www.qlectives.eu
Future Work

    Create new sites based on QScience: CRESS,
    QLectives, ...


    Improve compatibility with Patterns Server,
    D2D modules.


    Write components for QScience custom
    modules and for the most important contrib
    modules: Views, Rules, OG, Context, …


    Try to contribute in the future of CM for D8.
                      DrupalCamp London 2013
02-03-2013                                          42
                          www.qlectives.eu
Future Work

    Documentation (D7):

    ●
        More than 30 pages already published at
        Drupal.org:
        http://drupal.org/node/1464118

    ●
        Extend documentation for Patterns 7.x-2.x

    ●
        Video tutorials


                          DrupalCamp London 2013
02-03-2013                                         43
                              www.qlectives.eu
Ideas


    Thanks for your
    ideas/suggestions/patches!


    Patterns group at:
    http://groups.drupal.org/patterns



                DrupalCamp London 2013
02-03-2013                               44
                    www.qlectives.eu
Links
 
     Patterns (http://drupal.org/project/patterns):

     ●
         Documentation: http://drupal.org/node/346509

     ●
         Group: http://groups.drupal.org/patterns

 
     Qlectives :

     ●
         QScience Repository: https://github.com/QScience

     ●
         Deliverable 4.2.4 (Patterns 7.x-2.x):
         http://www.qlectives.eu/docs/D4.2.4.pdf (to be officially published
         very soon)

     ●
         Deliverable 4.2.3 (Patterns 7.x-1.x):
         http://www.qlectives.eu/docs/D4.3.1.pdf

     ●
         Econophysics Forum (use case):
         http://physpc140.unifr.ch/drupal-7.14/
                              DrupalCamp London 2013
02-03-2013                                                               45
                                  www.qlectives.eu
Time for the demo!




                  DrupalCamp London 2013
02-03-2013                                 46
                      www.qlectives.eu
Thanks!
                               ¡Gracias!
             謝謝
                          Merci!
Danke!                                    Grazie!
                                      This work is licensed under the Creative
                                  Commons Attribution 3.0 Unported License.
                                             To view a copy of this license, visit
                                  http://creativecommons.org/licenses/by/3.0/.


                  DrupalCamp London 2013
02-03-2013                                                                           47
                      www.qlectives.eu

Mais conteúdo relacionado

Semelhante a Automating Drupal Development with Patterns

Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012scorlosquet
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupalPedro Cambra
 
Drupal 7 migrating to drupal 8
Drupal 7 migrating to drupal 8Drupal 7 migrating to drupal 8
Drupal 7 migrating to drupal 8DrupalGeeks
 
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)DrupalCape
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)Konstantin Komelin
 
Getting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsGetting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsRachel Vacek
 
SDL Web DXA: A Vision for Modules
SDL Web DXA: A Vision for ModulesSDL Web DXA: A Vision for Modules
SDL Web DXA: A Vision for ModulesAlvin Reyes
 
OCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSSOCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSSMarc Dutoo
 
Extending DCAM for Metadata Provenance
Extending DCAM for Metadata ProvenanceExtending DCAM for Metadata Provenance
Extending DCAM for Metadata ProvenanceKai Eckert
 
The State of Drupal in Higher Education
The State of Drupal in Higher EducationThe State of Drupal in Higher Education
The State of Drupal in Higher EducationZach Chandler
 
Model repositories: will they become reality?
Model repositories: will they become reality?Model repositories: will they become reality?
Model repositories: will they become reality?Davide Ruscio
 
MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle Databricks
 
Managing the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflowManaging the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflowDatabricks
 
Publishing and Serving Machine Learning Models with DLHub
Publishing and Serving Machine Learning Models with DLHubPublishing and Serving Machine Learning Models with DLHub
Publishing and Serving Machine Learning Models with DLHubGlobus
 

Semelhante a Automating Drupal Development with Patterns (20)

Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupal
 
Drupal
DrupalDrupal
Drupal
 
Drupal 7 migrating to drupal 8
Drupal 7 migrating to drupal 8Drupal 7 migrating to drupal 8
Drupal 7 migrating to drupal 8
 
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
 
#D8 cx: upgrade your modules to drupal 8
#D8 cx: upgrade your modules to drupal 8 #D8 cx: upgrade your modules to drupal 8
#D8 cx: upgrade your modules to drupal 8
 
Getting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsGetting Started with Drupal - Handouts
Getting Started with Drupal - Handouts
 
Drupal 7: More than a simple CMS
Drupal 7: More than a simple CMSDrupal 7: More than a simple CMS
Drupal 7: More than a simple CMS
 
Drupal in-depth
Drupal in-depthDrupal in-depth
Drupal in-depth
 
SDL Web DXA: A Vision for Modules
SDL Web DXA: A Vision for ModulesSDL Web DXA: A Vision for Modules
SDL Web DXA: A Vision for Modules
 
OCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSSOCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSS
 
Extending DCAM for Metadata Provenance
Extending DCAM for Metadata ProvenanceExtending DCAM for Metadata Provenance
Extending DCAM for Metadata Provenance
 
The State of Drupal in Higher Education
The State of Drupal in Higher EducationThe State of Drupal in Higher Education
The State of Drupal in Higher Education
 
Model repositories: will they become reality?
Model repositories: will they become reality?Model repositories: will they become reality?
Model repositories: will they become reality?
 
MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle
 
Managing the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflowManaging the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflow
 
Publishing and Serving Machine Learning Models with DLHub
Publishing and Serving Machine Learning Models with DLHubPublishing and Serving Machine Learning Models with DLHub
Publishing and Serving Machine Learning Models with DLHub
 
Drupal an introduction
Drupal an introductionDrupal an introduction
Drupal an introduction
 
Basic Views
Basic ViewsBasic Views
Basic Views
 

Mais de David Rozas

When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com...
 When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com... When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com...David Rozas
 
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...David Rozas
 
Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...
Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...
Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...David Rozas
 
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...David Rozas
 
Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...
Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...
Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...David Rozas
 
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...David Rozas
 
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...David Rozas
 
Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...
Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...
Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...David Rozas
 
Drupal: "come for the software, stay for the community". Conociendo la comunidad
Drupal: "come for the software, stay for the community". Conociendo la comunidadDrupal: "come for the software, stay for the community". Conociendo la comunidad
Drupal: "come for the software, stay for the community". Conociendo la comunidadDavid Rozas
 
Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...
Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...
Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...David Rozas
 
Lightning talk - Affective labour and the notion of contribution in FLOSS com...
Lightning talk - Affective labour and the notion of contribution in FLOSS com...Lightning talk - Affective labour and the notion of contribution in FLOSS com...
Lightning talk - Affective labour and the notion of contribution in FLOSS com...David Rozas
 
Directori català de l’economia col·laborativa
Directori català de l’economia col·laborativaDirectori català de l’economia col·laborativa
Directori català de l’economia col·laborativaDavid Rozas
 
Survey Research (SOC2029). Seminar 10: non-response and missing data
Survey Research (SOC2029). Seminar 10: non-response and missing dataSurvey Research (SOC2029). Seminar 10: non-response and missing data
Survey Research (SOC2029). Seminar 10: non-response and missing dataDavid Rozas
 
Survey Research (SOC2029). Seminar 9: designing a self-completion questionnaire
Survey Research (SOC2029). Seminar 9: designing a self-completion questionnaireSurvey Research (SOC2029). Seminar 9: designing a self-completion questionnaire
Survey Research (SOC2029). Seminar 9: designing a self-completion questionnaireDavid Rozas
 
Survey Research (SOC2029). Seminar 8: formulating a research question
Survey Research (SOC2029). Seminar 8: formulating a research questionSurvey Research (SOC2029). Seminar 8: formulating a research question
Survey Research (SOC2029). Seminar 8: formulating a research questionDavid Rozas
 
Survey Research (SOC2029). Seminar 7: ethics in survey research
Survey Research (SOC2029). Seminar 7: ethics in survey researchSurvey Research (SOC2029). Seminar 7: ethics in survey research
Survey Research (SOC2029). Seminar 7: ethics in survey researchDavid Rozas
 
Survey Research (SOC2029). Seminar 6: questionnaire design (II)
Survey Research (SOC2029). Seminar 6: questionnaire design (II) Survey Research (SOC2029). Seminar 6: questionnaire design (II)
Survey Research (SOC2029). Seminar 6: questionnaire design (II) David Rozas
 
Survey Research (SOC2029). Seminar 5: questionnaire design (I)
Survey Research (SOC2029). Seminar 5: questionnaire design (I)Survey Research (SOC2029). Seminar 5: questionnaire design (I)
Survey Research (SOC2029). Seminar 5: questionnaire design (I)David Rozas
 
Survey Research (SOC2029). Seminar 4: measuring concepts
Survey Research (SOC2029). Seminar 4: measuring conceptsSurvey Research (SOC2029). Seminar 4: measuring concepts
Survey Research (SOC2029). Seminar 4: measuring conceptsDavid Rozas
 
Survey Research (SOC2029). Seminar 3: survey mode
Survey Research (SOC2029). Seminar 3: survey modeSurvey Research (SOC2029). Seminar 3: survey mode
Survey Research (SOC2029). Seminar 3: survey modeDavid Rozas
 

Mais de David Rozas (20)

When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com...
 When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com... When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Com...
 
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
 
Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...
Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...
Cuando Ostrom se encuentra con blockchain: explorando las potencialidades de ...
 
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Comm...
 
Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...
Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...
Ostrom’s crypto-principles? Towards a commons-based approach for the use of B...
 
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
 
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
Self-organisation in Commons-Based Peer Production. Drupal: “the drop is alwa...
 
Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...
Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...
Drupal: the drop is always moving. Autogestión y gobernanza de infraestructur...
 
Drupal: "come for the software, stay for the community". Conociendo la comunidad
Drupal: "come for the software, stay for the community". Conociendo la comunidadDrupal: "come for the software, stay for the community". Conociendo la comunidad
Drupal: "come for the software, stay for the community". Conociendo la comunidad
 
Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...
Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...
Quantitative Methods II (#SOC2031). Seminar #11: Secondary analysis. Big data...
 
Lightning talk - Affective labour and the notion of contribution in FLOSS com...
Lightning talk - Affective labour and the notion of contribution in FLOSS com...Lightning talk - Affective labour and the notion of contribution in FLOSS com...
Lightning talk - Affective labour and the notion of contribution in FLOSS com...
 
Directori català de l’economia col·laborativa
Directori català de l’economia col·laborativaDirectori català de l’economia col·laborativa
Directori català de l’economia col·laborativa
 
Survey Research (SOC2029). Seminar 10: non-response and missing data
Survey Research (SOC2029). Seminar 10: non-response and missing dataSurvey Research (SOC2029). Seminar 10: non-response and missing data
Survey Research (SOC2029). Seminar 10: non-response and missing data
 
Survey Research (SOC2029). Seminar 9: designing a self-completion questionnaire
Survey Research (SOC2029). Seminar 9: designing a self-completion questionnaireSurvey Research (SOC2029). Seminar 9: designing a self-completion questionnaire
Survey Research (SOC2029). Seminar 9: designing a self-completion questionnaire
 
Survey Research (SOC2029). Seminar 8: formulating a research question
Survey Research (SOC2029). Seminar 8: formulating a research questionSurvey Research (SOC2029). Seminar 8: formulating a research question
Survey Research (SOC2029). Seminar 8: formulating a research question
 
Survey Research (SOC2029). Seminar 7: ethics in survey research
Survey Research (SOC2029). Seminar 7: ethics in survey researchSurvey Research (SOC2029). Seminar 7: ethics in survey research
Survey Research (SOC2029). Seminar 7: ethics in survey research
 
Survey Research (SOC2029). Seminar 6: questionnaire design (II)
Survey Research (SOC2029). Seminar 6: questionnaire design (II) Survey Research (SOC2029). Seminar 6: questionnaire design (II)
Survey Research (SOC2029). Seminar 6: questionnaire design (II)
 
Survey Research (SOC2029). Seminar 5: questionnaire design (I)
Survey Research (SOC2029). Seminar 5: questionnaire design (I)Survey Research (SOC2029). Seminar 5: questionnaire design (I)
Survey Research (SOC2029). Seminar 5: questionnaire design (I)
 
Survey Research (SOC2029). Seminar 4: measuring concepts
Survey Research (SOC2029). Seminar 4: measuring conceptsSurvey Research (SOC2029). Seminar 4: measuring concepts
Survey Research (SOC2029). Seminar 4: measuring concepts
 
Survey Research (SOC2029). Seminar 3: survey mode
Survey Research (SOC2029). Seminar 3: survey modeSurvey Research (SOC2029). Seminar 3: survey mode
Survey Research (SOC2029). Seminar 3: survey mode
 

Último

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

Automating Drupal Development with Patterns

  • 1. Automating Drupal Development with Patterns: introducing 7.x-2.x David Rozas and many others This work was partly supported by the Future and Emerging Technologies Programme (FP7-COSI-ICT) of the European Commission through the project QLectives (grant no.:231200).
  • 2. A brief presentation ... David Rozas Domingo (@drozas) ● Almost 3 years working with Drupal. ● Recently joined CRESS (Centre for Research in Social Simulation) at University of Surrey (UK). ● Interest areas: free software, education and technology, distributed systems programming, CSCW, collaborative learning, socially intelligent information systems, … ● +info: http://www.davidrozas.com DrupalCamp London 2013 02-03-2013 2 www.qlectives.eu
  • 3. the others…  Stefano Balietti (ETH)  Liao Hao (Uni Fribourg)  Xiao Rui 肖锐 (Uni Science & Tech. China)  Dengcheng Yan 颜登程 (Uni Science & Tech. China)  Matus Medo (Uni Fribourg)  Zhou Yanbo 周艳波 (Uni Fribourg)  Dirk Helbing (ETH)  Vahe Tshitoyan (ETH)  Vahan Hovhannisyan (ETH)  Christoph Schwirzer (ETH)  Christian Schulz (ETH)  Sasa Tomic (ETH)  Mark Jelasity (Uni Szeged)  Kornél Csernai (Uni Szeged)  Tamas Kojedzinszky (Uni Szeged)  Nigel Gilbert (Uni Surrey)  Maria Xenitidou (Uni Surrey) DrupalCamp London 2013 02-03-2013 3 www.qlectives.eu
  • 4. Outline ● The big picture: QLectives and QScience ● Patterns overview: components and Patterns files ● Patterns 7.x-1.x ● Introducing Patterns 7.x-2.x new features DrupalCamp London 2013 02-03-2013 4 www.qlectives.eu
  • 5. Outline ● The future: CM in Drupal 8 ● A bit of code: making a module “Patterns Ready” ● Future Work ● Demo ● Q&A DrupalCamp London 2013 02-03-2013 5 www.qlectives.eu
  • 6. The big picture: QLectives ● What is quality? ● If half a million people give a YouTube video the thumbs up, does that mean it is good? ● Perhaps... but you would probably rather watch a recommendation from a friend ● Can we do it in a “P2P” way? DrupalCamp London 2013 02-03-2013 6 www.qlectives.eu
  • 7. The big picture: QLectives ● Take features of social networking to help groups of people share resources: from home videos to scientific papers ● Quality ratings in a distributed way DrupalCamp London 2013 02-03-2013 7 www.qlectives.eu
  • 8. The big picture: QLectives Two application domains: ● QMedia: P2P media distribution fully decentralized - http://www.tribler.org ● QScience: distributed platform for scientists allowing them to locate or form new communities and quality reviewing mechanisms DrupalCamp London 2013 02-03-2013 8 www.qlectives.eu
  • 9. QScience: Science today From... Rembrandt, “A Scholar” (1631) To... Community Networks Big Data DrupalCamp Spain 2012 02-03-2013 9 www.qlectives.eu
  • 10. Can we have it all? ● Many software packages are available that fit one (or more) of those needs, but not all. ● QScience is an attempt to pull them all together in a modular fashion: a Drupal distribution DrupalCamp London 2013 02-03-2013 10 www.qlectives.eu
  • 11. QScience: contributing back ● Patterns: configuration management ● D2D (DrupalToDrupal): secure exchange of information between different Drupal instances in a P2P network. ● QTR: Implements a Quality Trust and Reputation algorithm to rate contents (e.g.: academic publications) in Drupal. ● Living Science: Drupal based search and visualization tool. DrupalCamp London 2013 02-03-2013 11 www.qlectives.eu
  • 12. Patterns ● What we want: reuse and share configuration. ● The main issue: configuration and data are mixed up in the DB. ● Patterns allows developers to take control of it. DrupalCamp London 2013 02-03-2013 12 www.qlectives.eu
  • 13. Patterns DrupalCamp London 2013 02-03-2013 13 www.qlectives.eu
  • 14. Patterns ● Patterns is built to bypass this bottleneck by managing and automating site configuration ● Patterns' approach to solve it: ● Components (“Software driver concept”) ● Store the configuration in files – decoupled architecture Node Taxonomy … … User Variables DrupalCamp London 2013 02-03-2013 www.qlectives.eu … 14
  • 15. Patterns Components ● Each Drupal module can have a corresponding component, e.g. Blocks, Nodes, Taxonomy, Users, System settings. ● The component handles tasks directed at the module, acts much like a software driver. DrupalCamp London 2013 02-03-2013 15 www.qlectives.eu
  • 16. Patterns Components ● Defines a set of hooks which are accessed by the Patterns core during the different phases: prepare, validate, callbacks, execution, cleanup... ● Actions are preprocessed and reformatted so that they can be the input of one or more Drupal forms. DrupalCamp London 2013 02-03-2013 16 www.qlectives.eu
  • 17. Patterns Overview DrupalCamp London 2013 02-03-2013 17 www.qlectives.eu
  • 18. Patterns Files ● Store configuration in files ● There is not any dependency with any specific format: hook_patterns_parser(): http://drupal.org/node/1545346 ● Currently supported formats ● YAML: easy to read and write (human-readable data serialization format) ● XML: interoperability ● PHP arrays: performance DrupalCamp London 2013 02-03-2013 18 www.qlectives.eu
  • 19. Patterns Files: structure ● Divided in sections: ● Metadata: author, category, version, description, etc. ● Sub-sections: ● Actions: create, modify, delete, include DrupalCamp London 2013 02-03-2013 19 www.qlectives.eu
  • 20. Patterns Files DrupalCamp London 2013 02-03-2013 20 www.qlectives.eu
  • 21. Patterns 7.x-1.x ● Write or re-use patterns using the already developed components (content types, menus, blocks, users, permissions, roles, etc.) ● Make your module “Patterns Ready” ● Export configuration automatically (in a more “raw” way than the new version) DrupalCamp London 2013 02-03-2013 21 www.qlectives.eu
  • 22. Introducing Patterns 7.x-2.x  Major new release: 7.x-2.0-rc1 (26th Feb 2013) ● Syntantic and Semantic validation: assistance to solve conflicts. ● Automatic extraction of the configuration improved. ● Patterns server/client: new (sub)modules to allow pushing/pulling patterns. DrupalCamp London 2013 02-03-2013 22 www.qlectives.eu
  • 23. Patterns 7.x-2.x: syntactic and semantic validation  Similar approach to name collision and dependencies resolution of compilers.  Two separated layers and different type of warnings/errors: ● Already Defined Element ● Element Undefined ● Unmet Dependency ● Not Unique Alias ... DrupalCamp London 2013 02-03-2013 23 www.qlectives.eu
  • 24. Patterns 7.x-2.x: syntactic and semantic validation  Rule of thumb: ● Syntactic errors/warnings: wrong grammar statements. ● Semantic warnings: related to the meaning of that pattern itself in certain “context”. ● Inclusive relationship: “a pattern semantically valid will always be syntactically valid, but not the other way around”. DrupalCamp London 2013 02-03-2013 24 www.qlectives.eu
  • 25. Patterns 7.x-2.x: syntactic and semantic validation  Example: Roles name collision (semantic warning) DrupalCamp London 2013 02-03-2013 25 www.qlectives.eu
  • 26. Patterns 7.x-2.x: export functions  All the main core components possess now automatic export capabilities.  Options to choose the type of actions generated: ● CREATE actions: intended for the creation of patterns for “fresh installation”. ● MODIFY actions: intended for the creation of patterns to override the current settings (i.e.: to deploy changes from test to stage).  Depends on the component: certain actions might not make sense in some cases: “create colour”? DrupalCamp London 2013 02-03-2013 26 www.qlectives.eu
  • 27. Patterns 7.x-2.x: export functions DrupalCamp London 2013 02-03-2013 27 www.qlectives.eu
  • 28. Patterns 7.x-2.x: server/client  Act as a HUB to share Patterns between Drupal users using a secure channel.  Pushed via UI / Drush  Implemented as a module: anyone can set up his/her own server  Provides functionalities to search patterns, generate statistics, etc.  “Default Patterns Server”: drupal-patterns.org (coming soon) DrupalCamp London 2013 02-03-2013 28 www.qlectives.eu
  • 29. Patterns 7.x-2.x: server/client DrupalCamp London 2013 02-03-2013 29 www.qlectives.eu
  • 30. So, what ¡s the difference between Patterns and...? ● Distribution/Installation Profile: ● Granularity: the configuration can be split into smaller definitions ● Simplicity: easier to write YAML files than an installation profile ● Can be used in existing sites DrupalCamp London 2013 02-03-2013 30 www.qlectives.eu
  • 31. So, what ¡s the difference between Patterns and...? ● Features+Strongarm: ● Paradigm: Features is more 'use case oriented', Patterns is more 'CM oriented' (Interesting blog post from Tom Friedhof about this at http://activelamp.com/blog/new-way-manage-config uration-your-site) DrupalCamp London 2013 02-03-2013 31 www.qlectives.eu
  • 32. So, what ¡s the difference between Patterns and...? ● Features+Strongarm: ● Storage: Features stores the configuration in Drupal modules, patterns stores it in files as D8 will (see D8 Config Management Initiative) DrupalCamp London 2013 02-03-2013 32 www.qlectives.eu
  • 33. So, what ¡s the difference between Patterns and...? ● Features+Strongarm: ● Implementation: Features uses module specific APIs (e.g: Views API), Patterns uses mostly FAPI (although can use specific ones as well). ● The “trick” is drupal_form_submit() ● Advantage: Validation for free! ● Disadvantage: Performance DrupalCamp London 2013 02-03-2013 33 www.qlectives.eu
  • 34. The future? DrupalCamp London 2013 02-03-2013 34 www.qlectives.eu
  • 35. The future? DrupalCamp London 2013 02-03-2013 35 www.qlectives.eu
  • 36. CM in Drupal 8 ● Two issues to address: #1: Save configuration data into files (in core!): CMI [!] @alexpott's presentation tomorrow: “Drupal 8 Configuration System for Coders” #2: Bundle functionality into a “package” that can be re-used in another site: Features v3.x, Patterns v3.x? • Patterns (as features) currently combines #1 & #2 • Features' maintainers contacted to collaborate since we are working on the same direction DrupalCamp London 2013 02-03-2013 36 www.qlectives.eu
  • 37. Getting a bit “teckie”... “How to create your own Drupalicon Munny”, by Andre Molnar (http://becircle.com/how_create_your_own_custom_drupalicon_munny) DrupalCamp London 2013 02-03-2013 37 www.qlectives.eu
  • 38. How to make my module “Patterns Ready”?  You need to implement hook_patterns() to declare which actions your module is able to handle: DrupalCamp London 2013 02-03-2013 38 www.qlectives.eu
  • 39. How to make my module “Patterns Ready”? Hooks available to interact on each phase: hook_patterns_prepare($action, $tag, &$data) hook_patterns_validate($action, $tag, &$data) hook_patterns_callbacks($action, $tag, &$data) hook_patterns_build($action, $form_id, &$data, &$action_state) hook_patterns_params($action, $form_id, &$data &$action_state) Source: https://github.com/QScience/patterns-flowcharts/blob/master/running-pattern-workflow.dia hook_patterns_cleanup($action, $tag, &$data) DrupalCamp London 2013 02-03-2013 39 www.qlectives.eu
  • 40. How to make the settings of my module automatically exportable?  You need to declare in hook_patterns() a function that will gather the data  Write that function: can be more or less complex depending on the component DrupalCamp London 2013 02-03-2013 40 www.qlectives.eu
  • 41. How to make the settings of my module automatically exportable? DrupalCamp London 2013 02-03-2013 41 www.qlectives.eu
  • 42. Future Work  Create new sites based on QScience: CRESS, QLectives, ...  Improve compatibility with Patterns Server, D2D modules.  Write components for QScience custom modules and for the most important contrib modules: Views, Rules, OG, Context, …  Try to contribute in the future of CM for D8. DrupalCamp London 2013 02-03-2013 42 www.qlectives.eu
  • 43. Future Work  Documentation (D7): ● More than 30 pages already published at Drupal.org: http://drupal.org/node/1464118 ● Extend documentation for Patterns 7.x-2.x ● Video tutorials DrupalCamp London 2013 02-03-2013 43 www.qlectives.eu
  • 44. Ideas  Thanks for your ideas/suggestions/patches!  Patterns group at: http://groups.drupal.org/patterns DrupalCamp London 2013 02-03-2013 44 www.qlectives.eu
  • 45. Links  Patterns (http://drupal.org/project/patterns): ● Documentation: http://drupal.org/node/346509 ● Group: http://groups.drupal.org/patterns  Qlectives : ● QScience Repository: https://github.com/QScience ● Deliverable 4.2.4 (Patterns 7.x-2.x): http://www.qlectives.eu/docs/D4.2.4.pdf (to be officially published very soon) ● Deliverable 4.2.3 (Patterns 7.x-1.x): http://www.qlectives.eu/docs/D4.3.1.pdf ● Econophysics Forum (use case): http://physpc140.unifr.ch/drupal-7.14/ DrupalCamp London 2013 02-03-2013 45 www.qlectives.eu
  • 46. Time for the demo! DrupalCamp London 2013 02-03-2013 46 www.qlectives.eu
  • 47. Thanks! ¡Gracias! 謝謝 Merci! Danke! Grazie! This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/. DrupalCamp London 2013 02-03-2013 47 www.qlectives.eu