Nate Koechley – Yahoo! vs. Yahoo!: Case Studies Nate Koechley Senior Engineer & Designer, Yahoo! User Interface (YUI) Library Team.

Slides:



Advertisements
Similar presentations
Episodes a shared approach for timing web pages Steve Souders Google Disclaimer: This content does not necessarily reflect.
Advertisements

Widget Summit: Advanced JavaScript Joseph Smarr Plaxo, Inc. October 16, 2007.
Data Publishing on Web 2.0 Leigh Dodds, Chief Technology Officer, Ingenta 1 st February 2007.
Introduction to JavaScript Module 1 Client Side JS Programming M-GO Sponsored By
June 28 th – July 1 st 2006 Implementing Usability: Insights to improve your chances  CFUnited 2007.
Tableau Visual Intelligence Platform
February 11, 2007 Can Ajax be OS for the Browser? Kevin Hakman Co-Founder General Interface Ajax Toolkit Director, Developer Evangelism TIBCO Software.
AJAX & By – Anupama Sharma. Defining Ajax Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together.
It’s always better live. MSDN Events Developing ASP.NET AJAX Controls with Silverlight.
Developing a Basic Web Page with HTML
Tableau Visual Intelligence Platform
Seller Name Agent Name Listing Presentation Date… Insert Photo Go to View, Master, Slide, then Insert, Picture, from File, and then find your photo on.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
MDCFUG TeraTech, Inc Adobe Flash 9 By Michael Smith TeraTech.
Accessibility for Rich Internet Applications: Colin Clark, Fluid Project Technical Lead, Adaptive Technology Resource Centre Techniques & Toolkits.
EWD VistA Update 2010 Rob Tweed M/Gateway Developments Ltd.
Yahoo! vs. Yahoo! Three Large-Scale Mainstream DHTML Implementations Nate Koechley
Chapter 11-Multimedia Authoring Tools. Overview Introduction to multimedia authoring tools. Types of authoring tools. Cross-platform authoring notes.
Introduction to AJAX AJAX Keywords: JavaScript and XML
DNN Performance & Scalability Planning, Evaluating & Improving : Part 2.
HINARI/Basic Internet Concepts (module 1.1). Instructions - This part of the:  course is a PowerPoint demonstration intended to introduce you to Basic.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Prepared by Stephen Olaño June 12, Rich Internet Applications It allow to build rich applications with data and multimedia contents, offering a.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
Unit 1 – Web Concepts Instructor: Brent Presley. ASSIGNMENT Read Chapter 1 Complete lab 1 – Installing Portable Apps.
 2008 Pearson Education, Inc. All rights reserved Ajax-Enabled Rich Internet Applications.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
ITCS 6010 SALT. Speech Application Language Tags (SALT) Speech interface markup language Extension of HTML and other markup languages Adds speech and.
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
AJAX and Atlas in ASP.NET 2.0 William J. Steele MSDN Developer Evangelist Microsoft Corporation
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Introduction to HTML Tutorial 1 eXtensible Markup Language (XML)
Weekend MS CS Program Internet and Web Technologies COT 5930 Web Project Development - Ajax Dr. Roy Levow, Associate Chair & Professor
1 Yahoo! User Interface Library Nate Oracle User Experience April 17th, 2006.
Javascript II DOM & JSON. In an effort to create increasingly interactive experiences on the web, programmers wanted access to the functionality of browsers.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
2 Web Standards and IE7 Embracing the Future, Managing the Past.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
A Lap Around Windows Presentation Foundation. Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows.
INTRODUCTION TO WEB APPLICATION Chapter 1. In this chapter, you will learn about:  The evolution of the Internet  The beginning of the World Wide Web,
HTML5 AND THE FUTURE JAVASCRIPT PLATFORM Marcelo Lopez Ruiz Senior Software Design Engineer Microsoft Corporation.
Quick overview of ASP.NET Ajax Ajax deep-dive Cover some key real-world problems Discuss solutions, patterns, opportunities Lots of demos And more of.
REAL WORLD AJAX MARCH TIBCO USER CONFERENCE / 2004 Enterprise Rich Internet Applications with AJAX Real World Case Studies with TIBCO General Interface™
Putting Performance Best Practices Together to Create the Perfect SPA Chris Love2Dev.com.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
RIA and Web2.0 Development with no Coding Juan Camilo Ruiz Senior Product Manager Development Tools.
The Web Wizard’s Guide To DHTML and CSS Chapter 6 Understanding Events.
Add Photo Here. Select View, Master, Slide Master. Then Insert Picture, From File Seller Name Agent Name Listing Presentation Date…
Web Components with Polymer Jeff Tapper Digital
Unit 13 –JQuery Basics Instructor: Brent Presley.
“The world’s most misunderstood language has become the world’s most popular programming language” Akshay Arora
IE Developer Tools Jonathan Seitel Program Manager.
1 Yahoo! vs. Yahoo! Yahoo! Case Studies Across the Doc—App Spectrum Nate Koechley: The Ajax Experience.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
1 Y! v. Y! Yahoo! Case Studies Across the Page—App Spectrum, One Size Does Not Fit All Nate Koechley 2006, London – June 16 th, 2006
JQUERY AND AJAX
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
Building Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 Omar Khan Group Program Manager Visual Studio.
Tutorial 1 Getting Started with Adobe Dreamweaver CS5.
Enhance Your Page Load Speed And Improve Traffic.
Netscape Application Server
Working with Client-Side Scripting
AJAX.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Core Platform The base of EmpFinesse™ Suite.
Teaching slides Chapter 6.
What’s Coming in IE8 Christian Stockwell Microsoft Corporation.
Presentation transcript:

