SlideShare a Scribd company logo
the Why & What of
patternlab.io
dave olsen, @dmolsen
pattern labcreate atomic design systems
brad frost
@brad_frost
dave olsen
@dmolsen
the pattern lab team:
a roadmap for our talk:
‣ rethinking the web design process
- process: linear vs. collaborative
- communication: clients and RWD
- modular systems: systems vs. pages
‣ deep dive into pattern lab
- quick tour of the front-end
- installation
- working with patterns
- customizing data
- advanced features
Our existing standards,
workflows, & infrastructure
won’t hold up.
A FUTURE-FRIENDLY TRUTH
http://futurefriend.ly
courtesy Ben Callahan, Sparkbox
FRONT-END BACK-ENDDESIGN
THINK ABOUT
USERS
THROW IN
SOME CONTENT
LAUNCH!
Linear Workflow
CONTENT UX
FRONT-END
DESIGNBACK-END
“1 Deliverable” Workflow
courtesy Ben Callahan, Sparkbox
You Are Here
Iterative or Spiral Process
communicate.
Ultimately, process is about how
designers, developers & clients
Creation is a
shared activity.
- Bermon Painter
rethinking the web design process: collaborate
Kick-off Design &
Develop Test Client
Review Production
rethinking how we communicate: deliverables
‣ mood boards
‣ style tiles
‣ wireframes
‣ low-fidelity HTML mock-ups
‣ high-fidelity HTML mock-ups
‣ “cut up” mark-up, CSS, & JS
‣ pattern libraries & style guides
Our hand-offs to clients should allow them
to re-mix common elements that we’ve
developed to build new things.
Our deliverables should
be systems, not pages.
Build, test, and review deliverables in the
place where a project is going to be used.
Get to the browser.
...communicate better with one another?
...build robust systems and not pages?
...review everything in the browser?
So how do we...
introducing
pattern lab
Pattern Lab is a collection of
tools for creating modular
systems that involves your
entire team & your client every
step of the way and lets everyone
review in the browser.
what pattern lab is: your deliverables in one place
Kick-off Design &
Develop Test Client
Review Production
what pattern lab is: a collection of tools
atomic
spectrum
viewport
re-sizer
annotationspage follow
pattern states
shared component library & dynamic data
MQ re-sizer
starter kit auto-reload
code view
auto-build
style guide
working with patterns: systems, not pages
Atomic Design as the basis for Pattern Lab’s pattern types.
what pattern lab ain’t:
‣ a fancy UI framework
‣ dependency heavy
‣ incredibly rigid
You make Pattern Lab what
you want and need it to be.
the requirements:
PHP 5.3+
no web server required*
* - only required for page follow
Mustache is used for patterns.
JSON is used for dynamic data storage.
installation: download from GitHub
changes to pattern lab: github.com/pattern-lab
installation: open the project
installation: generate for the first time
installation: generate for the first time
php	
  core/builder.php	
  -­‐g
just in case you’re a fan of the command line, on linux or on windows.
php	
  core/builder.php	
  -­‐-­‐help will show you all of your options.
installation: review the installation
installation: review source/
the only required directories are _data/ & _patterns/. otherwise,
you can change source/ as much as you want. this is what we mean
about making your own Bootstrap. you can even use Bootstrap.
installation: open pattern lab’s index.html
don’t edit public/. always make changes in source/. public/ is for
your own and your client review purposes.
installation: done!
Pattern Lab doesn’t require Apache so no extra set-up. You can drop
Pattern Lab into a Dropbox folder for clients.
front-end tour: follow along
demo.patternlab.io
front-end tour: default view
front-end tour: pattern list
front-end tour: resizing options
front-end tour: resizing options
front-end tour: resizing options
front-end tour: media query list
front-end tour: pattern search
front-end tour: code view
front-end tour: annotations
front-end tour: code view
working with patterns: intro
What is a pattern?
working with patterns: intro
Each pattern describes a problem that occurs
over and over again in our environment, and
then describes the core of the solution to
that problem, in such a way that you can use
this solution a million times over, without
ever doing it the same way twice.
— Christopher Alexander
working with patterns: intro
Pattern Lab provides a way to
help you develop, describe, &
stitch together mark-up and
style patterns.
Pattern Lab uses conventions
so that the filesystem acts as
its database.
working with patterns: intro
working with patterns: organization
all file paths in this presentation are located under source/.
00-­‐organisms/01-­‐global/00-­‐header.mustache
00-­‐organisms/01-­‐global/00-­‐header.mustache
working with patterns: organization
patternType
the digits are optional and are purely for ordering the navigation.
00-­‐organisms/01-­‐global/00-­‐header.mustache
working with patterns: organization
the digits are optional and are purely for ordering the navigation.
patternSubtype
00-­‐organisms/01-­‐global/00-­‐header.mustache
working with patterns: organization
the digits are optional and are purely for ordering the navigation.
pattern
_00-­‐header.mustache
working with patterns: hiding patterns
the underscore hides a pattern in the navigation but the
pattern is still available for inclusion in other patterns.
00-­‐header@inreview.mustache
working with patterns: pattern states
anything after the “@” gets added as a class to the
pattern’s navigation element. “inprogress,” “inreview,” and
“complete” propagate to downstream patterns.
working with patterns: pattern states
working with patterns: systems, not pages
Atomic Design as the basis for Pattern Lab’s pattern types.
working with patterns: systems, not pages
molecules-search
organisms-header
templates-homepage
Important: You don’t have to use the
Atomic Design metaphor to use Pattern
Lab. Change it to whatever you want.
working with patterns: systems, not pages
working with patterns: atoms
working with patterns: using atoms
Use atoms to help define
general styles. Good first step
for style tiles, mood boards, or
testing style changes. They
most likely won’t be used in
other patterns.
working with patterns: atom example
working with patterns: atom example
<h1>Heading	
  Level	
  1</h1>
