simplify your workflow with styleguide driven development

111
Simplify your workflow with Styleguide Driven Development

Upload: jordan-lewis

Post on 17-Aug-2015

315 views

Category:

Internet


2 download

TRANSCRIPT

Page 1: Simplify your workflow with Styleguide Driven Development

Simplify your workflow with

Styleguide Driven Development

Page 2: Simplify your workflow with Styleguide Driven Development

‣ Revolutionised how we work

‣ Better understanding of our application

‣ Shipping faster and more frequently

‣ Become more consistent

‣ More adaptable

Page 3: Simplify your workflow with Styleguide Driven Development

‣ Business problem

‣ Problems with software delivery

‣ Solution

‣ Implementation

‣ Review

What we’ll cover

Page 4: Simplify your workflow with Styleguide Driven Development

Jordan Lewis @jordanlewiz

Page 5: Simplify your workflow with Styleguide Driven Development
Page 6: Simplify your workflow with Styleguide Driven Development

$250,000,000+

Community Earnings

Page 7: Simplify your workflow with Styleguide Driven Development
Page 8: Simplify your workflow with Styleguide Driven Development

26,000,000Monthly visits

Page 9: Simplify your workflow with Styleguide Driven Development

5 secondsItem sold every

Page 10: Simplify your workflow with Styleguide Driven Development

45+Developers

Page 11: Simplify your workflow with Styleguide Driven Development

15+Daily deploys

Page 12: Simplify your workflow with Styleguide Driven Development

BUSINESS PROBLEM

Improve the purchase flow

Page 13: Simplify your workflow with Styleguide Driven Development

Backend Frontend UX Product Designer

Meet the TeamBUSINESS PROBLEM

Page 14: Simplify your workflow with Styleguide Driven Development

New purchase flowBUSINESS PROBLEM

Page 15: Simplify your workflow with Styleguide Driven Development

Item pageBUSINESS PROBLEM

Page 16: Simplify your workflow with Styleguide Driven Development

Search resultsBUSINESS PROBLEM

Page 17: Simplify your workflow with Styleguide Driven Development

Cart pageBUSINESS PROBLEM

Page 18: Simplify your workflow with Styleguide Driven Development

Checkout pageBUSINESS PROBLEM

Page 19: Simplify your workflow with Styleguide Driven Development

User navBUSINESS PROBLEM

Page 20: Simplify your workflow with Styleguide Driven Development

ModalsBUSINESS PROBLEM

Page 21: Simplify your workflow with Styleguide Driven Development

Order confirmationBUSINESS PROBLEM

Page 22: Simplify your workflow with Styleguide Driven Development

PROBLEMS WITH

Software delivery

Page 23: Simplify your workflow with Styleguide Driven Development

PROBLEM #1:

Lack of shared vision

Page 24: Simplify your workflow with Styleguide Driven Development

Shared vision: toolsPROBLEMS

Page 25: Simplify your workflow with Styleguide Driven Development

Shared vision: no documentationPROBLEMS

Page 26: Simplify your workflow with Styleguide Driven Development

Shared vision: knowledge silosPROBLEMS

Page 27: Simplify your workflow with Styleguide Driven Development

PROBLEM #2:

Understanding UI behaviour

Page 28: Simplify your workflow with Styleguide Driven Development

PROBLEMS

UI Behaviour: first time visit

Page 29: Simplify your workflow with Styleguide Driven Development

UI Behaviour: empty statesPROBLEMS

Page 30: Simplify your workflow with Styleguide Driven Development

UI Behaviour: one-off pagesPROBLEMS

Page 31: Simplify your workflow with Styleguide Driven Development

UI Behaviour: modalsPROBLEMS

Page 32: Simplify your workflow with Styleguide Driven Development

UI Behaviour: content lengthPROBLEMS

Page 33: Simplify your workflow with Styleguide Driven Development

UI Behaviour: content lengthPROBLEMS

Page 34: Simplify your workflow with Styleguide Driven Development

UI Behaviour: error messagesPROBLEMS

Page 35: Simplify your workflow with Styleguide Driven Development

UI Behaviour: error pagesPROBLEMS

Page 36: Simplify your workflow with Styleguide Driven Development

UI Behaviour: edge casesPROBLEMS

Page 37: Simplify your workflow with Styleguide Driven Development

UI Behaviour: deleted contentPROBLEMS

Page 38: Simplify your workflow with Styleguide Driven Development

UI Behaviour: 3rd party outagesPROBLEMS

Page 39: Simplify your workflow with Styleguide Driven Development

UI Behaviour: localisationPROBLEMS

Page 40: Simplify your workflow with Styleguide Driven Development

UI Behaviour:

… you get it!

PROBLEMS

Page 41: Simplify your workflow with Styleguide Driven Development

UI Behaviour: manual testing

rinse and repeat

PROBLEMS

Page 42: Simplify your workflow with Styleguide Driven Development