Nate Koechley – Yahoo! vs. Yahoo!: Case Studies Nate Koechley Senior Engineer & Designer, Yahoo! User Interface (YUI) Library Team Platform Engineering Group Yahoo! Inc. Slides Contact Web Builder 2.0 Las Vegas

Nate Koechley – Koechley is pronounced “Kek’lee”

Nate Koechley – My Perspective Charter member of Web Development team at Yahoo! In the trenches and in management Currently: –Yahoo! User Interface (YUI) Library team –Senior Front-End Engineer, Technical Evangelist, Design Liaison, YUIBlog Editor –Responsible for Yahoo! Browser Support specs Strategy and Direction

Nate Koechley – YUI: The Yahoo! User Interface Library

Nate Koechley – YUI: The Yahoo! User Interface Library

Nate Koechley –

YUI: The Yahoo! User Interface Library

Nate Koechley – YUI: The Yahoo! User Interface Library

Nate Koechley – YUI: The Yahoo! User Interface Library

Nate Koechley – YUI: The Yahoo! User Interface Library

Nate Koechley – The DHTML Universe by Dojo’s Alex Russell (work in progress) DHTML_universe.pdf

Nate Koechley –

Nate Koechley –

Nate Koechley –

Nate Koechley –

Nate Koechley –

Nate Koechley –

Nate Koechley –

Nate Koechley –

Nate Koechley – A Great Community at Yahoo! (praise them – blame me)

Nate Koechley – A quick history:

Nate Koechley – 1994 A bit of evolution over the years…

Nate Koechley – A bit of evolution over the years…

Nate Koechley – A bit of evolution over the years…

Nate Koechley – A bit of evolution over the years…

Nate Koechley – A bit of evolution over the years…

Nate Koechley – A bit of evolution over the years…

Nate Koechley – Today per month: 188m users 5.2 billion hits A bit of evolution over the years… Source: Comscore, Feb. 2006

Nate Koechley – Video:

Nate Koechley – It is immensely telling that the new Yahoo! homepage is a DHTML and Ajax homepage.

Nate Koechley – Why is this noteworthy? “Content delivery” to “software development” Browser as application platform is “the most hostile environment possible” Massive edge-case populations

Nate Koechley –

“Getting It Right The Second Time” (matt sweeney)

Nate Koechley – Three Case Studies

Nate Koechley – Case Study #1 History –From scratch Massive Scale –5.2 billion views / month –188 million unique users / month DHMTL and Ajax Implementation (all data from comScore)

Nate Koechley – Video:

Nate Koechley – Case Study #2 photos.yahoo.com History –From scratch –Agile design and development project Massive Scale –30 million unique users –2 billion photos Major DHTML and Ajax Implementation

Nate Koechley – Case Study 2: Yahoo! Photos Beta Video:

Nate Koechley – Case Study #3 mail.yahoo.com History –Beta release about 1.5 years ago –Legacy-ish! (was Oddpost.com since 1999) Massive Scale –World’s largest provider ~257MM –Available in 21 languages Preeminent DHTML and Ajax Application

