building uis

33
Building UIs

Upload: alexander-haniotis

Post on 12-Feb-2017

203 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Building UIs

Building UIs

Page 2: Building UIs

Building fast, maintainable and scalable user interfaces on the web

Page 3: Building UIs

HTML

HTML gives content structure and meaning (headings, paragraphs, images, etc.)

Page 4: Building UIs

CSS

CSS defines the presentation (typography, colors, layout, etc.)

Page 5: Building UIs

<h1 class=“title”>I’m a title</h1>

<div class=“box”>I’m a box</div>

<img src=“image.jpg”>

Page 6: Building UIs

.title { font-size: 32px; color: black;}

.box { border-radius: 5px;}

img { border: 1px solid red;}

Page 7: Building UIs

www.affirm.com

Page 8: Building UIs

Building fast, maintainable and scalable user interfaces on the web

Page 9: Building UIs

1. Modules

Break down the user interface into isolated, reusable modules (buttons, tooltips, etc.)

Page 10: Building UIs

basefontslayoutmodulesutilities

badge.scssbuttons.scsscard.scsscontrol.scssdate-picker.scssfab.scssforms.scssicons.scssmodal.scsspopover.scssprogress.scsstooltip.scss

imagesscriptsstyles

Page 11: Building UIs

2. Naming

Specific, functional and consistent class names are a must for scalable UIs

Page 12: Building UIs

Pick explicit and clear class names, butdon’t be overly specific

<header class=“site-header”></header><div class=“table-view”></div><div class=“bank-card”></div>

Specific

Page 13: Building UIs

Choose class names that describe an element’s functionality, not its presentation

Functional

Page 14: Building UIs

<button class=“btn-green”>…</button>

Don’t do this

Page 15: Building UIs

<button class=“btn-primary”>…</button>

.btn-primary { background-color: green;}

Do this instead

Page 16: Building UIs

Adopt a single naming convention and stick to it

Consistent

Page 17: Building UIs

<header class=“site-header”></header><main class=“siteContent”></main><footer class=“site_footer”></footer>

Don’t do this

Page 18: Building UIs

<header class=“site-header”></header><main class=“site-content”></main><footer class=“site-footer”></footer>

Do this instead

Page 19: Building UIs

MAKE PAYMENT

Upcoming Payment Due on May 10, 2015

$238.71/mo

Touch of Modern

Page 20: Building UIs

header

content

footer

Page 21: Building UIs

<div class=“card”> <header class=“header”></header> <main class=“content”></main> <footer class=“footer”></footer></div>

Don’t do this

Page 22: Building UIs

<div class=“card”> <header class=“card__header”></header> <main class=“card__content”></main> <footer class=“card__footer”></footer></div>

Do this instead

Page 23: Building UIs

<div class=“card card--loan”> <header class=“card__header”> <img class=“card__avatar” src=“avatar.jpg”> <h3 class=“card__title”>Touch of Modern</h3> <div class=“card__actions”> <span class=“icon”>…</span> </div> </header> <main class=“card__content”> <div class=“progress-bar”> <div class=“progress-bar__fill”></div> </div> </main> <footer class=“card__footer”> <a href=“#” class=“card__footer__link”>Link</a> </footer></div>

Page 24: Building UIs

3. Performance

Perceived performance is more important than actual performance

Page 25: Building UIs

SVG

Vector graphics that scale infinitely, without losing clarity

Page 26: Building UIs

1.5kb 0.8kb

Page 27: Building UIs

FastClick

Eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers

Page 28: Building UIs

Normal behavior w/ FastClick

Page 29: Building UIs

Why invest resources into this?

Page 30: Building UIs

Speed

Developing new features and products will be much faster

Page 31: Building UIs

Consistency

Ensure that future products remain consistent (design, naming conventions, patterns, etc.)

Page 32: Building UIs

Scalability

Establish a solid foundation for designing and developing new products

Page 33: Building UIs

Questions?