129
MODULE DESIGN & UI DEV PATTERNS code from the inside out

Module design & UI Dev patterns

Embed Size (px)

DESCRIPTION

code your UI from the inside out

Citation preview

Page 1: Module design & UI Dev patterns

MODULE DESIGN & UI DEV PATTERNS

code from the inside out

Page 2: Module design & UI Dev patterns

OR...

Page 3: Module design & UI Dev patterns

THE FAILURE OF THE COMPpictures are for photoshop

Page 4: Module design & UI Dev patterns

DESIGNERS & STAKEHOLDERSwe’ve all had this conversation

Page 5: Module design & UI Dev patterns

We need a comp!

Page 6: Module design & UI Dev patterns

DESIGNERS SEEcolors, type, icons, images, spacing, borders, gradients, etc ...

Page 7: Module design & UI Dev patterns
Page 8: Module design & UI Dev patterns
Page 9: Module design & UI Dev patterns

DEVELOPERS SEEahhh ...

Page 10: Module design & UI Dev patterns

Where do I

begin?

Page 11: Module design & UI Dev patterns

Can’t you

just export

HTML?

Page 12: Module design & UI Dev patterns

That

Never

Works!

Page 13: Module design & UI Dev patterns

OHHH, YOU NEED SPECS?sure, I have a red-line for that

Page 14: Module design & UI Dev patterns
Page 15: Module design & UI Dev patterns
Page 16: Module design & UI Dev patterns

UI DEVELOPERS ...our context is all wrong

Page 17: Module design & UI Dev patterns

Start from the upper left, right?<div id=”home-page”> that works.

Page 18: Module design & UI Dev patterns

Start from the upper left, right?<div id=”home-page”> that works.

Styles are written based on placement

in the view

CSS too specific. Very fragile with placement

Presentation classes in the

markup

Poor code reuse, if any at all. To much ‘copy pasta’

A major case of the div’itus

Using IDs for styling to over-ride the cascade

Page 19: Module design & UI Dev patterns

BETWEEN DESIGNERS & DEVS THE COMP IS

THE ONLY CONSTANTwhat could possibly go wrong?

Page 20: Module design & UI Dev patterns

PICTURE WORTH 1000 WORDS

a comp is worth 10,000 development variations

Page 21: Module design & UI Dev patterns

ONE OF THESE THINGS ...are not like the other!

You: but we aren’t developing the whole comp? we are breaking the design into modules and giving the work to developers.

me:without elemental and modular standards, what happens when the ‘comp’ is the only uniform source of record between 2 individual devs?

Page 22: Module design & UI Dev patterns

<div id="promoBandLeft" class="twoColumnContent leftContainer" style="height: 176px; ">! <div id="FreeImageOfTheWeekPromo">! ! <h5 class="text-important freeImageTitle">Free image of the week</h5>! ! <div id="FreeImageContainer">! ! ! <table width="120" cellpadding="0" cellspacing="0">! ! ! ! <tbody>! ! ! ! ! <tr>! ! ! ! ! ! <td>! ! ! ! ! ! ! <a id="ImageLink" class="freeImage" href="/freeimageoftheweek">! ! ! ! ! ! ! ! <img src="|STK|60|764&amp;s=1" alt="portrait of a young woman smiling">! ! ! ! ! ! ! </a>! ! ! ! ! ! </td>! ! ! ! ! </tr>! ! ! ! </tbody>! ! ! </table>! ! </div>! ! <div id="FreeImageDetails">! ! ! <h6>Come back each week and stay inspired.</h6>! ! ! <p>Stockbyte</p>! ! ! <p>portrait of a young woman smiling</p>! ! ! <a class="freeImage" href="/freeimageoftheweek" id="ImageIdLink">View image</a>! ! ! <a class="button-secondary-medium freeImage" href="/FreeImage?returnUrl=%2Ffreeimageoftheweek" id="GetFreeImageButton">Get free image</a>! ! </div>! </div></div>

widget #1 by developer A

Page 23: Module design & UI Dev patterns