<h2>Heading	
  Level	
  2</h2>
<h3>Heading	
  Level	
  3</h3>
<h4>Heading	
  Level	
  4</h4>
<h5>Heading	
  Level	
  5</h5>
<h6>Heading	
  Level	
  6</h6>
atoms-headings:
working with patterns: molecules
working with patterns: using molecules
Use molecules as your base
for common patterns that
will be included further up.
In general, they shouldn’t
have partial dependencies.
Will use variables.
working with patterns: molecule example
working with patterns: molecule example
<li	
  class="comment-­‐container">
	
   <div	
  class="comment-­‐meta">
	
   	
   <img	
  src=”{{	
  img.avatar	
  }}”	
  class=”avatar”>
	
   	
   <h4	
  class="comment-­‐name">
<a	
  href="#">{{	
  name.first	
  }}	
  {{	
  name.last	
  }}</a>
	
   	
   </h4>
	
   </div>
	
   <div	
  class="comment-­‐text">
	
   	
   <p>{{	
  description	
  }}</p>
	
   </div>
</li>
molecules-single-comment:
working with patterns: molecule example
<li	
  class="comment-­‐container">
	
   <div	
  class="comment-­‐meta">
	
   	
   <img	
  src=”{{	
  img.avatar	
  }}”	
  class=”avatar”>
	
   	
   <h4	
  class="comment-­‐name">
<a	
  href="#">{{	
  name.first	
  }}	
  {{	
  name.last	
  }}</a>
	
   	
   </h4>
	
   </div>
	
   <div	
  class="comment-­‐text">
	
   	
   <p>{{	
  description	
  }}</p>
	
   </div>
</li>
these are variables and are defined in various JSON files.
molecules-single-comment:
customizing data: JSON & mustache vars
	
   <div>
	
   	
   <h4>
<a	
  href="#">{{	
  name.first	
  }}	
  {{	
  name.last	
  }}</a>
	
   	
   </h4>
	
   </div>
	
   <div	
  class="comment-­‐text">
	
   	
   <p>{{	
  description	
  }}</p>
	
   </div>
Mustache:
JSON:
{
	
  	
  	
  “name”:	
  {
	
  	
  	
  	
  	
  	
  “first”:	
  “Dave”,
	
  	
  	
  	
  	
  	
  “last”:	
  “Olsen”
	
  	
  	
  },
	
  	
  	
  “description”:	
  “Long	
  text	
  goes	
  here.”
}
customizing data: where to define it
Global data:
_data/_data.js
00-­‐pages/00-­‐homepage.json
Pattern-specific data:
00-­‐pages/00-­‐homepage~emergency.json
Pseudo-pattern:
specificity
customizing data: system/default data
<ul>
	
  	
  {{#	
  listItems.four	
  }}
	
  	
  	
  	
  <li>{{	
  name.first	
  }}	
  {{	
  name.last	
  }}</li>
	
  	
  {{/	
  listItems.four	
  }}
</ul>
the “listItems” variable:
the “link” variable:
<a	
  href=”{{	
  link.pages-­‐blog	
  }}”>
provides the real path to a pattern
provides an easy-to-use set of data to iterate over for your mock-
ups. supports up to twelve iterations. randomized every time the
site is generated. more info: http://bit.ly/1jojXKR
working with patterns: organisms
working with patterns: using organisms
Use organisms when you
need combinations of
molecules. Also good when
defining patterns that may
match partials in a CMS.
working with patterns: organism example
working with patterns: organism example
<section	
  class="comments	
  section">
	
   <div	
  class="comments-­‐container"	
  id="comments-­‐container">
	
   	
   <h2	
  class="section-­‐title">59	
  Comments</h2>
	
   	
   {{>	
  molecules-­‐comment-­‐form	
  }}	
  
	
   	
   <ul	
  class="comment-­‐list">
	
   	
   	
   {{#	
  listItems.five	
  }}
	
   	
   	
   	
   {{>	
  molecules-­‐single-­‐comment	
  }}	
  
	
   	
   	
   {{/	
  listItems.five	
  }}
	
   	
   </ul>
	
   </div>
	
   {{>	
  molecules-­‐pagination	
  }}	
  
