how to build the perfect pattern library

75
How to Build the Perfect Pattern Library Wolf Brüning – UXCampEurope 2014

Upload: wolf-bruening

Post on 11-Aug-2014

1.832 views

Category:

Design


0 download

DESCRIPTION

Slides from my presentation at UXCampEurope 2014, Berlin You can learn more on the topic on: http://www.produktbezogen.de/bauanleitung-pattern-library-1/ (in German)

TRANSCRIPT

Page 1: How to build the perfect pattern library

How to Build the Perfect Pattern Library

Wolf Brüning – UXCampEurope 2014

Page 2: How to build the perfect pattern library

About me

@wolfbruening

produktbezogen.de

I am Senior Interaction Designer at: I write on UX design and product management for the blog:

Page 3: How to build the perfect pattern library

About OTTO.de• 2nd largest ecommerce

site in Germany • 1.7+ billion € revenue • 1.5+ million daily visits • Millions of items

ranging from swimwear to chainsaws

• Relaunch with pattern library last October

Page 4: How to build the perfect pattern library

Flashback!

Page 5: How to build the perfect pattern library

Two years ago: no pattern library

There were 8 solutions for product recommendation cinemas on OTTO.de at the same time! Each with different design, different behaviors and different code.

Page 6: How to build the perfect pattern library

Problem 1: Working out of sync

In large organizations it is difficult to completely synchronize all designers and product teams. Different solutions are built for the same design problem. (This will also happen in smaller organizations on the long run.)

Page 7: How to build the perfect pattern library

Problem 2: Misunderstandings

Misunderstandings in the communication between design and development create more inconsistencies.

Page 8: How to build the perfect pattern library

Problem 3: Duplicate work

Even if there would be perfect synchronization and no misunderstandings there would still be duplicate work.

Page 9: How to build the perfect pattern library

Working without design patterns• Almost certainly will create inconsistent interfaces • Leads to misunderstandings • Leads to lots of extra work and QA

Page 10: How to build the perfect pattern library

What is a design pattern?

Page 11: How to build the perfect pattern library

Design pattern definitionA design pattern is an element of an user interface that solves a specific design problem and repeats across the product in various contexts and/or with various content.

Perfect example: a button

Page 12: How to build the perfect pattern library

Design patterns examples

• Atomic patterns: „bricks“• Patterns of patterns: „components“

Page 13: How to build the perfect pattern library

Design patterns examplesTemplates and sub-templates

Page 14: How to build the perfect pattern library

Atomic Design

patternlab.io A comparable classification by Brad Frost

Page 15: How to build the perfect pattern library

Design patterns examplesFlows

Page 16: How to build the perfect pattern library

Design patterns examplesAnimations and transitions

Meaningful Transitions Johannes Tonollo

Page 17: How to build the perfect pattern library

Design patterns examples• Naming conventions • Visual Design: Style Tiles

Page 18: How to build the perfect pattern library

Our path to the perfect pattern library

Page 19: How to build the perfect pattern library

First try: By the books

Page 20: How to build the perfect pattern library

„A typical pattern describes the problem, the chosen solution, the rationale behind that solution, related patterns that the designer should be aware of, and the results of usability testing.“

Jared Spool Founding Principal of UIE

Page 21: How to build the perfect pattern library

Yahoo Pattern Library

Page 22: How to build the perfect pattern library

First mock-up

Working like this was tedious and cost a lot of time

Page 23: How to build the perfect pattern library

Yahoo Pattern Library

Page 24: How to build the perfect pattern library

Yahoo Pattern Library

WTF?

Page 25: How to build the perfect pattern library

Yahoo Pattern Library process

http://boxesandarrows.com/implementing-a-pattern-library-in-the-real-world-a-yahoo-case-study/

Page 26: How to build the perfect pattern library

Old school pattern libraries• Too much overhead for documentation and processes • Operation will cost more time than save time • High probability of becoming obsolete

Page 27: How to build the perfect pattern library

Key learnings1. For pattern libraries being up to date is more

important than anything else. 2. Overhead is the enemy of up-to-dateness.

!

➡ We needed a leaner approach

Page 28: How to build the perfect pattern library

Second try: Let’s get modular

Page 29: How to build the perfect pattern library

Back to the drawing board• But in a big corporation you still have lots of people

and roles involved:• Interaction Designers

• Visual Designers

• User Experience Managers

• Product Managers

• Developers

• QA

• Project Managers

• Corporate Design

• External Agencies

• Subsidiary Companies

• …

• A big one-size-fits-all solution is too cumbersome

Page 30: How to build the perfect pattern library

Our solutionA modular pattern library for our three main use cases