<div id="promoBandLeft" class="twoColumnContent leftContainer" style="height: 176px; ">! <div id="FreeImageOfTheWeekPromo">! ! <h5 class="text-important freeImageTitle">Free image of the week</h5>! ! <div id="FreeImageContainer">! ! ! <table width="120" cellpadding="0" cellspacing="0">! ! ! ! <tbody>! ! ! ! ! <tr>! ! ! ! ! ! <td>! ! ! ! ! ! ! <a id="ImageLink" class="freeImage" href="/freeimageoftheweek">! ! ! ! ! ! ! ! <img src="|STK|60|764&amp;s=1" alt="portrait of a young woman smiling">! ! ! ! ! ! ! </a>! ! ! ! ! ! </td>! ! ! ! ! </tr>! ! ! ! </tbody>! ! ! </table>! ! </div>! ! <div id="FreeImageDetails">! ! ! <h6>Come back each week and stay inspired.</h6>! ! ! <p>Stockbyte</p>! ! ! <p>portrait of a young woman smiling</p>! ! ! <a class="freeImage" href="/freeimageoftheweek" id="ImageIdLink">View image</a>! ! ! <a class="button-secondary-medium freeImage" href="/FreeImage?returnUrl=%2Ffreeimageoftheweek" id="GetFreeImageButton">Get free image</a>! ! </div>! </div></div>

widget #1 by developer A

Page 24: Module design & UI Dev patterns

<div id="promoBandLeft" class="twoColumnContent leftContainer" style="height: 176px; ">! <div id="FreeImageOfTheWeekPromo">! ! <h5 class="text-important freeImageTitle">Free image of the week</h5>! ! <div id="FreeImageContainer">! ! ! <table width="120" cellpadding="0" cellspacing="0">! ! ! ! <tbody>! ! ! ! ! <tr>! ! ! ! ! ! <td>! ! ! ! ! ! ! <a id="ImageLink" class="freeImage" href="/freeimageoftheweek">! ! ! ! ! ! ! ! <img src="|STK|60|764&amp;s=1" alt="portrait of a young woman smiling">! ! ! ! ! ! ! </a>! ! ! ! ! ! </td>! ! ! ! ! </tr>! ! ! ! </tbody>! ! ! </table>! ! </div>! ! <div id="FreeImageDetails">! ! ! <h6>Come back each week and stay inspired.</h6>! ! ! <p>Stockbyte</p>! ! ! <p>portrait of a young woman smiling</p>! ! ! <a class="freeImage" href="/freeimageoftheweek" id="ImageIdLink">View image</a>! ! ! <a class="button-secondary-medium freeImage" href="/FreeImage?returnUrl=%2Ffreeimageoftheweek" id="GetFreeImageButton">Get free image</a>! ! </div>! </div></div>

widget #1 by developer A

Cause I need two

classes and an ID to make a

header!

Page 25: Module design & UI Dev patterns

<div id="promoBandLeft" class="twoColumnContent leftContainer" style="height: 176px; ">! <div id="FreeImageOfTheWeekPromo">! ! <h5 class="text-important freeImageTitle">Free image of the week</h5>! ! <div id="FreeImageContainer">! ! ! <table width="120" cellpadding="0" cellspacing="0">! ! ! ! <tbody>! ! ! ! ! <tr>! ! ! ! ! ! <td>! ! ! ! ! ! ! <a id="ImageLink" class="freeImage" href="/freeimageoftheweek">! ! ! ! ! ! ! ! <img src="|STK|60|764&amp;s=1" alt="portrait of a young woman smiling">! ! ! ! ! ! ! </a>! ! ! ! ! ! </td>! ! ! ! ! </tr>! ! ! ! </tbody>! ! ! </table>! ! </div>! ! <div id="FreeImageDetails">! ! ! <h6>Come back each week and stay inspired.</h6>! ! ! <p>Stockbyte</p>! ! ! <p>portrait of a young woman smiling</p>! ! ! <a class="freeImage" href="/freeimageoftheweek" id="ImageIdLink">View image</a>! ! ! <a class="button-secondary-medium freeImage" href="/FreeImage?returnUrl=%2Ffreeimageoftheweek" id="GetFreeImageButton">Get free image</a>! ! </div>! </div></div>

widget #1 by developer A

Cause I need two

classes and an ID to make a

header!

HTML tags ... no one uses

those.

Page 26: Module design & UI Dev patterns