UI Behaviour: manual testing

re-creating scenarios is laborious and time consuming

PROBLEMS

Page 43: Simplify your workflow with Styleguide Driven Development

UI Behaviour: cross-browser testingPROBLEMS

Page 44: Simplify your workflow with Styleguide Driven Development

UI Behaviour: responsivePROBLEMS

Page 45: Simplify your workflow with Styleguide Driven Development

PROBLEM #3:

Scope creep

Page 46: Simplify your workflow with Styleguide Driven Development

“We need to charge VAT to European buyers.”

― Product Lead

Scope creep: feature requestsPROBLEMS

Page 47: Simplify your workflow with Styleguide Driven Development

― Frontend Dev

“Shouldn’t we display something when...”

Scope creep: gaps in the uxPROBLEMS

Page 48: Simplify your workflow with Styleguide Driven Development

“When I do X, Y then Z, I get a weird error”

― QA Tester

Scope creep: edge casesPROBLEMS

Page 49: Simplify your workflow with Styleguide Driven Development

“Now that I see it, it doesn’t really work...”

― UX designer

Scope creep: interactionsPROBLEMS

Page 50: Simplify your workflow with Styleguide Driven Development

“We need to make it pop!”

― Designer

Scope creep: design changesPROBLEMS

Page 51: Simplify your workflow with Styleguide Driven Development

SOLUTION

Styleguide Driven Development

Page 52: Simplify your workflow with Styleguide Driven Development

Living Styleguides:

real code Styleguide Driven Development:

Is a practice that encourages the separation of

UX, Design & Frontend from Backend concerns.

This is achieved by developing the UI separately in a styleguide.

SOLUTION

Page 53: Simplify your workflow with Styleguide Driven Development

SOLUTION:

Styleguides

Page 54: Simplify your workflow with Styleguide Driven Development

Living Styleguides:

real code Styleguides:

‣ Single point of truth

‣ Documentation

‣ Maintain consistency

‣ Save time

SOLUTION

Page 55: Simplify your workflow with Styleguide Driven Development

Static: use sample markup

Living Styleguides:

real code Styleguides: static vs dynamic

Dynamic: use real components

SOLUTION

Page 56: Simplify your workflow with Styleguide Driven Development

Living Styleguides:

real code Styleguides: living styleguidesSOLUTION

Page 57: Simplify your workflow with Styleguide Driven Development

Any changes to a component in the Styleguide,

should result in changes to Production.

Living Styleguides:

real code Styleguides: living styleguidesSOLUTION

Page 58: Simplify your workflow with Styleguide Driven Development

SOLUTION:

UI Library

Page 59: Simplify your workflow with Styleguide Driven Development

UI Library: elementsSOLUTION

Page 60: Simplify your workflow with Styleguide Driven Development

UI Library: example

currency

typography

icon

box

select

buttons

SOLUTION

Page 61: Simplify your workflow with Styleguide Driven Development

SOLUTION:

Structure Styleguide

Page 62: Simplify your workflow with Styleguide Driven Development

Structure Styleguides:

A Structure Styleguide is designed to document an

application’s UI logic in all of its possible permutations.

SOLUTION

Page 63: Simplify your workflow with Styleguide Driven Development

structure scenarios

components

Living Styleguides:

real code Structure Styleguides: anatomySOLUTION

Page 64: Simplify your workflow with Styleguide Driven Development

Living Styleguides:

real code Structure Styleguides: componentsSOLUTION

Page 65: Simplify your workflow with Styleguide Driven Development

11 scenarios 16 scenarios

9 scenarios 6 scenarios

Living Styleguides:

real code Structure Styleguides: scenariosSOLUTION

Page 66: Simplify your workflow with Styleguide Driven Development

Living Styleguides:

real code Structure Styleguides: pagesSOLUTION

Page 67: Simplify your workflow with Styleguide Driven Development
Page 68: Simplify your workflow with Styleguide Driven Development

Living Styleguides:

real code Structure Styleguides: tooling

‣ Custom solution

‣ Built inside the application

‣ Deploying styleguide … deploys production

‣ Started basic … layered features

SOLUTION

Page 69: Simplify your workflow with Styleguide Driven Development

SOLUTION:

Templates (not views)

Page 70: Simplify your workflow with Styleguide Driven Development

Templates: the problems with ‘views’

Data Model View

V

SOLUTION

Page 71: Simplify your workflow with Styleguide Driven Development

Templates: view model

Data Model View Model Template

{} T

SOLUTION

Page 72: Simplify your workflow with Styleguide Driven Development

Templates:

Sample data

View Model Template

{}Data Model T

SOLUTION

Page 73: Simplify your workflow with Styleguide Driven Development

SOLUTION:

View Models

Page 74: Simplify your workflow with Styleguide Driven Development

View Model: exampleSOLUTION

Page 75: Simplify your workflow with Styleguide Driven Development

<% if @signed_in_user.present? %>