Nate Koechley – Video:

Nate Koechley – (Don’t worry – not a product pitch)

Nate Koechley – 42 Common Goals:

Nate Koechley – 43 Common Goals: 1) Performance

Nate Koechley – 44 Performance: time-to-paint time-to-onLoad speed on the wire speed of development memory & CPU footprint

Nate Koechley – 45 Common Goals: 1) Performance 2) Interactivity

Nate Koechley – 46 Common Goals: 1) Performance 2) Interactivity 3) Make Good Choices

Nate Koechley – Common Approaches No Absolute Pos Yes Compression YesNo Obfuscation Yes Minimization Yes Keyboard NoYes Font-size Responsive Yes CSS Sprites QuirksStrict Render Mode NoneXHTML 1.0 StrictHTML 4.01 StrictDoctype

Nate Koechley – to Applications from Documents & Pages

Nate Koechley – The Page—Application Spectrum Historically Web Shallow Interaction Simple Idioms Reading Markup + Skin Sequential Passive Historically Desktop Deep Interaction Sophisticated Idioms Doing DOM + Ajax Contained Active

Nate Koechley –

Looking Across the Spectrum 1. Tracking Events 2. Memory Management 3. Delivering JS and CSS 4. Data Format 5. Pagination 6. Browser Support

Nate Koechley – Looking Across the Spectrum 1. Tracking Events 2. Memory Management 3. Delivering JS and CSS 4. Data Format 5. Pagination 6. Browser Support

Nate Koechley – From:Page-Granular To:Event- Granular

Nate Koechley – Use an Event Utility: No JS in markup attribute space Many great utilities –Dojo –YUI Event Utility –many more… Watch out for memory leaks!!! (yes, three !’s)

Nate Koechley – Event Attachment Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts

Nate Koechley – What happens as your app gets more complex?

Nate Koechley – (more events * more objects)

Nate Koechley – Feeling lucky?

Nate Koechley – Feeling lucky?

Nate Koechley – Tracking Events: The Challenge How can we minimize the number of objects in play? How can we minimize the number of events attached and tracked?

Nate Koechley – From Attachment to Delegation Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts Obj +evnts

Nate Koechley – From Attachment to Delegation Obj

Nate Koechley – From Attachment to Delegation Obj Event

Nate Koechley – More on “Delegation” Minimize Object and Event Count by: 1.Only listen to native document.onmousedown (or whatever node makes sense) 2.Then determine which event.target (native) 3.Just-in-time handler attachment

Nate Koechley – Tracking Events: Event Delegation Obj Event

Nate Koechley – //listen on parent YUI.Event.on('parent', 'click', clickDelegate); function clickDelegate(e){ // get the target var origin = YUI.Event.getTarget(e, false); // delegate “just in time” if(YUI.Dom.hasClass(origin, 'child')) alert(origin.innerHTML + ' was clicked.'); } Foo Bar

Nate Koechley – Tracking Events: Limited objects & simple handlers Attachment Many objects & multiple handlers Delegation Many objects & multiple handlers DelegationApplicationPage

Nate Koechley – Looking Across the Spectrum 1. Tracking Events 2. Memory Management 3. Delivering JS and CSS 4. Data Format 5. Pagination 6. Browser Support

Nate Koechley – Memory Management Things can get out of hand. Goals: 1) Don’t leak memory 2) Keep overall footprint minimal 3) Always-responsive, stable interface

Nate Koechley – Destructor for each Constructor Thoroughly Unhook and Remove Handlers and References

Nate Koechley – Three Approaches 1. DOM Destruction 2. DOM Conservation 3. DOM Recycling

Nate Koechley – Memory Management Conservation (based on use case) Destruction Destruction, but also... Recycling (of iframes)ApplicationPage

Nate Koechley – Memory Management Tip: Measure and Test – Drip is a great tool Test: – Extreme object counts – Long interactions – Extensive navigation

Nate Koechley – Drip: MSDN: Understanding and Solving Internet Explorer Leak PatternsUnderstanding and Solving Internet Explorer Leak Patterns

Nate Koechley – Looking Across the Spectrum 1. Tracking Events 2. Memory Management 3. Delivering JS and CSS 4. Data Format 5. Pagination 6. Browser Support

Nate Koechley – General Best Practice Single large file is fastest –Avoid HTTP requests CSS near top JS near