<div id="promoBandLeft" class="twoColumnContent leftContainer" style="height: 176px; ">! <div id="FreeImageOfTheWeekPromo">! ! <h5 class="text-important freeImageTitle">Free image of the week</h5>! ! <div id="FreeImageContainer">! ! ! <table width="120" cellpadding="0" cellspacing="0">! ! ! ! <tbody>! ! ! ! ! <tr>! ! ! ! ! ! <td>! ! ! ! ! ! ! <a id="ImageLink" class="freeImage" href="/freeimageoftheweek">! ! ! ! ! ! ! ! <img src="|STK|60|764&amp;s=1" alt="portrait of a young woman smiling">! ! ! ! ! ! ! </a>! ! ! ! ! ! </td>! ! ! ! ! </tr>! ! ! ! </tbody>! ! ! </table>! ! </div>! ! <div id="FreeImageDetails">! ! ! <h6>Come back each week and stay inspired.</h6>! ! ! <p>Stockbyte</p>! ! ! <p>portrait of a young woman smiling</p>! ! ! <a class="freeImage" href="/freeimageoftheweek" id="ImageIdLink">View image</a>! ! ! <a class="button-secondary-medium freeImage" href="/FreeImage?returnUrl=%2Ffreeimageoftheweek" id="GetFreeImageButton">Get free image</a>! ! </div>! </div></div>

widget #1 by developer A

Cause I need two

classes and an ID to make a

header!

HTML tags ... no one uses

those.

Is that a table? Oh no you didn’t!

Page 27: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer B

Page 28: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer BAhhh ...

this is the same

Page 29: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer BAhhh ...

this is the same

This is NOT!

Page 30: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer B

Page 31: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer B

IDs in two separate

stylesheets, that’s better?

Page 32: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer B

IDs in two separate

stylesheets, that’s better?

Let’s define a color at the <body>

tag, that’s good.

Page 33: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer B

IDs in two separate

stylesheets, that’s better?

Let’s define a color at the <body>

tag, that’s good.

But wait ... we

are overriding by changing a whole widget

block?

Page 34: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer B

IDs in two separate

stylesheets, that’s better?

Let’s define a color at the <body>

tag, that’s good.

But wait ... we

are overriding by changing a whole widget

block?

Yup ... let’s reapply that color again.

USE THE POWER OF THE ID!

Page 35: Module design & UI Dev patterns

<div id="promoBandRight" class="twoColumnContent rightContainer" style="height: 176px; ">! <div id="TrialOfferPromo">! ! <div id="PromoHeading">! ! ! Special offer! ! </div>! ! <div>! ! ! <div id="LeftContainer">! ! ! ! <div id="PromoImageContainer">! ! ! ! ! <img src="/images/promo/en_badge.gif" alt="10% off">! ! ! ! </div>! ! ! </div>! ! ! <div id="RightContainer">! ! ! ! <p id="PromoDescription">! ! ! ! ! Purchase a new 1-Month Subscription by June 30, 2011 and save 10%. Use promo code <span class="important">ZP3PC46N</span> during checkout to enjoy your savings today.! ! ! ! </p>! ! ! ! <a href="/promo2/usa" class="promoLink"> Get the details</a>! ! ! </div>! ! </div>! </div></div>

widget #2 by developer B

IDs in two separate

stylesheets, that’s better?

Let’s define a color at the <body>

tag, that’s good.

But wait ... we

are overriding by changing a whole widget

block?

Yup ... let’s reapply that color again.

USE THE POWER OF THE ID!

Page 36: Module design & UI Dev patterns

CAN WE DO IT BETTER?

Page 37: Module design & UI Dev patterns

CAN WE DO IT BETTER?

Page 38: Module design & UI Dev patterns

THE BEST PART IS ...you already know how to do this

Page 39: Module design & UI Dev patterns

TAKE A STEP BACK AND THINKthe ‘page’ is a deprecated concept

Page 40: Module design & UI Dev patterns

FIGHT THE SMALL BATTLESthe element and the module

Page 41: Module design & UI Dev patterns

What are elements?

Visual elements are the basic building blocks of the UI.

Well engineered individual elements reduces duplication

and increases consistency.

Page 42: Module design & UI Dev patterns

