A Tech-lite Overview of
        Drupal




       Robert Carr
       @robertgarr
   rob@cognimatic.com
       Drupal - Technical Introduction   1
20-ish slides:45 minutes
        Overview
    Technical structure
       Customizing
       Performance
      Getting started
           Q&A

        Drupal - Technical Introduction   2
What is it?
Drupal is a free,
community-built
website
development tool
used across the
world.

Mostly software
written in PHP
language.

Currently powers
about 1 in 50
websites.
                    Drupal - Technical Introduction   3
No licensing costs.
Drupal is open-
source software: no
acquisition or
licensing costs.

Built on other open-
source projects


               Drupal - Technical Introduction   4
Build Websites Quickly.
Assemble websites
with the simple UI, or                              > drush dl drupal --drupal-project-rename=example

a powerful shell                                    > cd example
                                                    > drush site-install standard --db-
                                                    url=mysql://[db_user]:[db_pass]@localhost/[db_name] --site-

interface.                                          name=Example
                                                    >




Out-of-the-box
distributions for
complete solutions.
                  Drupal - Technical Introduction                                                          5
Flexible.

Add functionality with [10K+] plug-in
modules.

Writing custom code with versatile API.

Huge worldwide development
community.
               Drupal - Technical Introduction                          6
                                                 © Drupal Association 2011
Customise the look.
Hundreds of templates can be freely
downloaded to customize the appearance.
Use custom HTML and CSS for unique
design.
             Drupal - Technical Introduction   7
Scalable and Deployable
Out of the box, can drive simple
websites or blogs.

Can be scaled-up > 1000s
pages/sec.

Re-use single codebase for
multiple sites.
             Drupal - Technical Introduction   8
Secure.
Code written to high standards.
Dedicated security team.
Patches and advice easily
available.

           Drupal - Technical Introduction   9
Social Publishing Platform
Multiple users can
publish content

Tunable access
controls

Open logins

     Allows people to connect
                 Drupal - Technical Introduction   10
Let’s Get Tinkering




     Drupal - Technical Introduction   11
Drupal Stack

                          PHP

                  Database abstraction layer

      MySQL/PostgreSQL/SQLite/SQL Server/…

             Apache/lighttpd/IIS/nginx/…

         Linux/BSD/OSX/Windows/Solaris/…


• Pre-configured DAMP stack
  (Win/OSX/Debian/Ubuntu)
  network.acquia.com/downloads
• Virtualbox package:Technical Introduction
                 Drupal - drupal.org/project/quickstart   12
Fundamental Drupal
          Architecture
1. Data - Nodes
   (entities).
2. Functionality – core
   and contrib
   modules.
3. Blocks – data
   output
4. Selective access
5. HTML/CSS output

                 Drupal - Technical Introduction   13
Entities
• Nodes (data)
• Users
• Taxonomy
• Comments
Can create custom entities.
Can add custom fields + relationships to
entities.
              Drupal - Technical Introduction   14
Modules
Core                                   Contributed
                                       drupal.org/project/modules
Optional in default install
Examples:                              Some of most popular:
• Blog                                 • Views
                                       • Token
• Forum                                • Pathauto
• Locale                               • WYSIWYG
                                       • Date
• OpenID                               • Webform
• Search
                                       10,000 modules + sandboxes
• RDF                                  Reviews at drupalmodules.com


                      Drupal - Technical Introduction               15
Site Building
DRUSH (Drupal Shell)
drupal.org/project/drush.

Drush Make.
SSH.
Git.

Distributions (off the shelf).
                Drupal - Technical Introduction   16
Drupal
Themes

Each webpage has
regions for content
and blocks.

drupal.org/project/t
hemes

Base themes
Sub-theme
hierarchy

Drupal (7) not quite
HTML5-ready.
                       Drupal - Technical Introduction   17
Template File Content
*.tpl.php
Template files – mix HTML and PHP snippets.
Can override base theme templates.
Custom templates for specific node types.



                 Drupal - Technical Introduction   18
Theme Developer




Contrib module for page inspection (Firebug style)


                 Drupal - Technical Introduction     19
Caching                                  Start


Block caching (core)
                                                         Bootstrap

Page caching - for anonymous
users:                                               Load node by path
• Core (anon)                                            argument

• Boost (anon > static HTML)                         Builder the render
                                                      array for loaded
                                                           node
