coding ui

72
Coding the UI: Lessons Learned from ebookers and Orbitz Mark Meeker Architect, UI Engineering Orbitz Worldwide AjaxWorld San Jose, California October 21, 2008

Upload: rajivmordani

Post on 13-May-2015

577 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Coding Ui

Coding the UI:Lessons Learned from ebookers and Orbitz

Mark MeekerArchitect, UI Engineering Orbitz Worldwide

AjaxWorld San Jose, CaliforniaOctober 21, 2008

Page 2: Coding Ui
Page 3: Coding Ui

Dozens of apps, hundreds of VMs, thousands of services.

UI

Page 4: Coding Ui

webapp(controller layer)

JSP(page templating)

JavaScript

JSP 2.0XHTML 1.0

CSS

CSS 2.1

Page 5: Coding Ui

“As far as the customer is concerned, the interface is

the product.”

- Jef Raskin

Page 6: Coding Ui

“Browsers are the most hostile software development

environments possible.”

- Douglas Crockford

Page 7: Coding Ui

1,971Revisions to 1 .css file since Oct. 2006

2.9 edits per day (if working weekends)

Page 8: Coding Ui

2007 - updates.orbitz.com

2008 - ebookers.com

2005 - CheapTickets.com

2006 - mobile.orbitz.com

2001 - Orbitz.com

2002 - OrbitzForBusiness.com

Page 9: Coding Ui
Page 10: Coding Ui

Single JSP files measuring in thousands of lines

Massive amounts of repeated markup

561 files with <html> tag

Minimal re-use

66 tables on one page

Experience

Page 11: Coding Ui

“Good judgement is the result of experience … Experience is the result of bad judgement.”

—Fred Brooks

Page 13: Coding Ui

Wishlist

Internationalization

Universality

Maintain High Quality Code

Promote Code Re-Use

Consistent Experience

http://flickr.com/photos/litandmore/2664900676/

Page 14: Coding Ui

Internationalizationhttp://www.flickr.com/photos/nickjacksonza/256651959/

Page 15: Coding Ui

6:50pm versus18:50

Page 16: Coding Ui

14/11/07versus

11/14/07

Page 17: Coding Ui

milesversus

kilometers

Page 18: Coding Ui

3,000+Labels, strings, paragraphs of text.

Page 19: Coding Ui

Travelervs.

Travellervs.

Passengers

Page 20: Coding Ui

1,500+Images

Page 21: Coding Ui

Images

Remove text as much as possible

Consider cultural differences in images choices

Page 22: Coding Ui

English

Page 23: Coding Ui

French

Page 24: Coding Ui

Japanese

Page 25: Coding Ui

Translation

Small words can expand 200-300%

Rule of thumb: 40%

Watch for wrapping issues (or lack thereof)

Consider during design comp stage

Page 26: Coding Ui

Universality

Page 27: Coding Ui
Page 28: Coding Ui

Follow Web Standards

Page 29: Coding Ui

Follow Web Standards

P.O.S.H.

plain old semantic HTML

Constant balancing act

Reduces display defects

Reset Styles

Validate CSS

Reminder that it is an evolving code base

Page 30: Coding Ui

IE6 Support

<!--[if IE 6]><style type="text/css" media="all"> @import url(/style/layout/layoutIE6Fix.css);</style><![endif]-->

Page 31: Coding Ui

Firefox 3, OSX

Page 32: Coding Ui

IE 5.2, OSX

Page 33: Coding Ui
Page 34: Coding Ui
Page 35: Coding Ui

Amazon Kindle

Page 36: Coding Ui

Progressive Enhancement

Content is KING!

Start with semantic markup

Get working functionality with HTML only

Enhance display with CSS

Enhance behavior with JavaScript

Page 37: Coding Ui

Separation of Layers

No in-line styles or in-line JavaScript

If it only works with JavaScript, create it with JavaScript

Page 38: Coding Ui

Graded Browser Support

http://developer.yahoo.com/yui/articles/gbs/

Varying levels of support

Isn’t required to be identical

Not all or nothing

Page 39: Coding Ui

Graded Browser Support

A-Grade

White-list (well-known, measurable market share)

Tested by QA Team

C-Grade

Blacklist (incapable browsers, call drivers)

X-Grade

Everyone else

Page 40: Coding Ui

Maintain High Qualityhttp://www.flickr.com/photos/harvypascua/46114061

Page 41: Coding Ui

High Quality

Validation

Build time tests (automated)

static code analysis

CSS validation

JSP compile

Constant developer vigilance

Sometimes constraints are good

Page 42: Coding Ui

Constraints

Custom tags for some HTML elements

anchors, images, form elements

Only allow subset of attributes

no: onclick, id

required: various content

Able to enforce all inputs have labels

Free CSS and JS support

Free shared functionality

Page 43: Coding Ui
Page 44: Coding Ui
Page 45: Coding Ui

Debug Tools

Logging

Runtime in-application debugging

Expose data to testers

Debug various types of modules

Content

Error message placement

Page 46: Coding Ui

File Structure

Developer first

Build for deploy later

move files around

combine them

reformat them

strip comments

Page 47: Coding Ui

CSS Files

Split between multiple files

Typography

Color

Layout

Modules

Nav

Each declaration on its own line

Page 48: Coding Ui

Promote Re-Use (DRY)http://flickr.com/photos/kingdesmond/477389196

Page 49: Coding Ui

Composite View

Separates “layout” of page from content

Allows to plug in different modules into page

Used in Apache Tiles

Leverage in-house framework

Try and gain as much re-use of JSP code

Page 50: Coding Ui

Layout

Header

Footer

Rail Body

Page 51: Coding Ui

Module

Page 52: Coding Ui
Page 53: Coding Ui

Page Definition

header.jsp --> Header

results.jsp --> Body

sortbar.jsp --> Rail

footer.jsp --> Footer

Page 54: Coding Ui

Page Composition

PageDef

B/EMagic

Browser

Page 55: Coding Ui
Page 56: Coding Ui

DRY

Avoid targeting IDs for CSS or JS

Custom attribute for JavaScript Data

Separation of Layers

Helper code for small “controls”

with the CSS to go with them

Take advantage of lazy developers

Page 57: Coding Ui

Consistent Experiencehttp://www.flickr.com/photos/kiad/491754035/

Page 58: Coding Ui

Consistent Experience

Make learning how to use the site easier for users.

Reduce the number of patterns.

Stick with the ones that work best.

Meet users expectations on...

messaging

error placements

interfaces

Page 59: Coding Ui
Page 60: Coding Ui
Page 61: Coding Ui
Page 62: Coding Ui
Page 63: Coding Ui

Consistent Experience

Review the site for common patterns

Introduce a Pattern Library

Build common “controls”

Page 64: Coding Ui

Follow the 80/20 Rule

Page 65: Coding Ui

“Simple things should be simple and

complex things should be possible.”

—Alan Kay

Page 66: Coding Ui

80/20 Rule

Make it easy to do the the common task for 80% of your users

Make it possible to do everything for the other 20% that need to

Page 67: Coding Ui
Page 68: Coding Ui

Hide/Reveal

Page 69: Coding Ui

Micro-content

Page 70: Coding Ui

80/20 Rule

Patterns:

Hide Reveal

Tabs Pattern

Pulling in content via Ajax

“Micro-content” bubbles

Page 71: Coding Ui

What’s Next?http://flickr.com/photos/reinvented/179863733/

Page 72: Coding Ui

Slides: http://markmeeker.com/events/ajaxworld2008

Email: [email protected]

Blog: http://markmeeker.com

Orbitz Jobs: http://www.orbitz.com/startmycareer

Questions?