• Documentation and communication (long term)

• Discovery and design

• Development

Page 31: How to build the perfect pattern library

Module 1: Documentation• Closest to a traditional

pattern library • Only documentation

that is really necessary • Should use an existing

tool

Page 32: How to build the perfect pattern library

Module 2: Discovery & DesignGood overview and quick access to all patterns: PSDs

Page 33: How to build the perfect pattern library

Module 3: DevelopmentLive preview and quick access to the code of a pattern: „Code Pattern Library“ inspired by Twitter Bootstrap

Page 34: How to build the perfect pattern library

Learning: Involve your developers• Designers AND developers will benefit from a good

pattern library • It will improve the relationship between the two roles

Page 35: How to build the perfect pattern library

Modular structure

DocumentationCommunication(Brand Experience Guide)

Code

Layer-Name Pattern-Name Pattern-Name CSS-Classes

Discovery &Design(PSD-Files)

Development(Code Pattern Library)

Page 36: How to build the perfect pattern library

Modular structure

DocumentationCommunication(Brand Experience Guide)

Code

Layer-Name Pattern-Name Pattern-Name CSS-Classes

Discovery &Design(PSD-Files)

Development(Code Pattern Library)

Page 37: How to build the perfect pattern library

Key learnings• Keeping three modules in sync needs a lot of discipline,

especially if you work agile and your patterns still evolve • Documenting patterns as images gets extremely

cumbersome with components (patterns of patterns) • Giant PSD-files kill photoshop • Everybody, even designers, loved the Code Pattern

Library !

➡ We were still not lean enough

Page 38: How to build the perfect pattern library

Third (and final) try: Lean Pattern Library

Page 39: How to build the perfect pattern library

Simplifying our structure

DocumentationCommunication(Brand Experience Guide)

Code

Layer-Name Pattern-Name Pattern-Name CSS-Classes

Discovery &Design(PSD-Files)

Development(Code Pattern Library)

We stopped using the PSDs (and maybe photoshop at all) and moved the documentation to the code pattern library.

Page 40: How to build the perfect pattern library

Simplifying our structure

Code

Layer-Name Pattern-Name CSS-Classes

Discovery &Design

(???)

Documentation, Design & Development

(Code Pattern Library)

Brand-Communication(Brand Experience Guide)

Only a subset of stable and brand relevant patterns is moved to the brand experience guide.

Page 41: How to build the perfect pattern library

Principles for a lean pattern library

Page 42: How to build the perfect pattern library

Lean processes & documentation• A not-so-perfect pattern library is a lot better than a

perfectly documented but outdated one • Try to keep pattern definitions as scarce as possible and

processes and discussions lean • Work overhead for adding and managing patterns should

be as low as possible • If maintaining a pattern library saves more time than it

costs, everyone will be motivated to keep it up to date • This is the most important factor for a successful

implementation

Page 43: How to build the perfect pattern library

Lean processes & documentation• With most patterns we start with no documentation at all • We only add documentation if problems pop up with

understanding the pattern • One designer and one developer as „pattern masters“

create and manage our patterns

Page 44: How to build the perfect pattern library

Documenting in code• Provide an authentic look & feel • You can inspect the behavior (to some extent) • Support a closer collaboration between designers and

developers • No need to update components when one of its sub-

patterns is changed !

• Be careful if there are users with legacy browsers

Page 45: How to build the perfect pattern library

Documenting in code• Our pattern library CSS is synchronous with otto.de • CSS3 + Webfonts + Icon-Fonts, as few Images as

possible • Flexible and easy to update

• Future proof: High resolution friendly, responsive design friendly

• No hacks for maintaining a similar look on legacy browsers (but has to work)

• Outer margins are not part of the pattern (prevent unnecessary variants)

Page 46: How to build the perfect pattern library

Stability vs. changeWe put up a set of rules that prevent patterns from being too easily changed:

• Only add new patterns if existing patterns don’t provide a satisfactory solution

• Change pattern if a new pattern becomes standard in the market

• Chance pattern if a new pattern beats it in user- or a/b-testing

Page 47: How to build the perfect pattern library

Stability vs. change• Continuously experiment with new patterns • Challenge existing patterns on a regular basis

!

• Find a good balance between stability and change. Don’t be a pattern nazi

Page 48: How to build the perfect pattern library

„A pattern library is like a compass. It’ll tell you what direction you should go in, but it’s up to you to figure out how to get there.“

Lucas Pettinati UX Lead, Google Apps

Page 49: How to build the perfect pattern library

Naming Schema

Page 50: How to build the perfect pattern library

Descriptive vs. semantic names