</section>
organisms-comment-thread:
working with patterns: organism example
<section	
  class="comments	
  section">
	
   <div	
  class="comments-­‐container"	
  id="comments-­‐container">
	
   	
   <h2	
  class="section-­‐title">59	
  Comments</h2>
	
   	
   {{>	
  molecules-­‐comment-­‐form	
  }}	
  
	
   	
   <ul	
  class="comment-­‐list">
	
   	
   	
   {{#	
  listItems.five	
  }}
	
   	
   	
   	
   {{>	
  molecules-­‐single-­‐comment	
  }}	
  
	
   	
   	
   {{/	
  listItems.five	
  }}
	
   	
   </ul>
	
   </div>
	
   {{>	
  molecules-­‐pagination	
  }}	
  
</section>
these are mustache partials and are how we include one
pattern within another.
organisms-comment-thread:
00-­‐organisms/01-­‐global/00-­‐header.mustache
working with patterns: partial syntax
if we want to include this pattern in another pattern...
default partial syntax uses only the pattern type and pattern name...
{{>	
  organisms-­‐header	
  }}
fuzzy matching of the pattern name...
{{>	
  organisms-­‐head	
  }}
{{>	
  00-­‐organisms/01-­‐global/00-­‐header	
  }}
traditional mustache partial...
customizing data: pattern parameters
{{>	
  molecule-­‐alert(message:	
  “hello”)	
  }}
<div	
  class=”alert”>
	
  	
  {{	
  message	
  }}
</div>
<div	
  class=”alert”>
	
  	
  hello
</div>
Mustache:
Partial:
Rendered:
pattern parameters allow for defining of variable replacement right in the partial.
customizing data: style modifiers
{{>	
  molecule-­‐alert:error	
  }}
<div	
  class=”alert	
  {{	
  styleModifier	
  }}”>
	
  	
  Message
</div>
<div	
  class=”alert	
  error”>
	
  	
  Message
</div>
Mustache:
Partial:
Rendered:
style modifiers allow for DRY patterns.
working with patterns: templates
working with patterns: using templates
Use templates to wireframe
and provide a low-fidelity
version of final pages. They’re
all about layout. Template
mark-up can and should
include sections that might not
show by default. After atoms,
templates will be the other
thing you show clients.
working with patterns: template example
working with patterns: template example
<div	
  class="page"	
  id="page">
	
   {{>	
  organisms-­‐header	
  }}
	
   <div	
  role="main">
	
   	
   {{#	
  emergency	
  }}
	
   	
   	
   {{>	
  molecules-­‐alert:error	
  }}
	
   	
   {{/	
  emergency	
  }}
	
   	
   {{#	
  hero	
  }}
	
   	
   	
   {{>	
  molecules-­‐block-­‐hero	
  }}
	
   	
   {{/	
  hero}}
	
   	
   <div	
  class="g	
  g-­‐3up">
	
   	
   	
   {{#	
  touts}}
	
   	
   	
   	
   <div	
  class="gi">
	
   	
   	
   	
   	
   {{>	
  molecules-­‐block-­‐inset	
  }}
	
   	
   	
   	
   </div>
	
   	
   	
   {{/	
  touts}}
	
   	
   </div><!-­‐-­‐end	
  3up-­‐-­‐>
templates-homepage:
working with patterns: common header & footer
00-­‐atoms/00-­‐meta/_00-­‐header.mustache
00-­‐atoms/00-­‐meta/_01-­‐footer.mustache
if these patterns exist Pattern Lab automatically includes them as
your header and footer.
working with patterns: template example
<div	
  class="page"	
  id="page">
	
   {{>	
  organisms-­‐header	
  }}
	
   <div	
  role="main">
	
   	
   {{#	
  emergency	
  }}
	
   	
   	
   {{>	
  molecules-­‐alert:error	
  }}
	
   	
   {{/	
  emergency	
  }}
	
   	
   {{#	
  hero	
  }}
	
   	
   	
   {{>	
  molecules-­‐block-­‐hero	
  }}
	
   	
   {{/	
  hero}}	
  
	
   	
   ...
these are quasi-“if statements” and allow for the inclusion of multiple
layout possibilities for a template. turned on via JSON variables.
templates-homepage:
working with patterns: pages
working with patterns: using pages
Use pages to provide high-
fidelity versions of a template.
They should include very
specific data.They’re all about
showing “real” content in the
wireframe.
working with patterns: page example
working with patterns: page example
{{>	
  templates-­‐homepage	
  }}
pages should simply include/reference templates. the majority of the power
of a page is in its associated JSON file and by using pseudo-patterns.
annotations: _data/annotations.js
{
	
  	
  "el":	
  "header[role=banner]",
	
  	
  "title"	
  :	
  "Masthead",
	
  	
  "comment":	
  "The	
  main	
  header..."
}
JSON:
Front-end:
advanced tools:
‣ auto-regenerate
‣ auto-reload
‣ page follow
‣ keyboard shortcuts
‣ query string params
‣ QR code generator
documentation: patternlab.io/docs/
common workflow with advanced tools:
1. start watcher & auto-reload server at
the same time
2. edit & save files in source/
3. watch things change in your browser
integrating with grunt:
npm	
  install	
  -­‐-­‐save-­‐dev	
  grunt-­‐shell
