Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Drupal @ Cozi

No description

Mike Keran

on 13 August 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Drupal @ Cozi

Cozi's Marketing Website
XML content styled with XSLT transformations
How did we get here?
Drupal 6
Originally for Live Simply only
Pain points... Ouch!
No shared tech
Davinci templates are brittle and hard to understand
Davinci image deployment requires SVN
Drupal content deployment is easily broken
Drupal has a steep learning curve
Proprietary CMS, built by who?
"Promotional" portion of the site
Admin interface only runs in IE
It was only a proof of concept...
When new features were needed they were needed NOW
Shortcuts were taken, best practices ignored
Iterate, iterate, iterate...
The Plan
Fix everything in the previous slide
Marketing/BizDev can edit the site without Dev involvement
Incorporate latest tech and standards
Not suck on mobile devices
Drupal - A little history
Started as a message board for sharing a DSL line in a college dorm
"Drupal? What's a Drupal?"
Open sourced in 2001, hit a tipping point in 2005
Runs some of the highest traffic sites on the Web
Was NOT built from the ground up to be a high-performance, scalable, easy to deploy Web engine. And that's a good thing...
How does Drupal work?
"Core" functionality extended by "contrib"
Drupal 7's major sub-systems (that we need to deal with):
Modules (hooks)
Theme (display)
In the beginning, there was a node...
Basically an "Observer" pattern... but with magical names
To implement hook_foo(), write a function called cozi_foo()
Core defines many, many hooks
Never output straight HTML, use a theme(foo) call
... which calls a theme_foo()
Takes whatever is built by the module layer and displays it
If you write a DB query in the theme layer, you're doing it wrong!
Drupal uses both code and template files to generate HTML
Cozi's theme uses SASS and a responsive grid system (Zen Grids currently, we're evaluating Singularity)
Lots of things for free: security, error checking, state-based elements, etc.
If you ever write a <form> tag, you're doing it wrong
Use hook_form_alter() to add/change functionality of a form that someone else defined
Adds field to content types (technically "entities")
Provides for all CRUD functions
Content vs. Config
Config is in Git, content is in the database
Content is:
Text or images on a page
Some layout options on a page
Text/Destination of a menu item
Config is:
What blocks appear where on which page
Overall layout for a given page
How a page responds to a given context
The location of a menu item, is that content of config?
Editorial can change content, Dev can change config
Get it in Git
Changes are made via the Drupal admin UI
And are still stored in the DB
Use the Features module to move config changes from database to code
feature-update: updates the code to match the DB
feature-revert: reverts the DB to match the code
Once in code, its version controllable
Dev Workflow
Figure out where a change should be made
Make the change in the Drupal UI
Save the change to code
Dev <- Editorial -> Beta -> Prod
Dev Resources
drupal.org and api.drupal.org
Local dev community (aka SeaDUG)
IRC channels
Let them edit!
Give Editorial as much control over layout as possibleDifferent layouts are built here... sort of.
All content is created or edited on Editorial
Requires better automated (functionality) testing from dev and better proofreading/workflow from Editorial
Panels vs. Views vs. Context
Views creates views on a dataset
Context is the state in which a page is requested
Panels builds the display of a given view in a given context
What, How and Who
Am I a gold Gold user? Am I a Cozi user? Is this a request from a mobile client? Is this a Live Simple page? Do I look good in green? Who is the author of this content? Is this content related to a promotion?
We can create new contexts to meet our needs
Contexts can influence what Panels and Views shows
Use the same build and deployment tools, yea!
Panels puts together a page
Based on context, panels adds or removes "panes"
A pane can contain just about anything...
Learning opportunities: PNWDS, BADCamp, DrupalCon
Other companies: Lullubot, Media Current, Acquia
Anonymous vs. authenticated users
In the theme layer, - vs. _
Development tools: devel, FTools, drush, FireSASS
Full transcript