Shiny Blue Button Shiny Blue Button???

Page 51: How to build the perfect pattern library

Use semantic names• Pattern names should always refer to function, not

visual appearance or context !

• Primary Button • Secondary Button • Headline • Copy • Navigation-List

Page 52: How to build the perfect pattern library

Naming variants

Button S

Button M

Button L

???T-shirt sizes might work for smaller projects. But with lots of variants you can’t add variants in between.

Page 53: How to build the perfect pattern library
Page 54: How to build the perfect pattern library

US city block numbering

House numbers increase by 100 every block regardless of the number of buildings. This is great for orientation but also very flexible for adding new houses between existing ones.

Page 55: How to build the perfect pattern library

City block sizes

button50

button100

button200

button150

Page 56: How to build the perfect pattern library

City block sizes• The standard variant of the pattern gets the „100“ • Smaller variants get „75“, „50“, „25“... • Larger variants get „200“, „300“… • Numbers don’t resemble exact size rations (i.e.

button200 is not necessary twice as large as button100) because that would be descriptive naming !

➡ Now you have a flexible naming system where it‘s easy to identify if a pattern is standard or larger or smaller

Page 57: How to build the perfect pattern library

City block sizes

slide200

slide100red100

red200

warmGrey100

warmGrey200

Page 58: How to build the perfect pattern library

So why use a pattern library?

Page 59: How to build the perfect pattern library

Patterns improve your UX• Provide a consistent and predictable UI • Let you prototype and iterate faster • Save you time to work on new problems or the details

of your product • „Dark corners“ of your product benefit from patterns

that have been tested elsewhere

Page 60: How to build the perfect pattern library

Patterns improve your code• Speed up implementation • Prevent code redundancies • Simplify QA • Simplify visual redesigns

Page 61: How to build the perfect pattern library

Patterns improve your team performance• Save everybody time • Create a shared understanding for UI elements • Prevent misunderstandings • Reduce complexity so you can tackle harder problems • Help you onboard new team members

Page 62: How to build the perfect pattern library

This sounds really cool, but...!

!

...don‘t patterns limit my creativity?

Page 63: How to build the perfect pattern library

You’re wrong!

Page 64: How to build the perfect pattern library

„The use of a pattern library helps designers quickly craft parts of a design so the bulk of their time is spent designing what‘s unique, rather than what‘s common.“

Lucas Pettinati UX Lead, Google Apps

Patterns support your creativity!

Page 65: How to build the perfect pattern library

Pattern libraries can do more

Page 66: How to build the perfect pattern library

Change the way you work

In a traditional process, the interaction designer creates a concept and prototypes hands them over to the visual designer who does the final design and briefs the developer.

Page 67: How to build the perfect pattern library

Change the way you work

With patterns the IxD is able to hand over the prototype directly to the developer who – after the coding is done – pairs up with the visual designer to fine tune the design directly on the website. There is no need to paint a picture of your website in photoshop anymore.

Page 68: How to build the perfect pattern library

Enable responsive design

Product

Top-Down

Botto

m-Up

Abstract

Concrete

Grid & Breakpoints

Content Reference Wireframes

Layout

Responsive Patterns: Bricks

Responisve Patterns: Components

Page 69: How to build the perfect pattern library

„We’re not designing pages anymore. We’re designing systems of components.“

Stephen Hay Design and development strategist

Page 70: How to build the perfect pattern library

Great examplesMailchimp Pattern Library ux.mailchimp.com/patterns

Lonely Planet Styleguide rizzo.lonelyplanet.com/styleguide

Page 71: How to build the perfect pattern library

If you want to build a pattern library• Start lean, stay lean • Designers involve your devs, developers involve your

designers • Use live code, as few images as possible • Use semantic and flexible pattern names • Find a balance of stability and change • Test, learn, adapt

Page 72: How to build the perfect pattern library

Thank you!tl;dr Pattern libraries are awesome!

Page 73: How to build the perfect pattern library

If you want to learn more… (in German)

Page 74: How to build the perfect pattern library

If you always wanted to...

• do design, testing or research for a billion-euro-revenue-ecommerce site and make millions of users happy

• work in a highly professional (and fun) team of 16 user experience, interaction design and visual design experts

• make use of our own testing-lab • live and work in Germany‘s most beautiful city ;o)

is searching for IxD and UX folks. Talk to us!

Page 75: How to build the perfect pattern library

Image reference• Slide 25: Matt Leacock

http://boxesandarrows.com/implementing-a-pattern-library-in-the-real-world-a-yahoo-case-study/

• Slide 53: Margaret Almon http://www.flickr.com/photos/nutmegdesigns