shell:	
  {
	
  	
  patternlab:	
  {
	
  	
  	
  	
  command:	
  "php	
  core/builder.php	
  -­‐gp"
	
  	
  }
},
shell:patternlab
install grunt-shell:
add to initConfig:
add to registerTask:
pattern lab’s future:
‣ KSS
‣ custom starter kits
‣ export/converter
‣ better annotations
summing up:
‣ Our workflows are going to change.
‣ Involve entire team in the process.
‣ Create modular systems of mark-
up.
‣ Pattern Lab can be a central tool in
helping that happen.
pattern lab
patternlab.io
thanks and questions:

More Related Content

What's hot (20)

PPTX
Untangling spring week10
Derek Jacoby
 
PDF
APIs: A Better Alternative to Page Objects
Sauce Labs
 
PDF
High Performance JavaScript 2011
Nicholas Zakas
 
PPT
Django, What is it, Why is it cool?
Tom Brander
 
PDF
Two scoops of Django - Deployment
flywindy
 
PPTX
2014 Joker - Integration Testing from the Trenches
Nicolas Fränkel
 
PDF
How to Use Selenium, Successfully
Sauce Labs
 
PDF
Spring Boot
Diego Pacheco
 
PDF
Selenium Best Practices with Jason Huggins
Sauce Labs
 
PDF
Node.js Development Workflow Automation with Grunt.js
kiyanwang
 
PDF
Django Introduction & Tutorial
之宇 趙
 
PPTX
Browser Automated Testing Frameworks - Nightwatch.js
Luís Bastião Silva
 
PPTX
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
Jim Lane
 
PDF
Testing Code.org's Interactive CS Curriculum
Brian Jordan
 
PDF
Auditing Drupal Sites
Exove
 
PDF
Django Best Practices
Abdullah Çetin ÇAVDAR
 
PDF
Djangocon 2014 angular + django
Nina Zakharenko
 
ODP
Django for Beginners
Jason Davies
 
ODP
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Matthew Farwell
 
PDF
Test your Javascript! v1.1
Eric Wendelin
 
Untangling spring week10
Derek Jacoby
 
APIs: A Better Alternative to Page Objects
Sauce Labs
 
High Performance JavaScript 2011
Nicholas Zakas
 
Django, What is it, Why is it cool?
Tom Brander
 
Two scoops of Django - Deployment
flywindy
 
2014 Joker - Integration Testing from the Trenches
Nicolas Fränkel
 
How to Use Selenium, Successfully
Sauce Labs
 
Spring Boot
Diego Pacheco
 
Selenium Best Practices with Jason Huggins
Sauce Labs
 
Node.js Development Workflow Automation with Grunt.js
kiyanwang
 
Django Introduction & Tutorial
之宇 趙
 
Browser Automated Testing Frameworks - Nightwatch.js
Luís Bastião Silva
 
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
Jim Lane
 
Testing Code.org's Interactive CS Curriculum
Brian Jordan
 
Auditing Drupal Sites
Exove
 
Django Best Practices
Abdullah Çetin ÇAVDAR
 
Djangocon 2014 angular + django
Nina Zakharenko
 
Django for Beginners
Jason Davies
 
Nexthink Library - replacing a ruby on rails application with Scala and Spray
Matthew Farwell
 
Test your Javascript! v1.1
Eric Wendelin
 

Viewers also liked (20)

PDF
Atomic design
Brad Frost
 
PDF
Use Qualities
Sefat Chowdhury
 
PDF
The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)
Dave Olsen
 
PDF
Admissions Brain Dump
Dave Olsen
 
PDF
The What & Why of Pattern Lab
Dave Olsen
 
PDF
Atomic Design, Living Style Guides and the Holy Grail
Netcetera
 
PDF
Optimizing web performance (Fronteers edition)
Dave Olsen
 
PDF
Case Study: Automating Outage Monitoring & Communication
Dave Olsen
 
PDF
Progressive Mobile Strategy Redux: The Future Friendly Enterprise
Dave Olsen
 
PDF
Brad frost: Atomic design (Webdagene 2014)
webdagene
 
PDF
Our Best Practices Are Killing Us
Nicole Sullivan
 
PDF
School safety programme in India
Kunal Ashar
 
PDF
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
Jer Clarke
 
PDF
The Death of Lorem Ipsum & Pixel Perfect Content
Dave Olsen
 
PDF
Дизайн и верстка рассылок - Портфолио
EmailSoldiers
 
PDF
Контент, который переступает зону кофморта потребителя
Skykillers
 
PDF
Reimagining Your Website: What are prospective students looking for and how a...
Dave Olsen
 
PDF
National implementation report for sms billing and mobile payments in slovakia
A.N.
 
PDF
Beeline subscription rules
A.N.
 
PDF
Beeline Brandbook
Beto Lima Branding
 
Atomic design
Brad Frost
 
Use Qualities
Sefat Chowdhury
 
The Death of Lorem Ipsum and Pixel-Perfect Content (MinneWebCon version)
Dave Olsen
 
Admissions Brain Dump
Dave Olsen
 