What are elements?

Buttons

Page 43: Module design & UI Dev patterns

What are elements?

Buttons

Typography

Page 44: Module design & UI Dev patterns

What are elements?

Buttons

Typography

Color pallet

Page 45: Module design & UI Dev patterns

What are elements?

Buttons

Typography

Color pallet

standard icons

Page 46: Module design & UI Dev patterns

What are elements?

Buttons

Typography

Color pallet

standard icons

borders and line widths

Page 47: Module design & UI Dev patterns

What are modules?

Using the engineered visual elements, construct modules.

Caveat ... modules can also be assembled of other smaller modules and UI patterns

(mind blown)

Page 48: Module design & UI Dev patterns

What are modules?

Header module

Page 49: Module design & UI Dev patterns

What are modules?

Header module

Nav module

Page 50: Module design & UI Dev patterns

What are modules?

Header module

Nav module

Hero copy module

Page 51: Module design & UI Dev patterns

What are modules?

Header module

Hero module

Nav module

Hero copy module

Page 52: Module design & UI Dev patterns

What are modules?

Header module

Hero module

Nav module

Hero copy moduleArticle module

Page 53: Module design & UI Dev patterns

What are modules?

Header module

Hero module

Nav module

Hero copy moduleArticle module

List module

Page 54: Module design & UI Dev patterns

OOSCSSpicking up where CSS left off

& where OOCSS can never go

Page 55: Module design & UI Dev patterns

These are books on Object Oriented Programming.

CSS is not on one of them!

Page 56: Module design & UI Dev patterns

GREAT CONCEPTbad name

• Identify reusable objects

• Be semantic w/HTML

• Minimize selectors

• Extend your classes

• ‘Style’ separate from content

• ‘Content’ separate from container

This is GREAT

stuff

Page 57: Module design & UI Dev patterns

OBJECT ORIENTATED CSS... shortcomings

• CSS Selectors are not objects

• Relies heavily on ‘presentation classes’

• Requires maintenance of DOM elements for design updates

• Promotes extending in the DOM, not the CSS

• Uses vanilla CSS

Page 58: Module design & UI Dev patterns

THE OOCSS PROCESSthe classing of the DOM

OOCSS, in short, is a process of defining standardized presentational selectors which are in turn applied to the DOM.

Extensions of such selectors are then extended in the DOM for added effect.

It is likely that you will see examples like what you see here.

<button class="btn btn-primary btn-large">! <i class="icon-white icon-envelope"></i> ! Button Generator</button>

Page 59: Module design & UI Dev patterns

THE OOCSS PROCESSthe classing of the DOM

OOCSS, in short, is a process of defining standardized presentational selectors which are in turn applied to the DOM.

Extensions of such selectors are then extended in the DOM for added effect.

It is likely that you will see examples like what you see here.

<button class="btn btn-primary btn-large">! <i class="icon-white icon-envelope"></i> ! Button Generator</button>

What’s with using the <i> tag for ‘icon’

now?

Page 60: Module design & UI Dev patterns

OOCSS FRAMEWORKSattempts to automate OOCSS

CSS frameworks have been using OOCSS methods since inception.

Where these fail is the insane amount of CSS selectors that by default are added to the site’s CSS.

From grid systems to UI elements, CSS bloat is a real issue. Ironically this bloat is what OOCSS is supposed to address.

Page 61: Module design & UI Dev patterns

OOCSS FRAMEWORKSattempts to automate OOCSS

CSS frameworks have been using OOCSS methods since inception.

Where these fail is the insane amount of CSS selectors that by default are added to the site’s CSS.

From grid systems to UI elements, CSS bloat is a real issue. Ironically this bloat is what OOCSS is supposed to address.

Twitter’s bootstrap default

includes 4914 lines of CSS.

Page 62: Module design & UI Dev patterns

OOCSS FRAMEWORKSattempts to automate OOCSS

CSS frameworks have been using OOCSS methods since inception.

Where these fail is the insane amount of CSS selectors that by default are added to the site’s CSS.

From grid systems to UI elements, CSS bloat is a real issue. Ironically this bloat is what OOCSS is supposed to address.

Twitter’s bootstrap default

includes 4914 lines of CSS.

