+ All Categories
Home > Technology > Drupal Introduction

Drupal Introduction

Date post: 27-May-2015
Category:
Upload: chris-tankersley
View: 1,962 times
Download: 3 times
Share this document with a friend
Description:
Basic overview of Drupal, given at the Northwest Ohio PHP User Group
Popular Tags:
26
Drupal NWO-PUG CMS Shootout April 26, 2011 NWO-PUG 1 E-mail: [email protected] Twitter: @dragonmanta Identi.ca: dragonmanta
Transcript
Page 1: Drupal Introduction

DrupalNWO-PUG CMS Shootout

April 26, 2011 NWO-PUG 1

E-mail: [email protected]: @dragonmantankIdenti.ca: dragonmantank

Page 2: Drupal Introduction

Who Are You and Why Are You In My House?

Chris Tankersley Doing PHP for 8 Years Lots of projects no one uses, and a

few that some do TL;DR

https://github.com/dragonmantank

April 26, 2011 NWO-PUG 2

Page 3: Drupal Introduction

Drupal

Web Application Framework Open-Sourced in 2001 by Dries Buytaert As of April 17, had 367,865 registered

sites Estimated 1.5% of all websites, which is around

2.8 million Powers websites from basic blogs all the

way to government websites Gigantic user community Functional, but moving toward OOP

April 26, 2011 NWO-PUG 3

Page 4: Drupal Introduction

Nodes/EntitiesWhat Everything Is

April 26, 2011 NWO-PUG 4

Page 5: Drupal Introduction

You Must Assimilate

Data is stored in Drupal as Nodes (Drupal 6) or Entities (Drupal 7) Posts, Images, Users, etc, are all the

same thing, just different characteristics Nodes are great in theory, a pain in

practice Drupal 7 went one level below nodes

and created Entities. Same idea, better implementation

April 26, 2011 NWO-PUG 5

Page 6: Drupal Introduction

Working With Nodes

All nodes have the same basic layout All nodes invoke the same hooks

This means you have to do this:

April 26, 2011 NWO-PUG 6

Page 7: Drupal Introduction

Hook SystemHow Everything Works

April 26, 2011 NWO-PUG 7

Page 8: Drupal Introduction

There’s a Hook for That

Drupal uses a system of predefined ‘hooks’ for developers to attach to

Hooks allow developers to attach to almost anything that Drupal does What to do something when a thing is

deleted? Hook into ‘hook_delete’ Very powerful, but very steep

learning curve

April 26, 2011 NWO-PUG 8

Page 9: Drupal Introduction

Hooking Into A Hook

Find the hook you want (‘hook_delete’)

Add your module name in place of Hook

April 26, 2011 NWO-PUG 9

Page 10: Drupal Introduction

Log a Node Deletion

April 26, 2011 NWO-PUG 10

Page 11: Drupal Introduction

ModulesBending Drupal To Our Will

April 26, 2011 NWO-PUG 11

Page 12: Drupal Introduction

Hooks, Hook, Hooks

Modules are collections of Functions that implement Hooks

Contains a .info file with the module information

Contains a .module with all the functions

April 26, 2011 NWO-PUG 12

Page 13: Drupal Introduction

Modules In Drupal’s Lifecycle

Drupal kicks up and figures out what the user wants to do

Drupal invokes the main hook Main hook calls all registered hooks Hooks all return data, and Drupal

finally finishes the original hook out

April 26, 2011 NWO-PUG 13

Page 14: Drupal Introduction

Modules = Hook Registration

Really, ‘modules’ just allow you an easy way to enable/disable what code runs during the lifecycle

April 26, 2011 NWO-PUG 14

Page 15: Drupal Introduction

ThemesMaking it look purdy

April 26, 2011 NWO-PUG 15

Page 16: Drupal Introduction

Anatomy of a Theme

Basically a specialized Module

Folder contains PHP files, CSS, and JS

Instead of hooking into Hooks, you hook into Templates

April 26, 2011 NWO-PUG 16

Page 17: Drupal Introduction

Build From Foundations

Drupal has many great Foundation Themes

Download, Install, and modify CSS/JS to get going faster

April 26, 2011 NWO-PUG 17

Page 18: Drupal Introduction

Taking the Good with the BadThere are some downsides…

April 26, 2011 NWO-PUG 18

Page 19: Drupal Introduction

Performance

All registered hooks always fire The more modules you have, the longer

Drupal has to process 100 modules that hook into hook_delete

fire every time hook_delete is fired, regardless of the situation

Drupal is coded for developers, not sysadmins

April 26, 2011 NWO-PUG 19

Page 20: Drupal Introduction

The Admin Interface

Sucks

April 26, 2011 NWO-PUG 20

Page 21: Drupal Introduction

The Admin Interface

Can be hard to find things Community has tried to fix this with

plugins I still find it a pain

April 26, 2011 NWO-PUG 21

Page 22: Drupal Introduction

Learning Curve

It’s there, and it’s big API Documentation is there, but hard

to find what you want When you have 100’s of hooks, you

kinda guess what you want Hard to find intermediate-advanced

tutorials Lot of it is ‘Install this Module!’

instead of architecture

April 26, 2011 NWO-PUG 22

Page 23: Drupal Introduction

Backward Compatibility

Major Revisions break Backward Compatibility

Makes for Slow Adoption of new releases

Drupal 6 -> 7 is painful because many modules just didn’t work

Drupal 7 -> 8 probably will be too

April 26, 2011 NWO-PUG 23

Page 24: Drupal Introduction

Questions?

April 26, 2011 NWO-PUG 24

Page 25: Drupal Introduction

LinksWhere to Find Stuff I Talked About

April 26, 2011 NWO-PUG 25

Page 26: Drupal Introduction

Links

Drupal Main Site: http://www.drupal.org

API Site: http://api.drupal.org Contributions: http://drupal.org/

download Creating Themes:

http://tips.webdesign10.com/how-to-make-a-drupal-theme

April 26, 2011 NWO-PUG 26


Recommended