1 / 70

The Yahoo! User Interface Library (YUI)

The Yahoo! User Interface Library (YUI). Nate Koechley nate@koechley.com http://nate.koechley.com/blog. Refresh 06 Orlando, Florida 2006.11.17. YUI. http://www.flickr.com/photos/cdm/50688378/in/set-1002108/. The Yahoo! Developer Network. Utility and Data Web Services

Download Presentation

The Yahoo! User Interface Library (YUI)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Yahoo! User Interface Library (YUI) Nate Koechley nate@koechley.com http://nate.koechley.com/blog Refresh 06 Orlando, Florida 2006.11.17

  2. YUI http://www.flickr.com/photos/cdm/50688378/in/set-1002108/

  3. The Yahoo! Developer Network • Utility and Data Web Services • Design Patterns Library • Browser Support Guidelines • Yahoo! User Interface Library (YUI)

  4. The Yahoo! Developer Network Ecosystem:Utility and Data Web Services Services Browser Based Authenticatio (BBAuth), Answers, Local, Maps, Photos, Search, Shopping, Travel, Utilities, (Mail coming soon) Hackable Sites del.icio.us, Flickr, Upcoming.org, Webjay Burnable Feeds Finance, HotJobs, RSS Feeds, Traffic, Weather SDKs Messenger, Music, Search Developer Kit, Widgets Developer Centers JavaScript, Flash, .NET, PHP, Python, Ruby

  5. The Yahoo! Developer Network Ecosystem:Design Patterns

  6. The Yahoo! Developer Network Ecosystem:Design Patterns

  7. The Yahoo! Developer Network Ecosystem:Design Patterns

  8. The Yahoo! Developer Network Ecosystem:Browser Support Guidelines

  9. The Yahoo! Developer Network Ecosystem:Browser Support Guidelines

  10. Why?

  11. changing seasons on the web http://flickr.com/photos/getthebubbles/107463768/

  12. People expect lessonline.

  13. But we areonline…

  14. … and tied to the browser.

  15. So we mustlevelthe playing field. http://www.flickr.com/photos/probek/44480413/

  16. how?

  17. it takes 2 things http://flickr.com/photos/latitudes/104286031/

  18. We mustimprove our technology

  19. (X)HTML Safari Firefox Opera IE5, 6, 7 Firefox Opera 10,000+ UAs Macintosh Windows Linux, Unix, Mobile data: custom, xml, json behavior: js mixed: new xhtml, Data Transport CSS JavaScript DOM BOM API DOM API Specification Implementation Defects [ Theory / Practice ] server

  20. dimensions: (X)HTML rendering modes: Safari browsers per platform: platforms: Firefox Opera IE5, 6, 7 Firefox x 4 x 3 Opera 10,000+ UAs x 4 x 2 Macintosh Windows Linux, Unix, Mobile data: custom, xml, json behavior: js mixed: new xhtml, Data Transport CSS JavaScript DOM BOM API DOM API Specification Implementation Defects [ Theory / Practice ] server knowledge areas: 7 =672

  21. (we need a robust platform!)

  22. andraise expectations

  23. (so users engage and explore with confidence!)

  24. DESIGN DEVEL http://flickr.com/photos/niznoz/81087641/

  25. from Implementation Models {design} to Mental Models

  26. from Heterogeneous Environments {development} to Compelling and Consistent APIs

  27. Nuts and Bolts http://flickr.com/photos/snood/129758197/

  28. Sixcommitmentsto the platform

  29. 1] Meet properties where they are today. Facilitate incremental enhancement(“Transitional Internet Applications”)

  30. 2] Provide a broad, inclusive platform for Web 2.0’s “Rich Internet Application” development(a la carte, not framework)

  31. 3] Extensible and adaptive, to meet the needs of our diverse product portfolio(lots of different contexts)

  32. 4] Support all A-grade browsers – an evolving and still demanding challenge(Graded Browser Support) http://developer.yahoo.com/yui/articles/gbs/gbs.html

  33. 5] Support our scale and scope (industrial grade)

  34. 6] Be responsive and accountable to the community of designers and engineers(your P1 bugs are our P1 bugs)

  35. Learn from Desktop History Adapted from Alan Cooper’s “About Face 2.0” Book

  36. The Yahoo! User Interface (YUI) Library [idioms] TreeView AutoComplete Slider Calendar Control Menu Control TabView [compounds] Logger Control DHTML Windowing Animation Drag & Drop [primitives] Connection Manager (Ajax) Event Utility Dom Collection Loader CSS Reset, Fonts, Grids

  37. YUI DOM Collection • isAncestor(parent, potentialChild) • inDocument(el) • getDocumentHeight, getDocumentWidth • getViewportHeight, getViewportWidth • getElementsBy • YAHOO.util.Dom.getElementsBy(function(el) { return (/^http:\/\/www\.yahoo\.com/. test(el.getAttribute('href'))); }, 'a', 'content')); • Class management utilities

  38. YUI Event • Event • Flexible batch assignment • onAvailable and onContentReady • Scope correction and assignment • Automatic cleanup • Custom Events

  39. YUI Event’s Custom Events • var myEvent = new YAHOO.util.CustomEvent('myEvent'); • myEvent.subscribe(function() { alert('event fired'); }); • myEvent.fire();

  40. YUI Animation var anim = new YAHOO.util.Anim(el, { width: {to: 400}, height: {by: 400, unit: 'em' }, opacity: {from: 0, to: 1} 1); anim.animate(); • Includes support for Bezier math control

  41. YUI Connection • File uploading in addition to XHR • Easy implementation of file uploading across the A-Grade browsers • Use the upload member of the callback object (instead of "success" or "failure") • XHR callback with extra arguments

  42. YUI Container Family

  43. Drag and Drop • It’s easy, sorta, but easy to get wrong too • Point, Region, Multiple Handles, !Handles • Exposes 15 interesting moments

  44. Storyboard Template for Drag & Drop What happens when the mouse is pressed on the draggable object but dragging has not initiated?

  45. YUI Logger and Firebug • alert(“stop the insanity”); • YAHOO.log(“There IS a better way”); • Debug with Logger or Firebug directly.

  46. CSS Grids • Page Widths • Template Presets • Nesting Grids • Together, 200 layouts for 2kb.

  47. About YUI Page Weight http://yuiblog.com/blog/2006/10/16/pageweight-yui0114/

  48. À la carte Dependencies

  49. Lightweight CSS Foundation

More Related