Memcached – DB + page cache
                                                     Generate markup
                                                      for whole page
Pressflow – High Performance
Drupal distro                                             Sends
                                                         rendered
• Varnish + APC                                            page
                                                           End
                   Drupal - Technical Introduction                        20
Drupal 8 – Addressing
          Problems
Code freeze early 2013,
release within 12 months
• Use of Symfony
• Web services: REST
• HTML5 ready
• Mobile/responsive themes
• Configuration/staging
• Drag and Drop UI
• Change to core
  functionality (-Blog,
  +WYSIWYG…)
                Drupal - Technical Introduction   21
Getting Started
drupalgardens.com.
DAMP stack.
drupal.org/start:
• Downloads/distributions
• Documentation
• Books
• Issue queues
• IRC

                Drupal - Technical Introduction   22
Going Solo – Drupal
                Installation




Download via drupal.org/start and
unpack to server directory                    Navigate to new site root in browser


                            Drupal - Technical Introduction                          23
Basic Configuration




DB config – need to create new
database apriori.



                            Drupal - Technical Introduction   24
Get Started
Start adding content, download modules (via
browser) or configure structure, appearance or
module settings.

                 Drupal - Technical Introduction   25
or… Drush Install
> drush dl drupal
> mysqladmin –u rob –p create drupal7
> drush site-install standard --account-name=admin --
account-pass=letmein--db-
url=mysql://rob:letmein@localhost/drupal7
                                                      (One or two steps missed out..!)




      Install Drupal with Drush via SSH:
                 bit.ly/JB68oq
                    Drupal - Technical Introduction                                      26
Where next?
DrupalCamp Scotland
25-26 May – Edinburgh
camp.drupalscotland.org

drupal.org
groups.drupal.org
Drupal Association:
• DrupalCon
     – Europe: late summer
     – N America: spring
     – S America: winter
•    Local meetups:
     – Glasgow (monthly)
     – Edinburgh (monthly)
     – Tayside?


    The Community is here to
    help                     Drupal - Technical Introduction   27
Why Drupal?
• Open Source => free
• Rapid build
• Customise functionality &
  appearance
• Scalable & deployable
• Secure
• Designed for the social world
• Community support
             Drupal - Technical Introduction   28
Questions?

    Robert Carr
   @robertgcarr
rob@cognimatic.com


      Drupal - Technical Introduction   29