Page 63: Module design & UI Dev patterns

THE CSS DREAMredesign without DOM editing

Imagine a world where new design requirements are only addressed by updating CSS? Functional modules and view templates are not edited.

I don’t feel OOCSS will get us there, but OOSCSS will.

Page 64: Module design & UI Dev patterns

OBJECT ORIENTATED SCSSthe future of silent selectors

What if we lived in a world where the ‘object’ selectors from OOCSS can be created, but never manifest themselves as CSS until they are used in semantic application?

What if we could seamlessly extend selectors in our CSS and not have to touch the DOM?

What if ....

Page 65: Module design & UI Dev patterns

SASS 3.2re-writing what we can do with CSS

Extending elements in vanilla CSS is hard to track. Between nested selectors and the sheer volume alone make this an arduous task.

Sass gives us clarity. The ability to really define objects in our SCSS and apply them to semantic selectors within our CSS.

The dream realized.

// silent classes%kung { background: green; color: yellow;}

%foo { background: orange; color: red; font-size: 12px;}

// selectors extending silent classes.foo_one { @extend %foo;}

.foo_two { @extend %foo;}

// output CSS.foo_one, .foo_two { background: orange; color: red; font-size: 12px;}

Page 66: Module design & UI Dev patterns

OOSCSSa real object oriented solution

Page 67: Module design & UI Dev patterns

ELEMENTS, MODULES AND PATTERNS OH MY!

how do you manage all of this?

Page 68: Module design & UI Dev patterns

THE PATTERN LIBRARYliving visual document

Page 69: Module design & UI Dev patterns

ELEMENTS AND SIMPLE UI PATTERNS

text, colors and buttons for example

Page 70: Module design & UI Dev patterns
Page 71: Module design & UI Dev patterns
Page 72: Module design & UI Dev patterns
Page 73: Module design & UI Dev patterns

ASSEMBLE THE MODULEa view is an assembly of elements and patterns

Page 74: Module design & UI Dev patterns
Page 75: Module design & UI Dev patterns
Page 76: Module design & UI Dev patterns

That looks like a module

Page 77: Module design & UI Dev patterns

Cool. Developed the module in an abstract

environment.

Page 78: Module design & UI Dev patterns

Cool. Developed the module in an abstract

environment.

Now we can use this anywhere. All UX/UI cleanly encapsulated.

Page 79: Module design & UI Dev patterns

Cool. Developed the module in an abstract

environment.

Now we can use this anywhere. All UX/UI cleanly encapsulated.

When developing, no elements were created. Typography and color

are all inherited.

Page 80: Module design & UI Dev patterns

Cool. Developed the module in an abstract

environment.

Now we can use this anywhere. All UX/UI cleanly encapsulated.

Follow the example HTML and you are

rockin!

When developing, no elements were created. Typography and color

are all inherited.

Page 81: Module design & UI Dev patterns

Reference SCSS

Page 82: Module design & UI Dev patterns

Reference SCSS

Use examples

Page 83: Module design & UI Dev patterns

LET’S TAKE A LOOK AT ANOTHER

maybe a feature block?

Page 84: Module design & UI Dev patterns

Oh yeah, looks like another great module

Page 85: Module design & UI Dev patterns

Module in the abstract again!

Page 86: Module design & UI Dev patterns

You can even build variations on

a module

Page 87: Module design & UI Dev patterns

Example module HTML

Page 88: Module design & UI Dev patterns

Example module HTML

Reference SCSS

Page 89: Module design & UI Dev patterns

WHAT ABOUT COMPLEX MODULES?

let’s turn this up to 11 - enter UI patterns

Page 90: Module design & UI Dev patterns

Alert element

Page 91: Module design & UI Dev patterns

Alert element

Subject header element

Page 92: Module design & UI Dev patterns

Alert element

Subject header element

Widget header element

Page 93: Module design & UI Dev patterns

Alert element

Subject header element

Widget header element

Form select UI Pattern

Page 94: Module design & UI Dev patterns

Alert element

Subject header element

Widget header element

Form select UI PatternForm text

entry UI Pattern

Page 95: Module design & UI Dev patterns

Button element

Page 96: Module design & UI Dev patterns

Button element

Radio button, label and text UI pattern