The What & Why of Pattern Lab
Dave Olsen
 
Atomic Design, Living Style Guides and the Holy Grail
Netcetera
 
Optimizing web performance (Fronteers edition)
Dave Olsen
 
Case Study: Automating Outage Monitoring & Communication
Dave Olsen
 
Progressive Mobile Strategy Redux: The Future Friendly Enterprise
Dave Olsen
 
Brad frost: Atomic design (Webdagene 2014)
webdagene
 
Our Best Practices Are Killing Us
Nicole Sullivan
 
School safety programme in India
Kunal Ashar
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
Jer Clarke
 
The Death of Lorem Ipsum & Pixel Perfect Content
Dave Olsen
 
Дизайн и верстка рассылок - Портфолио
EmailSoldiers
 
Контент, который переступает зону кофморта потребителя
Skykillers
 
Reimagining Your Website: What are prospective students looking for and how a...
Dave Olsen
 
National implementation report for sms billing and mobile payments in slovakia
A.N.
 
Beeline subscription rules
A.N.
 
Beeline Brandbook
Beto Lima Branding
 
Ad

Similar to The Why and What of Pattern Lab (20)

PDF
Thinking in components
Razvan Rosu
 
PDF
Atomic Design with PatternLabs
Atlogys Technical Consulting
 
PDF
Design Systems, Pattern Libraries & WordPress
Jesse James Arnold
 
PDF
Prototyping Your Way to Happiness
Mandi Wise
 
PDF
Adventures in Atomic Design
Andrew Jones
 
PDF
Style Guide Best Practices
Brad Frost
 
PDF
The New Design Workflow
Phase2
 
PDF
Design Systems are Coming... Are you Ready?
Vernon Kesner
 
PPTX
Diseño de Sistemas de Diseño con Atomic Design y Pattern Lab
Mauricio Angulo Sillas
 
PDF
How to build the perfect pattern library
Wolf Brüning
 
PDF
Accessibility in Pattern Libraries
Russ Weakley
 
PPTX
UX Edmonton - Pattern Libraries
Robert Evans
 
PDF
Atomic Design - An Event Apart San Diego
Brad Frost
 
PDF
Patterns Drupal Camp Pune09
drupalindia
 
PDF
Style Guides: For Clients, For Products, & For Yourself
sophshep
 
PDF
Create Your Own Starter Files
Emily Lewis
 
PDF
CSS pattern libraries
Russ Weakley
 
PDF
TfL: patterns and projects
Jonathan Culling
 
PDF
Creating Content in a Pattern Library
Rachel DeLauder
 
PPTX
Explode conftalk - v2 ppt
Emily Wyss
 
Thinking in components
Razvan Rosu
 
Atomic Design with PatternLabs
Atlogys Technical Consulting
 
Design Systems, Pattern Libraries & WordPress
Jesse James Arnold
 
Prototyping Your Way to Happiness
Mandi Wise
 
Adventures in Atomic Design
Andrew Jones
 
Style Guide Best Practices
Brad Frost
 
The New Design Workflow
Phase2
 
Design Systems are Coming... Are you Ready?
Vernon Kesner
 
Diseño de Sistemas de Diseño con Atomic Design y Pattern Lab
Mauricio Angulo Sillas
 
How to build the perfect pattern library
Wolf Brüning
 
Accessibility in Pattern Libraries
Russ Weakley
 
UX Edmonton - Pattern Libraries
Robert Evans
 
Atomic Design - An Event Apart San Diego
Brad Frost
 
Patterns Drupal Camp Pune09
drupalindia
 
Style Guides: For Clients, For Products, & For Yourself
sophshep
 
Create Your Own Starter Files
Emily Lewis
 
CSS pattern libraries
Russ Weakley
 
TfL: patterns and projects
Jonathan Culling
 
Creating Content in a Pattern Library
Rachel DeLauder
 
Explode conftalk - v2 ppt
Emily Wyss
 
Ad

More from Dave Olsen (20)

PDF
Taking Your HTML Email Communications from "Ew" to "Wow"
Dave Olsen
 
PDF
The Google Marketing Workflow Workshop
Dave Olsen
 
PDF
Building an Academic Program Database and API with Contentful and Amazon Web ...
Dave Olsen
 
PDF
Case Study: Rebuilding an Admissions Web Presence
Dave Olsen
 
PDF
Implementing Brand Patterns
Dave Olsen
 
PDF
The Squishy Future of Content - HEEMAC Edition
Dave Olsen
 
PDF
The Squishy Future of Content - Key Communicators Edition
Dave Olsen
 
PDF
The Squishy Future of Content - Penn State Edition
Dave Olsen
 
PDF
The Squishy Future of Content
Dave Olsen
 
PDF
The Server Side of Responsive Web Design
Dave Olsen
 
PDF
Measuring Web Performance - HighEdWeb Edition
Dave Olsen
 
PDF
Web Performance & You - HighEdWeb Arkansas Version
Dave Olsen
 
PDF
Web Performance & You
Dave Olsen
 
PDF
Measuring Web Performance (HighEdWeb FL Edition)
Dave Olsen
 
