drupal: open source content management - system … · drupal vs. wordpress vs. joomla! (big 3 php)...

24
Drupal: Open Source Drupal: Open Source Content Management Content Management Or is it a web framework? Or is it a web framework? Presented by: Presented by: David Tomaschik David Tomaschik http://systemoverlord.com http://systemoverlord.com

Upload: dangduong

Post on 12-Sep-2018

232 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Drupal: Open Source Drupal: Open Source Content ManagementContent ManagementOr is it a web framework?Or is it a web framework?

Presented by:Presented by:

David TomaschikDavid Tomaschik

http://systemoverlord.comhttp://systemoverlord.com

Page 2: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

What is Drupal?What is Drupal?

Drupal is a PHP-based “Content Management System”Drupal is a PHP-based “Content Management System”

Easy publication of web contentEasy publication of web content

ExtensibleExtensible

ThemableThemable

10 year history10 year history

Also considered a “Web Framework” by someAlso considered a “Web Framework” by some

Page 3: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

About This PresentationAbout This Presentation

Target AudienceTarget Audience

Technologists looking Technologists looking to learn about a new to learn about a new web platformweb platform

What it is notWhat it is not

Step-by-step Step-by-step instruction manualinstruction manual

It will coverIt will cover

• Drupal 7Drupal 7

• Getting StartedGetting Started

• ThemesThemes

• Contributed ModulesContributed Modules

• Overview of Advanced Overview of Advanced DevelopmentDevelopment

Page 4: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Why Drupal?Why Drupal?

Migrate Legacy Sites and Custom “CMS” to DrupalMigrate Legacy Sites and Custom “CMS” to Drupal

• KSU News SiteKSU News Site

Used by Many Large OrganizationsUsed by Many Large Organizations

• Federal GovernmentFederal Government

• 5 Largest USG Institutions5 Largest USG Institutions

1.5% of websites worldwide1.5% of websites worldwide

Large CommunityLarge Community

Page 5: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Why Drupal?Why Drupal?

• Extensible (Modules, Themes, etc.)Extensible (Modules, Themes, etc.)

• Powerful APIPowerful API

• Structured ContentStructured Content

• User-defned FieldsUser-defned Fields

• Scalable (caching and Boost module)Scalable (caching and Boost module)

• Tools are easy enough to give to non-technical usersTools are easy enough to give to non-technical users

• Editing, etc.Editing, etc.

Page 6: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

DevelopmentDevelopment

• 10 years old10 years old

• Sponsored by AcquiaSponsored by Acquia

• Dedicated Security, Usability, and Core TeamsDedicated Security, Usability, and Core Teams

• 97 Core Maintainers97 Core Maintainers

• Drupal Project Lead – Dries BuytaertDrupal Project Lead – Dries Buytaert

• D7 Branch Maintainer – Angie Byron (webchick)D7 Branch Maintainer – Angie Byron (webchick)

• GPLv2 LicenseGPLv2 License

Page 7: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Drupal vs. Wordpress vs. Drupal vs. Wordpress vs. Joomla! (Big 3 PHP)Joomla! (Big 3 PHP)

• Drupal is a full Drupal is a full Content Management Content Management SystemSystem

• 10,000+ Modules10,000+ Modules

• Steeper Learning Steeper Learning CurveCurve

• Powerful APIPowerful API

• Clean CodeClean Code

• Wordpress is a blog Wordpress is a blog with some CMS with some CMS featuresfeatures

• 15,000+ Plugins15,000+ Plugins

• Shallower Learning Shallower Learning CurveCurve

• Less Powerful APILess Powerful API

• Clean CodeClean Code

• Joomla! Is a full Joomla! Is a full Content Management Content Management SystemSystem

• 7,000 Extensions7,000 Extensions

• Medium Learning Medium Learning CurveCurve

• Less Powerful APILess Powerful API

• Some Messy CodeSome Messy Code

Page 8: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Drupal RequirementsDrupal Requirements

PHP >= 5.2.5 (5.3 Recommended)PHP >= 5.2.5 (5.3 Recommended)

Database ServerDatabase Server

MySQL >= 5.0.15 (Recommended)MySQL >= 5.0.15 (Recommended)

PostgreSQL, SQLitePostgreSQL, SQLite

Web ServerWeb Server

Apache (Recommended)Apache (Recommended)

IISIIS

nginxnginx

Page 9: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

InstallationInstallation

Extract Drupal into document root (or subdirectory)Extract Drupal into document root (or subdirectory)

Copy default.settings.php to settings.php, make writableCopy default.settings.php to settings.php, make writable

Create database & database userCreate database & database user

Visit your Drupal installation in a browserVisit your Drupal installation in a browser

Click through install, answering questionsClick through install, answering questions

-OR--OR-

Acquia Dev DesktopAcquia Dev Desktop

Page 10: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Getting StartedGetting Started

ThemeTheme

http://drupal.org/project/themeshttp://drupal.org/project/themes or create your own or create your own

Add contentAdd content

Publish pages & storiesPublish pages & stories

Page 11: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Content TypesContent Types

Content typesContent types

A collection of related valuesA collection of related values

Basic content types are Page, Story, etc.Basic content types are Page, Story, etc.