<%= @user.username %>

<%= @user.balance.format %>

<%= @cart.entries_count %>

<% if @cart.entries_count == 0 %>

...

<% end %>

<% end %>

Templates:

without view-model View Model: without (view)SOLUTION

Page 76: Simplify your workflow with Styleguide Driven Development

<% if data.user_signed_in? %>

<%= data.username %>

<%= data.balance %>

<%= data.shopping_cart_count %>

<% if data.shopping_cart_empty? %>

...

<% end %>

<% end %>

Templates:

without view-model View Model: with (template)SOLUTION

Page 77: Simplify your workflow with Styleguide Driven Development

{

:user_signed_in?

:username

:balance

:shopping_cart_count

:shopping_cart_empty?

}

=> …

=> …

=> …

=> …

=> …

Templates:

without view-model View Model: definedSOLUTION

Page 78: Simplify your workflow with Styleguide Driven Development

{

:user_signed_in?

:username

:balance

:shopping_cart_count

:shopping_cart_empty?

}

=> true,

=> jordan-lewis,

=> $314,

=> 3,

=> false

Templates:

view-model (application)Templates:

without view-model View Model: styleguide implementationSOLUTION

Page 79: Simplify your workflow with Styleguide Driven Development

{

:user_signed_in?

:username

:balance

:shopping_cart_count

:shopping_cart_empty?

}

Templates:

view-model (application)

=> @signed_in_user.present?,

=> @user.username,

=> @user.balance.format,

=> @cart.entries_count,

=> @cart.entries_count == 0

Templates:

without view-model View Model: backend implementationSOLUTION

Page 80: Simplify your workflow with Styleguide Driven Development

IMPLEMENTATION

Styleguide Driven Development

Page 81: Simplify your workflow with Styleguide Driven Development

1. Define components & scenarios

2. Build - UI directly in styleguide - backend

3. Assemble the page/feature

Templates:

view-model (application)Templates:

without view-model SDD: the processIMPLEMENTATION

Page 82: Simplify your workflow with Styleguide Driven Development

STEP 1:

Define Components & Scenarios

Page 83: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Define: what your buildingIMPLEMENTATION

Page 84: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Define: components and scenariosIMPLEMENTATION

Page 85: Simplify your workflow with Styleguide Driven Development

Payment method

1. PayPal

2. PayPal error

3. Credit

4. Add credit + checkout

Billing details

1. non-eu not-provided

2. non-eu provided

3. eu provided

4. eu provided with VAT

5. provided with errors

Templates:

view-model (application)Templates:

without view-model Define: components and scenarios

Order Summary

1. with tax

2. no tax

3. handling fee

4. single item

5. multiple item

IMPLEMENTATION

Page 86: Simplify your workflow with Styleguide Driven Development

STEP 2:

Build UI and Backend

Page 87: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build: separation of concerns

Frontend isn’t waiting on backend

Backend isn’t waiting on frontend

IMPLEMENTATION

Page 88: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 89: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 90: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 91: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 92: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 93: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 94: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 95: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 96: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 97: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 98: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build UI: scenariosIMPLEMENTATION

Billing details

1. Provided

2. Provided Just Saved

3. Provided European With VAT Number

4. Provided European No VAT Number

5. Area51 Outage

6. Area51 Outage European With VAT Number

7. Form Empty

8. Form Country With Predefined Regions

9. Form European

10. Form With Errors

11. Form With VAT Errors

Page 99: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Build backend: hook up the view modelIMPLEMENTATION

{

:user_signed_in?

:username

:balance

:shopping_cart_count

:shopping_cart_empty?

}

=> @signed_in_user.present?,

=> @user.username,

=> @user.balance.format,

=> @cart.entries_count,

=> @cart.entries_count == 0

Page 100: Simplify your workflow with Styleguide Driven Development

STEP 3:

Assemble page or feature

Page 101: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Assemble: components to build a pageIMPLEMENTATION

Page 102: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Assemble: finished productIMPLEMENTATION

Page 103: Simplify your workflow with Styleguide Driven Development

REVIEW

The benefits of Styleguide Driven Development

Page 104: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Benefits: Separate UI and backendREVIEW

Page 105: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Benefits: Iterate quicklyREVIEW

Page 106: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Benefits: Identify any gapsREVIEW

Page 107: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Benefits: Ship faster & more frequentlyREVIEW

Page 108: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model Benefits: Free documentationREVIEW

Page 109: Simplify your workflow with Styleguide Driven Development

market.styleguide.envato.com

Page 110: Simplify your workflow with Styleguide Driven Development

Templates:

view-model (application)Templates:

without view-model What’s next?REVIEW

‣ extract reusable parts

‣ open source

‣ release UI library

‣ add more content

‣ visual regression testing

Page 111: Simplify your workflow with Styleguide Driven Development

@jordanlewiz / [email protected]

http://enva.to/sdd

Thank you!