PDF
Measuring Web Performance
Dave Olsen
 
PDF
Everything You Know is Not Quite Right Anymore: Rethinking Best Practices to ...
Dave Olsen
 
PDF
The Future Friendly Campus (Workshop Edition)
Dave Olsen
 
PDF
RESS: An Evolution of Responsive Web Design
Dave Olsen
 
KEY
Developing a Progressive Mobile Strategy (J. Boye edition)
Dave Olsen
 
KEY
The Future Friendly Campus
Dave Olsen
 
Taking Your HTML Email Communications from "Ew" to "Wow"
Dave Olsen
 
The Google Marketing Workflow Workshop
Dave Olsen
 
Building an Academic Program Database and API with Contentful and Amazon Web ...
Dave Olsen
 
Case Study: Rebuilding an Admissions Web Presence
Dave Olsen
 
Implementing Brand Patterns
Dave Olsen
 
The Squishy Future of Content - HEEMAC Edition
Dave Olsen
 
The Squishy Future of Content - Key Communicators Edition
Dave Olsen
 
The Squishy Future of Content - Penn State Edition
Dave Olsen
 
The Squishy Future of Content
Dave Olsen
 
The Server Side of Responsive Web Design
Dave Olsen
 
Measuring Web Performance - HighEdWeb Edition
Dave Olsen
 
Web Performance & You - HighEdWeb Arkansas Version
Dave Olsen
 
Web Performance & You
Dave Olsen
 
Measuring Web Performance (HighEdWeb FL Edition)
Dave Olsen
 
Measuring Web Performance
Dave Olsen
 
Everything You Know is Not Quite Right Anymore: Rethinking Best Practices to ...
Dave Olsen
 
The Future Friendly Campus (Workshop Edition)
Dave Olsen
 
RESS: An Evolution of Responsive Web Design
Dave Olsen
 
Developing a Progressive Mobile Strategy (J. Boye edition)
Dave Olsen
 
The Future Friendly Campus
Dave Olsen
 

Recently uploaded (20)

PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
July Patch Tuesday
Ivanti
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
July Patch Tuesday
Ivanti
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 