Drupal Overview For Techies

  • 1.
    A Tech-lite Overviewof Drupal Robert Carr @robertgarr [email protected] Drupal - Technical Introduction 1
  • 2.
    20-ish slides:45 minutes Overview Technical structure Customizing Performance Getting started Q&A Drupal - Technical Introduction 2
  • 3.
    What is it? Drupalis a free, community-built website development tool used across the world. Mostly software written in PHP language. Currently powers about 1 in 50 websites. Drupal - Technical Introduction 3
  • 4.
    No licensing costs. Drupalis open- source software: no acquisition or licensing costs. Built on other open- source projects Drupal - Technical Introduction 4
  • 5.
    Build Websites Quickly. Assemblewebsites with the simple UI, or > drush dl drupal --drupal-project-rename=example a powerful shell > cd example > drush site-install standard --db- url=mysql://[db_user]:[db_pass]@localhost/[db_name] --site- interface. name=Example > Out-of-the-box distributions for complete solutions. Drupal - Technical Introduction 5
  • 6.
    Flexible. Add functionality with[10K+] plug-in modules. Writing custom code with versatile API. Huge worldwide development community. Drupal - Technical Introduction 6 © Drupal Association 2011
  • 7.
    Customise the look. Hundredsof templates can be freely downloaded to customize the appearance. Use custom HTML and CSS for unique design. Drupal - Technical Introduction 7
  • 8.
    Scalable and Deployable Outof the box, can drive simple websites or blogs. Can be scaled-up > 1000s pages/sec. Re-use single codebase for multiple sites. Drupal - Technical Introduction 8
  • 9.
    Secure. Code written tohigh standards. Dedicated security team. Patches and advice easily available. Drupal - Technical Introduction 9
  • 10.
    Social Publishing Platform Multipleusers can publish content Tunable access controls Open logins Allows people to connect Drupal - Technical Introduction 10
  • 11.
    Let’s Get Tinkering Drupal - Technical Introduction 11
  • 12.
    Drupal Stack PHP Database abstraction layer MySQL/PostgreSQL/SQLite/SQL Server/… Apache/lighttpd/IIS/nginx/… Linux/BSD/OSX/Windows/Solaris/… • Pre-configured DAMP stack (Win/OSX/Debian/Ubuntu) network.acquia.com/downloads • Virtualbox package:Technical Introduction Drupal - drupal.org/project/quickstart 12
  • 13.
    Fundamental Drupal Architecture 1. Data - Nodes (entities). 2. Functionality – core and contrib modules. 3. Blocks – data output 4. Selective access 5. HTML/CSS output Drupal - Technical Introduction 13
  • 14.
    Entities • Nodes (data) •Users • Taxonomy • Comments Can create custom entities. Can add custom fields + relationships to entities. Drupal - Technical Introduction 14
  • 15.
    Modules Core Contributed drupal.org/project/modules Optional in default install Examples: Some of most popular: • Blog • Views • Token • Forum • Pathauto • Locale • WYSIWYG • Date • OpenID • Webform • Search 10,000 modules + sandboxes • RDF Reviews at drupalmodules.com Drupal - Technical Introduction 15
  • 16.
    Site Building DRUSH (DrupalShell) drupal.org/project/drush. Drush Make. SSH. Git. Distributions (off the shelf). Drupal - Technical Introduction 16
  • 17.
    Drupal Themes Each webpage has regionsfor content and blocks. drupal.org/project/t hemes Base themes Sub-theme hierarchy Drupal (7) not quite HTML5-ready. Drupal - Technical Introduction 17
  • 18.
    Template File Content *.tpl.php Templatefiles – mix HTML and PHP snippets. Can override base theme templates. Custom templates for specific node types. Drupal - Technical Introduction 18
  • 19.
    Theme Developer Contrib modulefor page inspection (Firebug style) Drupal - Technical Introduction 19
  • 20.
    Caching Start Block caching (core) Bootstrap Page caching - for anonymous users: Load node by path • Core (anon) argument • Boost (anon > static HTML) Builder the render array for loaded node Memcached – DB + page cache Generate markup for whole page Pressflow – High Performance Drupal distro Sends rendered • Varnish + APC page End Drupal - Technical Introduction 20
  • 21.
    Drupal 8 –Addressing Problems Code freeze early 2013, release within 12 months • Use of Symfony • Web services: REST • HTML5 ready • Mobile/responsive themes • Configuration/staging • Drag and Drop UI • Change to core functionality (-Blog, +WYSIWYG…) Drupal - Technical Introduction 21
  • 22.
    Getting Started drupalgardens.com. DAMP stack. drupal.org/start: •Downloads/distributions • Documentation • Books • Issue queues • IRC Drupal - Technical Introduction 22
  • 23.
    Going Solo –Drupal Installation Download via drupal.org/start and unpack to server directory Navigate to new site root in browser Drupal - Technical Introduction 23
  • 24.
    Basic Configuration DB config– need to create new database apriori. Drupal - Technical Introduction 24
  • 25.
    Get Started Start addingcontent, download modules (via browser) or configure structure, appearance or module settings. Drupal - Technical Introduction 25
  • 26.
    or… Drush Install >drush dl drupal > mysqladmin –u rob –p create drupal7 > drush site-install standard --account-name=admin -- account-pass=letmein--db- url=mysql://rob:letmein@localhost/drupal7 (One or two steps missed out..!) Install Drupal with Drush via SSH: bit.ly/JB68oq Drupal - Technical Introduction 26
  • 27.
    Where next? DrupalCamp Scotland 25-26May – Edinburgh camp.drupalscotland.org drupal.org groups.drupal.org Drupal Association: • DrupalCon – Europe: late summer – N America: spring – S America: winter • Local meetups: – Glasgow (monthly) – Edinburgh (monthly) – Tayside? The Community is here to help Drupal - Technical Introduction 27
  • 28.
    Why Drupal? • OpenSource => free • Rapid build • Customise functionality & appearance • Scalable & deployable • Secure • Designed for the social world • Community support Drupal - Technical Introduction 28
  • 29.
    Questions? Robert Carr @robertgcarr [email protected] Drupal - Technical Introduction 29

Editor's Notes

  • #6 wget http://drupal.org/files/projects/drupal-x.x.tar.gztar -zxvfdrupal-x.x.tar.gz