SlideShare a Scribd company logo
1 of 18
Download to read offline
1
Using YUI to get things done



                               Natarajan  Kannan
                                Web Developer
                               twitter: @knutties

                   `
Demo time




3
Overview

    • YUI is a Javascript/CSS library
    • Highly modular, extensible and heavily 
      documented
    • Lets you do a lot with less code
         •   Very suitable for hacks
    • Probably the only javascript library that comes 
      with its own package management



4
What can you do with YUI? 

    •   Create websites/templates
    •   Manipulate web pages easily
    •   Fetch data from remote sources
    •   Interact with YQL
    •   Use pre­built UI widgets




5
Creating website templates

    • First task in creating a website
      –   select a layout
    • YUI CSS grids builder
      –   Interface to create layout
      –   http://developer.yahoo.com/yui/grids/builder/
    • Default CSS styling with YUI base




6
Manipulate web pages

    • Locate elements on web pages
      –   Using CSS selectors
    • Update portions of web pages
      –   By adding/removing/changing content
    • Change styling of elements
      –   hide/resize/overlay elements




7
Examples – Using Simple YUI
    // get an element reference, add a click handler
    Y.one('#demo').on('click', function(e) {/*handle 
    click*/});


    // add content to an element
    Y.one('#demo').append(" Additional content added to 
    #demo.");


    // move #demo to the location of any click on the 
    document
    Y.one('document').on('click', function(e) {
         Y.one('#demo').setXY([e.pageX, e.pageY]);
    }
    );



8
Examples – Using Simple YUI
    // fade #demo off to full opacity, then remove it from 
    the dom:
    Y.one('#demo').transition({
        easing: 'ease­out',
        duration: 2, // seconds
        opacity: 0
    }, function() {
        this.remove();
    });




9
Fetch data from remote sources

 • Allows you to fetch data from different sources
     –   Local functions
     –   Remote sources over http
 • Helps you work around cross­domain restrictions 
 • Y.io and Y.DataSource are your friends




10
Examples – Using Simple YUI
     // Make an HTTP request to 'get.php'.
     Y.io('get.php', {
         on: {
             complete: function (id, response) {
                 var id = id, // Transaction ID.
                     data = response.responseText; // Response 
     data.


                 // ... handle the response ...
             }
         }
     });




11
YUI makes YQL very easy




12
Examples – Using stock YUI 3
     YUI().use('yql', function(Y) {
      
         Y.YQL('select * from weather.forecast where 
     location=90210', function(r) {
            // r now contains the result of the YQL Query
           // use the YQL Developer console to learn
           // what data is coming back in this object
           // and how that data is structured.
         });
      
     });




13
Using pre­built UI widgets – YUI 3

 • YUI 3 (default)
     –   Overlays
     –   Sliders
     –   Tab views
     –   Rich Text Editor
 • YUI 3 (gallery)
     –   Accordion
     –   Tree view
     –   Resize

14
Using pre­built UI widgets – YUI 2
 • YUI 2 (default)
     –   Overlays
     –   Sliders
     –   Tab views
     –   Rich Text Editor
     –   Image Cropper
     –   Image loader
     –   Progress bar
     –   Tree view
     –   Charts 
     –   Colour picker

15
YUI with Greasemonkey

 • Greasemonkey lets you add functionality to 
   existing web pages
     –   http://diveintogreasemonkey.org/
 • YUI 3 with greasemonkey
     –   http://blog.davglass.com/files/yui3/greasemonkey/




16
Choosing your YUI
 • Simple YUI (based on YUI 3)
     –   Start fast
     –   Basic AJAX and DOM manipulation
     –   http://ericmiraglia.com/yui/demos/quickyui.php
 • YUI 3 
     –   Performance
     –   Sand­boxing
 • YUI 2 
     –   For its widget collection
     –   If you are already used to it

17
Links for you
 •   http://developer.yahoo.com/yui/3/
 •   http://developer.yahoo.com/yui/3/examples/
 •   http://yuilibrary.com/gallery/
 •   http://developer.yahoo.com/yui/2
 •   http://blog.davglass.com/files/yui3/greasemonkey




18

More Related Content

Viewers also liked

Viewers also liked (9)

September 2010 meeting
September 2010 meetingSeptember 2010 meeting
September 2010 meeting
 
сенсори
сенсорисенсори
сенсори
 
Hack 101 @ HackU - IIT Madras
Hack 101 @ HackU - IIT MadrasHack 101 @ HackU - IIT Madras
Hack 101 @ HackU - IIT Madras
 
Utiliser Ushahidi
Utiliser UshahidiUtiliser Ushahidi
Utiliser Ushahidi
 
Hacking with YUI 3 - Open Hack Day 2011
Hacking with YUI 3 - Open Hack Day 2011Hacking with YUI 3 - Open Hack Day 2011
Hacking with YUI 3 - Open Hack Day 2011
 
Case Study Of Human Centered Design
Case Study Of Human Centered DesignCase Study Of Human Centered Design
Case Study Of Human Centered Design
 
Death by power point
Death by power pointDeath by power point
Death by power point
 
How to think like a startup
How to think like a startupHow to think like a startup
How to think like a startup
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Similar to YUI - HackU 2010 IIT Mumbai

Running YUI 3 on Node.js - JSConf 2010
Running YUI 3 on Node.js - JSConf 2010Running YUI 3 on Node.js - JSConf 2010
Running YUI 3 on Node.js - JSConf 2010Adam Moore
 
Hack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT KharagpurHack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT KharagpurSumana Hariharan
 
夜宴49期《YUI Conf 2010》
夜宴49期《YUI Conf 2010》夜宴49期《YUI Conf 2010》
夜宴49期《YUI Conf 2010》Koubei Banquet
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryAlek Davis
 
Let's run JavaScript Everywhere
Let's run JavaScript EverywhereLet's run JavaScript Everywhere
Let's run JavaScript EverywhereTom Croucher
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalRod Martin
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesTeamstudio
 
Best Practices in Widget Development - Examples and Counterexamples
Best Practices in Widget Development  - Examples and CounterexamplesBest Practices in Widget Development  - Examples and Counterexamples
Best Practices in Widget Development - Examples and CounterexamplesROLE Project
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownMark Rackley
 
Microsoft PowerPoint - <b>jQuery</b>-3-UI.pptx
Microsoft PowerPoint - <b>jQuery</b>-3-UI.pptxMicrosoft PowerPoint - <b>jQuery</b>-3-UI.pptx
Microsoft PowerPoint - <b>jQuery</b>-3-UI.pptxtutorialsruby
 
An Introduction To The Use Of Widgets in libraries
An Introduction To The Use Of Widgets in librariesAn Introduction To The Use Of Widgets in libraries
An Introduction To The Use Of Widgets in librariesAaron Tay
 
JavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stackJavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stackTom Croucher
 
Toutch Jquery Mobile
Toutch Jquery MobileToutch Jquery Mobile
Toutch Jquery MobileJinlong He
 

Similar to YUI - HackU 2010 IIT Mumbai (20)

Running YUI 3 on Node.js - JSConf 2010
Running YUI 3 on Node.js - JSConf 2010Running YUI 3 on Node.js - JSConf 2010
Running YUI 3 on Node.js - JSConf 2010
 
Hack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT KharagpurHack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT Kharagpur
 
夜宴49期《YUI Conf 2010》
夜宴49期《YUI Conf 2010》夜宴49期《YUI Conf 2010》
夜宴49期《YUI Conf 2010》
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
jQuery for Drupal
jQuery for DrupaljQuery for Drupal
jQuery for Drupal
 
Let's run JavaScript Everywhere
Let's run JavaScript EverywhereLet's run JavaScript Everywhere
Let's run JavaScript Everywhere
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
Best Practices in Widget Development - Examples and Counterexamples
Best Practices in Widget Development  - Examples and CounterexamplesBest Practices in Widget Development  - Examples and Counterexamples
Best Practices in Widget Development - Examples and Counterexamples
 
jQuery for Drupal
jQuery for DrupaljQuery for Drupal
jQuery for Drupal
 
YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
 
jQuery-3-UI
jQuery-3-UIjQuery-3-UI
jQuery-3-UI
 
jQuery-3-UI
jQuery-3-UIjQuery-3-UI
jQuery-3-UI
 
JQuery-Tutorial
 JQuery-Tutorial JQuery-Tutorial
JQuery-Tutorial
 
Microsoft PowerPoint - <b>jQuery</b>-3-UI.pptx
Microsoft PowerPoint - <b>jQuery</b>-3-UI.pptxMicrosoft PowerPoint - <b>jQuery</b>-3-UI.pptx
Microsoft PowerPoint - <b>jQuery</b>-3-UI.pptx
 
YUI open for all !
YUI open for all !YUI open for all !
YUI open for all !
 
An Introduction To The Use Of Widgets in libraries
An Introduction To The Use Of Widgets in librariesAn Introduction To The Use Of Widgets in libraries
An Introduction To The Use Of Widgets in libraries
 
JavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stackJavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stack
 
Toutch Jquery Mobile
Toutch Jquery MobileToutch Jquery Mobile
Toutch Jquery Mobile
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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 AutomationSafe Software
 
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.pptxEarley Information Science
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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...apidays
 
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 MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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 productivityPrincipled Technologies
 
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 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

YUI - HackU 2010 IIT Mumbai

  • 1. 1
  • 2. Using YUI to get things done Natarajan  Kannan Web Developer twitter: @knutties `
  • 4. Overview • YUI is a Javascript/CSS library • Highly modular, extensible and heavily  documented • Lets you do a lot with less code • Very suitable for hacks • Probably the only javascript library that comes  with its own package management 4
  • 5. What can you do with YUI?  • Create websites/templates • Manipulate web pages easily • Fetch data from remote sources • Interact with YQL • Use pre­built UI widgets 5
  • 6. Creating website templates • First task in creating a website – select a layout • YUI CSS grids builder – Interface to create layout – http://developer.yahoo.com/yui/grids/builder/ • Default CSS styling with YUI base 6
  • 7. Manipulate web pages • Locate elements on web pages – Using CSS selectors • Update portions of web pages – By adding/removing/changing content • Change styling of elements – hide/resize/overlay elements 7
  • 8. Examples – Using Simple YUI // get an element reference, add a click handler Y.one('#demo').on('click', function(e) {/*handle  click*/}); // add content to an element Y.one('#demo').append(" Additional content added to  #demo."); // move #demo to the location of any click on the  document Y.one('document').on('click', function(e) {      Y.one('#demo').setXY([e.pageX, e.pageY]); } ); 8
  • 9. Examples – Using Simple YUI // fade #demo off to full opacity, then remove it from  the dom: Y.one('#demo').transition({     easing: 'ease­out',     duration: 2, // seconds     opacity: 0 }, function() {     this.remove(); }); 9
  • 10. Fetch data from remote sources • Allows you to fetch data from different sources – Local functions – Remote sources over http • Helps you work around cross­domain restrictions  • Y.io and Y.DataSource are your friends 10
  • 11. Examples – Using Simple YUI // Make an HTTP request to 'get.php'. Y.io('get.php', {     on: {         complete: function (id, response) {             var id = id, // Transaction ID.                 data = response.responseText; // Response  data.             // ... handle the response ...         }     } }); 11
  • 13. Examples – Using stock YUI 3 YUI().use('yql', function(Y) {       Y.YQL('select * from weather.forecast where  location=90210', function(r) {        // r now contains the result of the YQL Query // use the YQL Developer console to learn // what data is coming back in this object // and how that data is structured.     });   }); 13
  • 14. Using pre­built UI widgets – YUI 3 • YUI 3 (default) – Overlays – Sliders – Tab views – Rich Text Editor • YUI 3 (gallery) – Accordion – Tree view – Resize 14
  • 15. Using pre­built UI widgets – YUI 2 • YUI 2 (default) – Overlays – Sliders – Tab views – Rich Text Editor – Image Cropper – Image loader – Progress bar – Tree view – Charts  – Colour picker 15
  • 16. YUI with Greasemonkey • Greasemonkey lets you add functionality to  existing web pages – http://diveintogreasemonkey.org/ • YUI 3 with greasemonkey – http://blog.davglass.com/files/yui3/greasemonkey/ 16
  • 17. Choosing your YUI • Simple YUI (based on YUI 3) – Start fast – Basic AJAX and DOM manipulation – http://ericmiraglia.com/yui/demos/quickyui.php • YUI 3  – Performance – Sand­boxing • YUI 2  – For its widget collection – If you are already used to it 17
  • 18. Links for you • http://developer.yahoo.com/yui/3/ • http://developer.yahoo.com/yui/3/examples/ • http://yuilibrary.com/gallery/ • http://developer.yahoo.com/yui/2 • http://blog.davglass.com/files/yui3/greasemonkey 18