The Why and What of Pattern Lab

  • 1. the Why & What of patternlab.io dave olsen, @dmolsen pattern labcreate atomic design systems
  • 3. a roadmap for our talk: ‣ rethinking the web design process - process: linear vs. collaborative - communication: clients and RWD - modular systems: systems vs. pages ‣ deep dive into pattern lab - quick tour of the front-end - installation - working with patterns - customizing data - advanced features
  • 4. Our existing standards, workflows, & infrastructure won’t hold up. A FUTURE-FRIENDLY TRUTH http://futurefriend.ly
  • 5. courtesy Ben Callahan, Sparkbox FRONT-END BACK-ENDDESIGN THINK ABOUT USERS THROW IN SOME CONTENT LAUNCH! Linear Workflow
  • 6. CONTENT UX FRONT-END DESIGNBACK-END “1 Deliverable” Workflow courtesy Ben Callahan, Sparkbox You Are Here Iterative or Spiral Process
  • 7. communicate. Ultimately, process is about how designers, developers & clients
  • 8. Creation is a shared activity. - Bermon Painter
  • 9. rethinking the web design process: collaborate Kick-off Design & Develop Test Client Review Production
  • 10. rethinking how we communicate: deliverables ‣ mood boards ‣ style tiles ‣ wireframes ‣ low-fidelity HTML mock-ups ‣ high-fidelity HTML mock-ups ‣ “cut up” mark-up, CSS, & JS ‣ pattern libraries & style guides
  • 11. Our hand-offs to clients should allow them to re-mix common elements that we’ve developed to build new things. Our deliverables should be systems, not pages.
  • 12. Build, test, and review deliverables in the place where a project is going to be used. Get to the browser.
  • 13. ...communicate better with one another? ...build robust systems and not pages? ...review everything in the browser? So how do we...
  • 15. Pattern Lab is a collection of tools for creating modular systems that involves your entire team & your client every step of the way and lets everyone review in the browser.
  • 16. what pattern lab is: your deliverables in one place
  • 17. Kick-off Design & Develop Test Client Review Production what pattern lab is: a collection of tools atomic spectrum viewport re-sizer annotationspage follow pattern states shared component library & dynamic data MQ re-sizer starter kit auto-reload code view auto-build style guide
  • 18. working with patterns: systems, not pages Atomic Design as the basis for Pattern Lab’s pattern types.
  • 19. what pattern lab ain’t: ‣ a fancy UI framework ‣ dependency heavy ‣ incredibly rigid
  • 20. You make Pattern Lab what you want and need it to be.
  • 21. the requirements: PHP 5.3+ no web server required* * - only required for page follow Mustache is used for patterns. JSON is used for dynamic data storage.
  • 23. changes to pattern lab: github.com/pattern-lab
  • 25. installation: generate for the first time
  • 26. installation: generate for the first time php  core/builder.php  -­‐g just in case you’re a fan of the command line, on linux or on windows. php  core/builder.php  -­‐-­‐help will show you all of your options.
  • 27. installation: review the installation
  • 28. installation: review source/ the only required directories are _data/ & _patterns/. otherwise, you can change source/ as much as you want. this is what we mean about making your own Bootstrap. you can even use Bootstrap.
  • 29. installation: open pattern lab’s index.html don’t edit public/. always make changes in source/. public/ is for your own and your client review purposes.
  • 30. installation: done! Pattern Lab doesn’t require Apache so no extra set-up. You can drop Pattern Lab into a Dropbox folder for clients.
  • 31. front-end tour: follow along demo.patternlab.io
  • 37. front-end tour: media query list
  • 42. working with patterns: intro What is a pattern?
  • 43. working with patterns: intro Each pattern describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. — Christopher Alexander
  • 44. working with patterns: intro Pattern Lab provides a way to help you develop, describe, & stitch together mark-up and style patterns.
  • 45. Pattern Lab uses conventions so that the filesystem acts as its database. working with patterns: intro
  • 46. working with patterns: organization all file paths in this presentation are located under source/. 00-­‐organisms/01-­‐global/00-­‐header.mustache
  • 47. 00-­‐organisms/01-­‐global/00-­‐header.mustache working with patterns: organization patternType the digits are optional and are purely for ordering the navigation.
  • 48. 00-­‐organisms/01-­‐global/00-­‐header.mustache working with patterns: organization the digits are optional and are purely for ordering the navigation. patternSubtype
  • 49. 00-­‐organisms/01-­‐global/00-­‐header.mustache working with patterns: organization the digits are optional and are purely for ordering the navigation. pattern
  • 50. _00-­‐header.mustache working with patterns: hiding patterns the underscore hides a pattern in the navigation but the pattern is still available for inclusion in other patterns.
  • 51. 00-­‐[email protected] working with patterns: pattern states anything after the “@” gets added as a class to the pattern’s navigation element. “inprogress,” “inreview,” and “complete” propagate to downstream patterns.
  • 52. working with patterns: pattern states
  • 53. working with patterns: systems, not pages Atomic Design as the basis for Pattern Lab’s pattern types.
  • 54. working with patterns: systems, not pages molecules-search organisms-header templates-homepage
  • 55. Important: You don’t have to use the Atomic Design metaphor to use Pattern Lab. Change it to whatever you want. working with patterns: systems, not pages
  • 57. working with patterns: using atoms Use atoms to help define general styles. Good first step for style tiles, mood boards, or testing style changes. They most likely won’t be used in other patterns.
  • 58. working with patterns: atom example
  • 59. working with patterns: atom example <h1>Heading  Level  1</h1> <h2>Heading  Level  2</h2> <h3>Heading  Level  3</h3> <h4>Heading  Level  4</h4> <h5>Heading  Level  5</h5> <h6>Heading  Level  6</h6> atoms-headings:
  • 61. working with patterns: using molecules Use molecules as your base for common patterns that will be included further up. In general, they shouldn’t have partial dependencies. Will use variables.
  • 62. working with patterns: molecule example
  • 63. working with patterns: molecule example <li  class="comment-­‐container">   <div  class="comment-­‐meta">     <img  src=”{{  img.avatar  }}”  class=”avatar”>     <h4  class="comment-­‐name"> <a  href="#">{{  name.first  }}  {{  name.last  }}</a>     </h4>   </div>   <div  class="comment-­‐text">     <p>{{  description  }}</p>   </div> </li> molecules-single-comment:
  • 64. working with patterns: molecule example <li  class="comment-­‐container">   <div  class="comment-­‐meta">     <img  src=”{{  img.avatar  }}”  class=”avatar”>     <h4  class="comment-­‐name"> <a  href="#">{{  name.first  }}  {{  name.last  }}</a>     </h4>   </div>   <div  class="comment-­‐text">     <p>{{  description  }}</p>   </div> </li> these are variables and are defined in various JSON files. molecules-single-comment:
  • 65. customizing data: JSON & mustache vars   <div>     <h4> <a  href="#">{{  name.first  }}  {{  name.last  }}</a>     </h4>   </div>   <div  class="comment-­‐text">     <p>{{  description  }}</p>   </div> Mustache: JSON: {      “name”:  {            “first”:  “Dave”,            “last”:  “Olsen”      },      “description”:  “Long  text  goes  here.” }
  • 66. customizing data: where to define it Global data: _data/_data.js 00-­‐pages/00-­‐homepage.json Pattern-specific data: 00-­‐pages/00-­‐homepage~emergency.json Pseudo-pattern: specificity
  • 67. customizing data: system/default data <ul>    {{#  listItems.four  }}        <li>{{  name.first  }}  {{  name.last  }}</li>    {{/  listItems.four  }} </ul> the “listItems” variable: the “link” variable: <a  href=”{{  link.pages-­‐blog  }}”> provides the real path to a pattern provides an easy-to-use set of data to iterate over for your mock- ups. supports up to twelve iterations. randomized every time the site is generated. more info: http://bit.ly/1jojXKR
  • 69. working with patterns: using organisms Use organisms when you need combinations of molecules. Also good when defining patterns that may match partials in a CMS.
  • 70. working with patterns: organism example
  • 71. working with patterns: organism example <section  class="comments  section">   <div  class="comments-­‐container"  id="comments-­‐container">     <h2  class="section-­‐title">59  Comments</h2>     {{>  molecules-­‐comment-­‐form  }}       <ul  class="comment-­‐list">       {{#  listItems.five  }}         {{>  molecules-­‐single-­‐comment  }}         {{/  listItems.five  }}     </ul>   </div>   {{>  molecules-­‐pagination  }}   </section> organisms-comment-thread:
  • 72. working with patterns: organism example <section  class="comments  section">   <div  class="comments-­‐container"  id="comments-­‐container">     <h2  class="section-­‐title">59  Comments</h2>     {{>  molecules-­‐comment-­‐form  }}       <ul  class="comment-­‐list">       {{#  listItems.five  }}         {{>  molecules-­‐single-­‐comment  }}         {{/  listItems.five  }}     </ul>   </div>   {{>  molecules-­‐pagination  }}   </section> these are mustache partials and are how we include one pattern within another. organisms-comment-thread:
  • 73. 00-­‐organisms/01-­‐global/00-­‐header.mustache working with patterns: partial syntax if we want to include this pattern in another pattern... default partial syntax uses only the pattern type and pattern name... {{>  organisms-­‐header  }} fuzzy matching of the pattern name... {{>  organisms-­‐head  }} {{>  00-­‐organisms/01-­‐global/00-­‐header  }} traditional mustache partial...
  • 74. customizing data: pattern parameters {{>  molecule-­‐alert(message:  “hello”)  }} <div  class=”alert”>    {{  message  }} </div> <div  class=”alert”>    hello </div> Mustache: Partial: Rendered: pattern parameters allow for defining of variable replacement right in the partial.
  • 75. customizing data: style modifiers {{>  molecule-­‐alert:error  }} <div  class=”alert  {{  styleModifier  }}”>    Message </div> <div  class=”alert  error”>    Message </div> Mustache: Partial: Rendered: style modifiers allow for DRY patterns.
  • 77. working with patterns: using templates Use templates to wireframe and provide a low-fidelity version of final pages. They’re all about layout. Template mark-up can and should include sections that might not show by default. After atoms, templates will be the other thing you show clients.
  • 78. working with patterns: template example
  • 79. working with patterns: template example <div  class="page"  id="page">   {{>  organisms-­‐header  }}   <div  role="main">     {{#  emergency  }}       {{>  molecules-­‐alert:error  }}     {{/  emergency  }}     {{#  hero  }}       {{>  molecules-­‐block-­‐hero  }}     {{/  hero}}     <div  class="g  g-­‐3up">       {{#  touts}}         <div  class="gi">           {{>  molecules-­‐block-­‐inset  }}         </div>       {{/  touts}}     </div><!-­‐-­‐end  3up-­‐-­‐> templates-homepage:
  • 80. working with patterns: common header & footer 00-­‐atoms/00-­‐meta/_00-­‐header.mustache 00-­‐atoms/00-­‐meta/_01-­‐footer.mustache if these patterns exist Pattern Lab automatically includes them as your header and footer.
  • 81. working with patterns: template example <div  class="page"  id="page">   {{>  organisms-­‐header  }}   <div  role="main">     {{#  emergency  }}       {{>  molecules-­‐alert:error  }}     {{/  emergency  }}     {{#  hero  }}       {{>  molecules-­‐block-­‐hero  }}     {{/  hero}}       ... these are quasi-“if statements” and allow for the inclusion of multiple layout possibilities for a template. turned on via JSON variables. templates-homepage:
  • 83. working with patterns: using pages Use pages to provide high- fidelity versions of a template. They should include very specific data.They’re all about showing “real” content in the wireframe.
  • 84. working with patterns: page example
  • 85. working with patterns: page example {{>  templates-­‐homepage  }} pages should simply include/reference templates. the majority of the power of a page is in its associated JSON file and by using pseudo-patterns.
  • 86. annotations: _data/annotations.js {    "el":  "header[role=banner]",    "title"  :  "Masthead",    "comment":  "The  main  header..." } JSON: Front-end:
  • 87. advanced tools: ‣ auto-regenerate ‣ auto-reload ‣ page follow ‣ keyboard shortcuts ‣ query string params ‣ QR code generator
  • 89. common workflow with advanced tools: 1. start watcher & auto-reload server at the same time 2. edit & save files in source/ 3. watch things change in your browser
  • 90. integrating with grunt: npm  install  -­‐-­‐save-­‐dev  grunt-­‐shell shell:  {    patternlab:  {        command:  "php  core/builder.php  -­‐gp"    } }, shell:patternlab install grunt-shell: add to initConfig: add to registerTask:
  • 91. pattern lab’s future: ‣ KSS ‣ custom starter kits ‣ export/converter ‣ better annotations
  • 92. summing up: ‣ Our workflows are going to change. ‣ Involve entire team in the process. ‣ Create modular systems of mark- up. ‣ Pattern Lab can be a central tool in helping that happen.