Title & BodyTitle & Body

Flexible, thanks to Fields APIFlexible, thanks to Fields API

One instance = a “node”One instance = a “node”

Page 12: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Content Type ExamplesContent Type Examples

ServerServer

HostnameHostname

IP AddressIP Address

OSOS

HardwareHardware

Serial #Serial #

Support ContractSupport Contract

InvoiceInvoice

• CustomerCustomer

• Line item(s)Line item(s)

• ItemItem

• QuantityQuantity

• PricePrice

• TotalTotal

Page 13: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Also IncludedAlso Included

Taxonomies -- tag and classify contentTaxonomies -- tag and classify content

RDFa -- make your site more search-engine friendlyRDFa -- make your site more search-engine friendly

Blogs -- multi-user blogs includedBlogs -- multi-user blogs included

Comments -- can be turned on/off per nodeComments -- can be turned on/off per node

Forums -- basic forumsForums -- basic forums

Search -- site-wide searchSearch -- site-wide search

Page 14: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

““Contrib”Contrib”

““Contrib” is a term applied to community-contributed Contrib” is a term applied to community-contributed modules, generally those listed on drupal.orgmodules, generally those listed on drupal.org

Thousands of modules (10,000 + in June 2011)Thousands of modules (10,000 + in June 2011)

Some very commonSome very common

Some edge caseSome edge case

GPLv2GPLv2

Page 15: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Must-have ModulesMust-have Modules

ViewsViews

CToolsCTools

TokenToken

PathautoPathauto

WYSIWYG/CKEditorWYSIWYG/CKEditor

MediaMedia

WebformWebform

PanelsPanels

CAPTCHACAPTCHA

DevelDevel

RulesRules

Nice MenusNice Menus

Page 16: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Modules for Specifc NeedsModules for Specifc Needs

UbercartUbercart

Shopping cart w/PayPal integrationShopping cart w/PayPal integration

PrintPrint

Convert pages to printer-friendly or PDF versionsConvert pages to printer-friendly or PDF versions

FivestarFivestar

Allow ratings on nodes (could be products, movie Allow ratings on nodes (could be products, movie reviews, etc.)reviews, etc.)

Page 17: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Development ChallengesDevelopment Challenges

Maintaining Dev -> Test -> Prod LifecycleMaintaining Dev -> Test -> Prod Lifecycle

Drupal does a poor job of separating content & Drupal does a poor job of separating content & presentationpresentation

Features can helpFeatures can help

No golden bulletNo golden bullet

URL updates (Especially Multisite)URL updates (Especially Multisite)

Page 18: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

MultisiteMultisite

Run many sites from one codebase (symlinks, virtual Run many sites from one codebase (symlinks, virtual hosts)hosts)

sites/<sitename>/sites/<sitename>/

example.orgexample.org

intranet.example.orgintranet.example.org

example.org.newsexample.org.news

intranet.example.org.developmentintranet.example.org.development

Page 19: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

For our command line For our command line jockeys and scriptersjockeys and scripters

drushdrush

DRUpal SHellDRUpal SHell

PowerfulPowerful

ScriptableScriptable

Install modulesInstall modules

Run arbitrary phpRun arbitrary php

Launch sql shellLaunch sql shell

Perform maintenancePerform maintenance

Make backupsMake backups

Even build a site from a confguration (drush make)Even build a site from a confguration (drush make)

Page 20: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Rolling Your OwnRolling Your Own

Module & Theme DevelopmentModule & Theme Development

• Installation ProflesInstallation Profles

Know PHP, SQLKnow PHP, SQL

Drupal “hooks” (similar to callbacks)Drupal “hooks” (similar to callbacks)

Specially named functions MODULE_HOOK()Specially named functions MODULE_HOOK()

api.drupal.orgapi.drupal.org

Page 21: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Rolling Your Own - ThemesRolling Your Own - Themes

SubthemingSubtheming

Themes can be extended, modifed, customizedThemes can be extended, modifed, customized

Zen, Fusion, Omega, othersZen, Fusion, Omega, others

RegionsRegions

Page must contain certain regionsPage must contain certain regions

Template SystemTemplate System

Page 22: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Rolling Your Own - ModulesRolling Your Own - Modules

Stick to Drupal DB APIStick to Drupal DB API

Looks for specifc hooks when possibleLooks for specifc hooks when possible

Make good use of dpm() from devel.moduleMake good use of dpm() from devel.module

Always output with theme()Always output with theme()

Look for other modules -- don’t reinvent the wheelLook for other modules -- don’t reinvent the wheel

Page 23: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Installation ProflesInstallation Profles

• Special case of moduleSpecial case of module

• Most often used for repeated deploymentsMost often used for repeated deployments

• Defnes actions during the installationDefnes actions during the installation

• Can modify standard installation stepsCan modify standard installation steps

Page 24: Drupal: Open Source Content Management - System … · Drupal vs. Wordpress vs. Joomla! (Big 3 PHP) • Drupal is a full Content Management System • 10,000+ Modules • Steeper

Demo!Demo!

• Company DirectoryCompany Directory

• PhotoPhoto

• NameName

• E-MailE-Mail

• TitleTitle

• View of DirectoryView of Directory

• Panel PagePanel Page