Page 97: Module design & UI Dev patterns

Button element

Radio button, label and text UI pattern

Checkbox and label elements

Page 98: Module design & UI Dev patterns

Button element

Radio button, label and text UI pattern

Checkbox and label elements

Scroll box UI pattern

Page 99: Module design & UI Dev patterns

Button element

Radio button, label and text UI pattern

Checkbox and label elements

Scroll box UI pattern

Calendar data UI pattern

Page 100: Module design & UI Dev patterns

Button element

Radio button, label and text UI pattern

Checkbox and label elements

Scroll box UI pattern

Calendar data UI pattern

Button element

Page 101: Module design & UI Dev patterns

Code examples!

Page 102: Module design & UI Dev patterns

OMG! This is an error example!

Page 103: Module design & UI Dev patterns

OMG! This is an error example!

Reuse of elements and patterns with added effect

Page 104: Module design & UI Dev patterns

Wow, the markup is the

same?

Page 105: Module design & UI Dev patterns

Wow, the markup is the

same?

Just add some ‘fail’ to the blocks

and you are AWESOME!

Page 106: Module design & UI Dev patterns

WHAT ABOUT THE CODE?how do you build a styleguide?

Page 107: Module design & UI Dev patterns

INTRODUCING TOADSTOOLa modern styleguide framework

(alpha release)

Page 108: Module design & UI Dev patterns

The Sass structure

Page 109: Module design & UI Dev patterns

Complex UI groupings

The Sass structure

Page 110: Module design & UI Dev patterns

UI Elements and core concepts

Complex UI groupings

The Sass structure

Page 111: Module design & UI Dev patterns

The makeup of a Sass module

Page 112: Module design & UI Dev patterns

The view structure

Page 113: Module design & UI Dev patterns

Complex UI groupings

The view structure

Page 114: Module design & UI Dev patterns

UI Elements and core concepts

Complex UI groupings

The view structure

Page 115: Module design & UI Dev patterns

The makeup of a markup module

Page 116: Module design & UI Dev patterns

ELEMENTS, PATTERNS AND MODULESa recipe for success

Page 117: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Page 118: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

Page 119: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

As devs, we need to change our contextual

starting point.

Page 120: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

As devs, we need to change our contextual

starting point.Without common standards; duplicated effort, wild deviations in code and

inconsistencies run ramped.

Page 121: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

As devs, we need to change our contextual

starting point.Without common standards; duplicated effort, wild deviations in code and

inconsistencies run ramped.

We can do it better!

Page 122: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

As devs, we need to change our contextual

starting point.Without common standards; duplicated effort, wild deviations in code and

inconsistencies run ramped.

We can do it better!

Embracing elements, patterns and modules

makes our UI code manageable, maintainable

and sustainable.

Page 123: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

As devs, we need to change our contextual

starting point.Without common standards; duplicated effort, wild deviations in code and

inconsistencies run ramped.

We can do it better!

Embracing elements, patterns and modules

makes our UI code manageable, maintainable

and sustainable.

Vanilla CSS frameworks

will cause you much pain

Page 124: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

As devs, we need to change our contextual

starting point.Without common standards; duplicated effort, wild deviations in code and

inconsistencies run ramped.

We can do it better!

Embracing elements, patterns and modules

makes our UI code manageable, maintainable

and sustainable.

Vanilla CSS frameworks

will cause you much pain

Sass is re-writing the future of

CSS.

Page 125: Module design & UI Dev patterns

SUMMARYwhat have we learned?

Comps are a failed communication resource

between designers and devs

As devs, we need to change our contextual

starting point.Without common standards; duplicated effort, wild deviations in code and

inconsistencies run ramped.

We can do it better!

Embracing elements, patterns and modules

makes our UI code manageable, maintainable

and sustainable.

Vanilla CSS frameworks

will cause you much pain

Sass is re-writing the future of

CSS.

OOCSS is ok, but OOSCSS is amazing!

Page 126: Module design & UI Dev patterns

QUESTIONS?you, in the front ...

Page 127: Module design & UI Dev patterns

http://speakerrate.com/speakers/15438

You don’t win anything, but

it helps me to get better at this ;)

Page 129: Module design & UI Dev patterns