SlideShare a Scribd company logo
1 of 62
YUI 3
The Most Advanced JavaScript
     Library in the World




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
What is YUI?




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
What is YUI?
 YUI stands for Yahoo! User Interface Library




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
What is YUI?
 YUI stands for Yahoo! User Interface Library

 JavaScript Library to simplify development




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
What is YUI?
 YUI stands for Yahoo! User Interface Library

 JavaScript Library to simplify development

 First released in February 2006




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
What is YUI?
 YUI stands for Yahoo! User Interface Library

 JavaScript Library to simplify development

 First released in February 2006

 Core maintained by a team of engineers at
 Yahoo! with community-contributed modules



         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
What is YUI?
 YUI stands for Yahoo! User Interface Library

 JavaScript Library to simplify development

 First released in February 2006

 Core maintained by a team of engineers at
 Yahoo! with community-contributed modules

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

         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
A New Start




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
A New Start
 YUI 3 was rebuilt from the ground up




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
A New Start
 YUI 3 was rebuilt from the ground up

 Strong emphasis on performance
 Demo:
 http://developer.yahoo.com/performance/




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Most Advanced?


   Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
         Creative Commons Attribution 2.5 Canada
Browser?




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
Browser?
 Doesn’t assume a browser




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada
Browser?
 Doesn’t assume a browser

 Abstracts window and document references




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada
Browser?
 Doesn’t assume a browser

 Abstracts window and document references

 Can now run server-side on Node.js thanks to
 Dav Glass




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Sub-modular




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
Sub-modular
 Load only what you need




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada
Sub-modular
 Load only what you need

 Dependency configurator
 Demo:
 http://developer.yahoo.com/yui/3/configurator/




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Loader




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
Loader
 Built into YUI Global Object




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Loader
 Built into YUI Global Object

 Accessed through use() method
 YUI().use('history', function(Y) {
     // History available, and ready for use.
 });




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Loader
 Built into YUI Global Object

 Accessed through use() method
 YUI().use('history', function(Y) {
     // History available, and ready for use.
 });


 Self-aware dependency management/healing




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Loader
 Built into YUI Global Object

 Accessed through use() method
 YUI().use('history', function(Y) {
     // History available, and ready for use.
 });


 Self-aware dependency management/healing

 Optimal dependency loading

          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Node Utility




     Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
           Creative Commons Attribution 2.5 Canada
Node Utility
 DOM abstraction




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada
Node Utility
 DOM abstraction

 Node & NodeList




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada
Node Utility
 DOM abstraction

 Node & NodeList
