YUI: the Yahoo! User Interface Library
Total Page:16
File Type:pdf, Size:1020Kb
YUI:YUI: TheThe Yahoo!Yahoo! UserUser InterfaceInterface LibraryLibrary Web Builder 2.0 Las Vegas Nate Koechley Senior Engineer & Designer, Yahoo! User Interface (YUI) Library Team Platform Engineering Group Yahoo! Inc. Slides http://nate.koechley.com/talks/2006/12/webbuilder/ Contact http://yuiblog.com [email protected] http://developer.yahoo.com/yui TalkTalk OutlineOutline zWhy we build it. zWhat we built. zWhy we gave it away. zWhy you might like it. TalkTalk OutlineOutline zWhy we build it. zWhat we built. zWhy we gave it away. zWhy you might like it. AA newnew seasonseason onlineonline http://flickr.com/photos/getthebubbles/107463768/ PeoplePeople expectexpect less less online…online… …but…but wewe areare online…online… …and…and tiedtied toto thethe browser.browser. SoSo wewe mustmust levellevel thethe playingplaying fieldfield.. http://www.flickr.com/photos/probek/44480413/ How?How? itit takestakes 22 thingsthings http://flickr.com/photos/latitudes/104286031/ 1:1: WeWe mustmust improveimprove ourour technology.technology. Safari Firefox Opera IE5, 6, 7 Firefox Opera 10,000+ UAs Macintosh Windows Linux, Unix, Mobile CSS BOM API (X)HTML DOM JavaScript DOM API Specification Implementation Defects js new xhtml, new json custom, xml, custom, [ Theory / Practice ] Data Transport data: behavior: mixed: Safari Firefox Opera IE5, 6, 7 Firefox Opera 10,000+ UAs Macintosh Windows Linux, Unix, Mobile knowledgeCSS areas: 7 BOM API (X)HTML dimensions:DOM xJavaScript 4 platforms:DOM API x 3 Specification browsers perImplementation platform: x 4 Defects js new xhtml, new json custom, xml, custom, rendering[ Theory / Practicemodes: ] x 2Data Transport data: behavior: mixed: (see,(see, wewe needneed aa robustrobust platformplatform toto offeroffer somesome sanity!)sanity!) 2:2: WeWe mustmust raiseraise expectationsexpectations (so(so usersusers exploreexploreandand feelfeel comfortablecomfortable)) DESIGN DEVEL http://flickr.com/photos/niznoz/81087641/ fromfrom ImplementationImplementation ModelsModels {design}{design} toto MentalMental ModelsModels fromfrom HeterogeneousHeterogeneous EnvironmentsEnvironments {development}{development} toto ConsistentConsistent APIsAPIs && CompellingCompelling ComponentsComponents ImproveImprove technologytechnology toto raiseraise expectations:expectations: NutsNuts andand BoltsBolts http://flickr.com/photos/snood/129758197/ SixSix commitmentscommitments toto thethe platformplatform 1]1]1] MeetMeetMeet sitessitessites wherewherewhere theytheythey areareare todaytodaytoday FacilitateFacilitateFacilitate incrementalincrementalincremental enhancementenhancementenhancement ““TransitionalTransitional InternetInternet ApplicationsApplications”” 2]2]2] ProvideProvideProvide aaa broadbroadbroad inclusiveinclusiveinclusive platformplatformplatform forforfor RichRichRich InternetInternetInternet ApplicationApplicationApplication development.development.development. aaa lalala cartecartecarte notnot aa framework!framework! 3]3]3] ExtensibleExtensibleExtensible andandand adaptiveadaptiveadaptive tototo meetmeetmeet thethethe needneedneed ofofof diversediversediverse productproductproduct portfolio.portfolio.portfolio. LotsLotsLots ofofof differentdifferentdifferent contexts.contexts.contexts. 4]4]4] SupportSupportSupport allallall AAA-grade--gradegrade browsers.browsers.browsers. StillStillStill aaa demandingdemandingdemanding challenge.challenge.challenge. “““GradedGradedGraded BrowserBrowserBrowser SupportSupportSupport””” 5]5]5] SupportSupportSupport ourourour scalescalescale andandand scope.scope.scope. YahooYahooYahoo-sized--sizedsized ProblemsProblemsProblems IndustrialIndustrial GradeGrade 6]6]6] BeBeBe responsiveresponsiveresponsive andandand accountableaccountableaccountable tototo thethethe communitycommunitycommunity ofofof designersdesignersdesigners andandand developersdevelopersdevelopers... DedicatedDedicatedDedicated TeamTeamTeam YourYour PriorityPriority 11 bugsbugs areare ourour PriorityPriority 11 bugs.bugs. TalkTalk OutlineOutline zWhy we build it. zWhat we built. zWhy we gave it away. zWhy you might like it. Alan Cooper’s GUI design canon ctrl-c = copy, [idioms] ctr-z = undo double-click, [compounds] right-click, select click, drag, [primitives] keypress The Yahoo! User[idioms] Interface Library TreeTree ControlControl AutoCompleteAutoComplete SliderSlider CalendarCalendar ControlControl [compounds]TabViewTabView MenuMenu ControlControl LoggerLogger ControlControl DHTMLDHTML WindowingWindowing AnimationAnimation DragDrag && DropDrop [primitives] ConnectionConnection EventEvent UtilityUtility ManagerManager (Ajax)(Ajax) DomDom CollectionCollection LoaderLoader CSSCSS Reset,Reset, Fonts,Fonts, GridsGrids TalkTalk OutlineOutline zWhy we build it. zWhat we built. zWhy we gave it away. zWhy you might like it. MoreMore BugBug SquashersSquashers z First legit bug report within 24 hours of initial release. z Bug Reports and Feature Requests: http://sourceforge.net/tracker/index.php?func=detail &aid=1583846&group_id=165715 CommunityCommunity z Public is adding value –Jack Slocum –Dav Glass –Dustin Diaz –Ross Harmes JackJack SlocumSlocum ((jackslocum.comjackslocum.com)) z YAHOO.ext z A Grid Component for Yahoo! UI - Part 1 – Creating an AJAX feed viewer using Yahoo! UI and the new Grid Component z A SplitBar component for Yahoo! UI z WordPress Comments System built with Yahoo! UI z Resizable Reloaded - A reusable component for resizing elements DavDav GlassGlass ((blog.davglass.comblog.davglass.com)) z Extensions –YUI.Tools –YUI.Effects –YUI.Loader z Wizards: –Yahoo! Grids Builder DustinDustin DiazDiaz ((dustindiaz.comdustindiaz.com)) z Screencasts – YUI Basics and DOM Hijacking (0:20) – Ajax with Connection Manager (0:25) – Developing an Object Oriented Web Service (0:45) z Articles – Forget addEvent, use Yahoo!’s Event Utility – JavaScript Publisher/Subscriber Pattern – Publishing Custom Events in JavaScript – YUI Tetris! z Interviews/Podcasts z Prototypes RossRoss HarmesHarmes Yahoo!Yahoo! DeveloperDeveloper Network:Network: “You bring the skills. We bring the ingredients.” YUI http://www.flickr.com/photos/cdm/50688378/in/set-1002108/ The Yahoo! Developer Network Ecosystem: UtilityUtility andand DataData WebWeb ServicesServices Services Browser Based Authenticatio (BBAuth), Answers, Local, Maps, Photos, Search, Shopping, Travel, Utilities, Mail 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 The Yahoo! Developer Network Ecosystem: DesignDesign PatternsPatterns The Yahoo! Developer Network Ecosystem: DesignDesign PatternsPatterns The Yahoo! Developer Network Ecosystem: DesignDesign PatternsPatterns The Yahoo! Developer Network Ecosystem: BrowserBrowser SupportSupport GuidelinesGuidelines The Yahoo! Developer Network Ecosystem: BrowserBrowser SupportSupport GuidelinesGuidelines AA risingrising tidetide liftslifts allall boatsboats TalkTalk OutlineOutline zWhy we build it. zWhat we built. zWhy we gave it away. zWhy you might like it. IfIf itit’’ss goodgood enoughenough forfor YahooYahoo…… z Scalability, Performance, Distributed Development, Internationalization, Accessibility, Design, Usability UserUser ExperienceExperience DesignersDesigners z Design-Engineering Collaboration z Usability Studies and Research z Has tools for designers too: –Grids for fast page layout –Interesting Moments Matrics WhatWhat happenshappens whenwhen thethe mousemouse isis pressedpressed onon thethe draggabledraggable object object butbut draggingdragging hashas notnot initiated?initiated? Storyboard Template for Drag & Drop InternationalizationInternationalization BakedBaked InIn AccessibilityAccessibility BakedBaked InIn z Victor Tsaran –Accessibility Program Manager z Close Collaboration with various a11y groups and advocates. z More goodness to come… BrowserBrowser SupportSupport BakedBaked InIn z “Set it and forget it” z We collaborate with all browser vendors z Graded Browser Support z Opera “for free”, even mobile! SeniorSenior ArchitecturalArchitectural LeadershipLeadership z Douglas Crockford: –“Yoda of lambda programming and JavaScript” according to Brendan Eich (Inventor of JavaScript) z Rasmus Lerdorf –Inventor of PHP AcclaimedAcclaimed DocumentationDocumentation z Documentation for you, regardless of level or work style: –Overviews and Quick Start Guides –Tutorials and Step-by-Steps –Generated API Docs –Cheatsheets – for every component! –Mailing list –Bundles: TextMate, VIM, Eclipse, Aptana LandingLanding PagePage QuickQuick StartStart GuidesGuides CompleteComplete APIAPI DocumentationDocumentation ExamplesExamples andand TutorialsTutorials TheThe YUIYUI CheatCheat SheetsSheets ydnydn--javascriptjavascript MailingMailing ListList StabilityStability andand DedicationDedication z Dedicated team of full-time developers. z You can use the exact same lines of code Yahoo does. WeWe’’rere GoodGood ““PagePage CitizensCitizens”” z “Plays well with others” –Single global variable –Consistent namespace var $ = YAHOO.util.Dom.get; –Can coexist with other libs WeWe BelieveBelieve inin JavaScriptJavaScript z We don’t try to fix JavaScript z We don’t enforce a particular coding style z We expect you to write JS LightLight WeightWeight andand aa lala cartecarte z Multiple versions of each file –Fully commented –Minimized –Debug z No unnecessary dependencies z Pre-concatenated sets of commonly used files. ThreeThree VersionsVersions ofof eacheach