Nate Koechley – Other Approaches (1): 1) Many small files at once –Enables atomic/team development –Enables partial caching while other parts change (build process can clean up and concat.)

Nate Koechley – Other Approaches (2): 2) Many small files on demand –Tuning in response to use case analysis –Overall time faster, individual time slower (bait and switch)

Nate Koechley – Other Approaches (3): 3) Inline in the –Caching doesn’t always work. In particular: browser’s home page.

Nate Koechley – Delivering CSS and JS: Many smaller files, on demand. Some inline. Every feature not used every time. Content is key. Über files of interface JS/CSS. Pay once. Then, data and objects on demand Single file (anti-example) Functionality is key. Highly interconnected.ApplicationPage

Nate Koechley – Looking Across the Spectrum 1. Tracking Events 2. Memory Management 3. Delivering JS and CSS 4. Data Format 5. Pagination 6. Browser Support

Nate Koechley – General Best Practice Use JSON for data interchange –“The fat-free alternative to XML” –Natively understood. No parsing or crawling. –It’s Ajax not AJAX –Tools in every known programming language

Nate Koechley – Other Approaches: Somebody pays to render the View – Pass DOM states as strings – Important architectural decision Finding: Parsing XML degrades performance greater-than-linearly as XML size increases.

Nate Koechley – Data Format: “JSON rocks” “We want to move to JSON” “We’re using some JSON, and will be much more soon” “Recognize strengths of client and server”ApplicationPage

Nate Koechley – Disclaimer: JSON is great, but an intimate understanding of your application is best.

Nate Koechley – Looking Across the Spectrum 1. Tracking Events 2. Memory Management 3. Delivering JS and CSS 4. Data Format 5. Pagination 6. Browser Support

Nate Koechley – could != should

Nate Koechley – Pagination In all cases: – Know your DOM. – Know your footprint. – Know your users.

Nate Koechley – Pagination vs. Endless Scrolling: N/A (single page) Some Ajax pagination Heavy objects Pagination with Ajax (new group in memory) Light objects Endless-scrolling (and clever caching)ApplicationPage

Nate Koechley – Looking Across the Spectrum 1. Tracking Events 2. Memory Management 3. Delivering JS and CSS 4. Data Format 5. Pagination 6. Browser Support

Nate Koechley – Browsers: The Dirty Truth The Web is the most hostile software engineering environment imaginable. – Douglas Crockford

Nate Koechley – Binary Browser Support Do I need to support Browser XYZ on this project? Same as saying: Those users aren’t welcome.

Nate Koechley – Graded Browser Support 1. “Support” does not mean “Same”

Nate Koechley – The Web is Heterogeneous! “Expecting two users using different browser software to have an identical experience fails to embrace or acknowledge the heterogeneous essence of the Web.”

Nate Koechley – Graded Browser Support 1. “Support” does not mean “Same” 2. Grades of support provide an [appropriate] experience for all.

Nate Koechley – The Web is about Availability A graded approach is inclusive and brings sanity to QA testing.

Nate Koechley –

Nate Koechley – Three Grades of Browser Support C-grade support (core support, 2%) A-grade support (advanced support, 96%) X-grade support (the X-Factor, 2%)

Nate Koechley –

Nate Koechley –

Browser Support: GBS A-grade Developed in Gecko GBS A-grade Developed in Gecko IE and FF Developed in IE, then built IE-emulation layer.ApplicationPage

Nate Koechley – Bad decisions are tomorrow’s constraints.

Nate Koechley – Bad decisions are tomorrow’s constraints. Good decisions are tomorrow’s opportunities. Bad decisions are tomorrow’s constraints. Good decisions are tomorrow’s opportunities.

Nate Koechley – We’re hiring! (Josie Arguada: )

Nate Koechley – Questions?

Nate Koechley – I don’t know.

Nate Koechley – Namespaces History –JS is load-and-go; text is eval’d; Implied global variables were a nicety Bad because of unreliability and insecurity –Trouble when we mashup, have many devs, and programs get large Many global variables is bad Ideally, only a single global per app|lib|widget –An object which contains all others Speed unaffected; self documentation; reliable Shorten locally if you want.

Nate Koechley – Single Page vs. Multiple Page What’s the sweet spot?

Nate Koechley – Thank you Photo Credits: – – –