var node = Y.one(‘#foo’); // returns Node




           Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                 Creative Commons Attribution 2.5 Canada
Node Utility
 DOM abstraction

 Node & NodeList
var node = Y.one(‘#foo’); // returns Node

var nodes = Y.all(‘#foo .bar’); // returns NodeList




           Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                 Creative Commons Attribution 2.5 Canada
Node Utility
 DOM abstraction

 Node & NodeList
var node = Y.one(‘#foo’); // returns Node

var nodes = Y.all(‘#foo .bar’); // returns NodeList


 myNode.addClass() and
 myNode.setStyle()


           Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                 Creative Commons Attribution 2.5 Canada
Node Utility
 DOM abstraction

 Node & NodeList
var node = Y.one(‘#foo’); // returns Node

var nodes = Y.all(‘#foo .bar’); // returns NodeList


 myNode.addClass() and
 myNode.setStyle()

 Makes protection schemes possible
           Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                 Creative Commons Attribution 2.5 Canada
Attribute Utility




     Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
           Creative Commons Attribution 2.5 Canada
Attribute Utility
 Augmentable attribute interface for classes




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Attribute Utility
 Augmentable attribute interface for classes

 Customizable getters and setters for data
 normalization and validation




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Attribute Utility
 Augmentable attribute interface for classes

 Customizable getters and setters for data
 normalization and validation

 Change events for getters and setters; hooks
 for on and after events




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Base




       Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
             Creative Commons Attribution 2.5 Canada
Base
 Low-level foundation class




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Base
 Low-level foundation class

 Standard template for creating attribute based
 objects




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Base
 Low-level foundation class

 Standard template for creating attribute based
 objects

 Consistent init() and destroy()




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Plugin




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
Plugin
 Allows addition of atomic functionality to
 object instances




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Plugin
 Allows addition of atomic functionality to
 object instances

 Lets you write cleaner, simpler classes




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Plugin
 Allows addition of atomic functionality to
 object instances

 Lets you write cleaner, simpler classes

 Demo:
 http://developer.yahoo.com/yui/3/plugin/#simple




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Event




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
Event
 DOM events & Custom Events




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada
Event
 DOM events & Custom Events

 Attach to elements that may not yet exist
 Y.on(‘click’, handleClick, ‘#foo’); // no element
 Y.on(‘click’, handleClick, foo); // element exists
 foo.on(‘click’, handleClick); // same as above




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Event
 DOM events & Custom Events

 Attach to elements that may not yet exist
 Y.on(‘click’, handleClick, ‘#foo’); // no element
 Y.on(‘click’, handleClick, foo); // element exists
 foo.on(‘click’, handleClick); // same as above


 Normalized event object
 function handleClick(e) {
   // regardless of browser
   e.preventDefault();
   var target = e.target;
 }

          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Custom Events




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
Custom Events
 Define your own events at key moments of
 interest




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada
Custom Events
 Define your own events at key moments of
 interest

 YUI treats DOM events and Custom Events the
 same:
 function domEventHandler(e) {
   e.stopPropagation();
 }
 function customEventHandler(e) {
   e.stopPropagation();
 }



          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
IO




     Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
           Creative Commons Attribution 2.5 Canada
IO
 io-base: base class used for standard XHR




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
IO
 io-base: base class used for standard XHR

 io-xdr: extension for cross-domain requests




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
IO
 io-base: base class used for standard XHR

 io-xdr: extension for cross-domain requests

 io-form: extension for form data serialization
 for POST transactions




         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
IO
 io-base: base class used for standard XHR

 io-xdr: extension for cross-domain requests

 io-form: extension for form data serialization
 for POST transactions

 io-upload-iframe: gets around XHR’s file
 upload limitation from HTML forms


         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
IO
 io-base: base class used for standard XHR

 io-xdr: extension for cross-domain requests

 io-form: extension for form data serialization
 for POST transactions

 io-upload-iframe: gets around XHR’s file
 upload limitation from HTML forms

 io-queue: keep async transactions in order
         Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
               Creative Commons Attribution 2.5 Canada
Deep Dive




    Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
          Creative Commons Attribution 2.5 Canada
Deep Dive
 API Docs, examples and walkthroughs
 http://developer.yahoo.com/yui/3/




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Deep Dive
 API Docs, examples and walkthroughs
 http://developer.yahoo.com/yui/3/


 YUI Theater
 http://developer.yahoo.com/yui/theater/




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Deep Dive
 API Docs, examples and walkthroughs
 http://developer.yahoo.com/yui/3/


 YUI Theater
 http://developer.yahoo.com/yui/theater/


 Events
 http://upcoming.yahoo.com/group/4081/




          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Deep Dive
 API Docs, examples and walkthroughs
 http://developer.yahoo.com/yui/3/


 YUI Theater
 http://developer.yahoo.com/yui/theater/


 Events
 http://upcoming.yahoo.com/group/4081/


 Get Involved
 http://yuilibrary.com/gallery/


          Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
                Creative Commons Attribution 2.5 Canada
Questions?


 Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
       Creative Commons Attribution 2.5 Canada
Thank You!
 ara.pehlivanian@gmail.com

 http://twitter.com/@ara_p

 http://arapehlivanian.com




        Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010.
              Creative Commons Attribution 2.5 Canada

More Related Content

Viewers also liked

Java Script basics and DOM
Java Script basics and DOMJava Script basics and DOM
Java Script basics and DOM
Sukrit Gupta
 

Viewers also liked (20)

Seagate NAS: Witness Future of Cloud Computing
Seagate NAS: Witness Future of Cloud ComputingSeagate NAS: Witness Future of Cloud Computing
Seagate NAS: Witness Future of Cloud Computing
 
逆向思考
逆向思考逆向思考
逆向思考
 
自在
自在自在
自在
 
Big Data and HPC
Big Data and HPCBig Data and HPC
Big Data and HPC
 
Java and XML
Java and XMLJava and XML
Java and XML
 
Building Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScriptBuilding Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScript
 
Understanding XML DOM
Understanding XML DOMUnderstanding XML DOM
Understanding XML DOM
 
Xml processors
Xml processorsXml processors
Xml processors
 
JavaScript Introduction
JavaScript IntroductionJavaScript Introduction
JavaScript Introduction
 
JAXB
JAXBJAXB
JAXB
 
Java Script basics and DOM
Java Script basics and DOMJava Script basics and DOM
Java Script basics and DOM
 
XML SAX PARSING
XML SAX PARSING XML SAX PARSING
XML SAX PARSING
 
Xml parsers
Xml parsersXml parsers
Xml parsers
 
The Mysteries Of JavaScript-Fu (@media Europe Edition)
The Mysteries Of JavaScript-Fu (@media Europe Edition)The Mysteries Of JavaScript-Fu (@media Europe Edition)
The Mysteries Of JavaScript-Fu (@media Europe Edition)
 
Xml And JSON Java
Xml And JSON JavaXml And JSON Java
Xml And JSON Java
 
MapReduce Over Lustre
MapReduce Over LustreMapReduce Over Lustre
MapReduce Over Lustre
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)
 
SAX (con PHP)
SAX (con PHP)SAX (con PHP)
SAX (con PHP)
 
What are actionable insights? (Introduction to Operational Analytics Software)
What are actionable insights? (Introduction to Operational Analytics Software)What are actionable insights? (Introduction to Operational Analytics Software)
What are actionable insights? (Introduction to Operational Analytics Software)
 

Similar to YUI 3: The Most Advance JavaScript Library in the World

Similar to YUI 3: The Most Advance JavaScript Library in the World (6)

YUI Gallery
YUI GalleryYUI Gallery
YUI Gallery
 
JALTCALL2008
JALTCALL2008JALTCALL2008
JALTCALL2008
 
Jakarta EE for Spring Developers
Jakarta EE for Spring DevelopersJakarta EE for Spring Developers
Jakarta EE for Spring Developers
 
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy Person
 
The Open Library, Public Domain Wiki, and other Realized Myths of Creative Co...
The Open Library, Public Domain Wiki, and other Realized Myths of Creative Co...The Open Library, Public Domain Wiki, and other Realized Myths of Creative Co...
The Open Library, Public Domain Wiki, and other Realized Myths of Creative Co...
 
Js in 2016
Js in 2016Js in 2016
Js in 2016
 

More from Ara Pehlivanian (7)

Is it CrossFit or JavaScript?
Is it CrossFit or JavaScript?Is it CrossFit or JavaScript?
Is it CrossFit or JavaScript?
 
Expert JavaScript tricks of the masters
Expert JavaScript  tricks of the mastersExpert JavaScript  tricks of the masters
Expert JavaScript tricks of the masters
 
Becoming a jQuery expert
Becoming a jQuery expertBecoming a jQuery expert
Becoming a jQuery expert
 
Master your domain
Master your domainMaster your domain
Master your domain
 
Twitterface: A viral marketing concept
Twitterface: A viral marketing conceptTwitterface: A viral marketing concept
Twitterface: A viral marketing concept
 
Worry Free Web Development
Worry Free Web DevelopmentWorry Free Web Development
Worry Free Web Development
 
Scripting The Dom
Scripting The DomScripting The Dom
Scripting The Dom
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

YUI 3: The Most Advance JavaScript Library in the World

  • 1. YUI 3 The Most Advanced JavaScript Library in the World Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 2. What is YUI? Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 3. What is YUI? YUI stands for Yahoo! User Interface Library Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 4. What is YUI? YUI stands for Yahoo! User Interface Library JavaScript Library to simplify development Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 5. What is YUI? YUI stands for Yahoo! User Interface Library JavaScript Library to simplify development First released in February 2006 Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 6. What is YUI? YUI stands for Yahoo! User Interface Library JavaScript Library to simplify development First released in February 2006 Core maintained by a team of engineers at Yahoo! with community-contributed modules Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 7. What is YUI? YUI stands for Yahoo! User Interface Library JavaScript Library to simplify development First released in February 2006 Core maintained by a team of engineers at Yahoo! with community-contributed modules http://developer.yahoo.com/yui/ Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 8. A New Start Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 9. A New Start YUI 3 was rebuilt from the ground up Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 10. A New Start YUI 3 was rebuilt from the ground up Strong emphasis on performance Demo: http://developer.yahoo.com/performance/ Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 11. Most Advanced? Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 12. Browser? Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 13. Browser? Doesn’t assume a browser Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 14. Browser? Doesn’t assume a browser Abstracts window and document references Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 15. Browser? Doesn’t assume a browser Abstracts window and document references Can now run server-side on Node.js thanks to Dav Glass Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 16. Sub-modular Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 17. Sub-modular Load only what you need Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 18. Sub-modular Load only what you need Dependency configurator Demo: http://developer.yahoo.com/yui/3/configurator/ Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 19. Loader Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 20. Loader Built into YUI Global Object Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 21. Loader Built into YUI Global Object Accessed through use() method YUI().use('history', function(Y) { // History available, and ready for use. }); Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 22. Loader Built into YUI Global Object Accessed through use() method YUI().use('history', function(Y) { // History available, and ready for use. }); Self-aware dependency management/healing Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 23. Loader Built into YUI Global Object Accessed through use() method YUI().use('history', function(Y) { // History available, and ready for use. }); Self-aware dependency management/healing Optimal dependency loading Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 24. Node Utility Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 25. Node Utility DOM abstraction Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 26. Node Utility DOM abstraction Node & NodeList Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 27. Node Utility DOM abstraction Node & NodeList var node = Y.one(‘#foo’); // returns Node Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 28. Node Utility DOM abstraction Node & NodeList var node = Y.one(‘#foo’); // returns Node var nodes = Y.all(‘#foo .bar’); // returns NodeList Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 29. Node Utility DOM abstraction Node & NodeList var node = Y.one(‘#foo’); // returns Node var nodes = Y.all(‘#foo .bar’); // returns NodeList myNode.addClass() and myNode.setStyle() Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 30. Node Utility DOM abstraction Node & NodeList var node = Y.one(‘#foo’); // returns Node var nodes = Y.all(‘#foo .bar’); // returns NodeList myNode.addClass() and myNode.setStyle() Makes protection schemes possible Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 31. Attribute Utility Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 32. Attribute Utility Augmentable attribute interface for classes Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 33. Attribute Utility Augmentable attribute interface for classes Customizable getters and setters for data normalization and validation Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 34. Attribute Utility Augmentable attribute interface for classes Customizable getters and setters for data normalization and validation Change events for getters and setters; hooks for on and after events Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 35. Base Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 36. Base Low-level foundation class Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 37. Base Low-level foundation class Standard template for creating attribute based objects Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 38. Base Low-level foundation class Standard template for creating attribute based objects Consistent init() and destroy() Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 39. Plugin Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 40. Plugin Allows addition of atomic functionality to object instances Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 41. Plugin Allows addition of atomic functionality to object instances Lets you write cleaner, simpler classes Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 42. Plugin Allows addition of atomic functionality to object instances Lets you write cleaner, simpler classes Demo: http://developer.yahoo.com/yui/3/plugin/#simple Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 43. Event Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 44. Event DOM events & Custom Events Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 45. Event DOM events & Custom Events Attach to elements that may not yet exist Y.on(‘click’, handleClick, ‘#foo’); // no element Y.on(‘click’, handleClick, foo); // element exists foo.on(‘click’, handleClick); // same as above Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 46. Event DOM events & Custom Events Attach to elements that may not yet exist Y.on(‘click’, handleClick, ‘#foo’); // no element Y.on(‘click’, handleClick, foo); // element exists foo.on(‘click’, handleClick); // same as above Normalized event object function handleClick(e) { // regardless of browser e.preventDefault(); var target = e.target; } Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 47. Custom Events Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 48. Custom Events Define your own events at key moments of interest Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 49. Custom Events Define your own events at key moments of interest YUI treats DOM events and Custom Events the same: function domEventHandler(e) { e.stopPropagation(); } function customEventHandler(e) { e.stopPropagation(); } Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 50. IO Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 51. IO io-base: base class used for standard XHR Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 52. IO io-base: base class used for standard XHR io-xdr: extension for cross-domain requests Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 53. IO io-base: base class used for standard XHR io-xdr: extension for cross-domain requests io-form: extension for form data serialization for POST transactions Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 54. IO io-base: base class used for standard XHR io-xdr: extension for cross-domain requests io-form: extension for form data serialization for POST transactions io-upload-iframe: gets around XHR’s file upload limitation from HTML forms Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 55. IO io-base: base class used for standard XHR io-xdr: extension for cross-domain requests io-form: extension for form data serialization for POST transactions io-upload-iframe: gets around XHR’s file upload limitation from HTML forms io-queue: keep async transactions in order Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 56. Deep Dive Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 57. Deep Dive API Docs, examples and walkthroughs http://developer.yahoo.com/yui/3/ Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 58. Deep Dive API Docs, examples and walkthroughs http://developer.yahoo.com/yui/3/ YUI Theater http://developer.yahoo.com/yui/theater/ Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 59. Deep Dive API Docs, examples and walkthroughs http://developer.yahoo.com/yui/3/ YUI Theater http://developer.yahoo.com/yui/theater/ Events http://upcoming.yahoo.com/group/4081/ Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 60. Deep Dive API Docs, examples and walkthroughs http://developer.yahoo.com/yui/3/ YUI Theater http://developer.yahoo.com/yui/theater/ Events http://upcoming.yahoo.com/group/4081/ Get Involved http://yuilibrary.com/gallery/ Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 61. Questions? Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada
  • 62. Thank You! ara.pehlivanian@gmail.com http://twitter.com/@ara_p http://arapehlivanian.com Ara Pehlivanian, BarCamp Boston 5, April 17-18 2010. Creative Commons Attribution 2.5 Canada

Editor's Notes