SlideShare a Scribd company logo
1 of 11
Rapid Implementation with
YUI + YQL
‘cause it’s your code that’s
important
Me.
YUI
• 2
• Around for a while
• Many widgets
• Adding scripts
manually
• Bigger initial load time
• 3
• Small loader, pull in
the modules you need
• Granular
• Fewer “native”
widgets
• Gallery
2-in-3: best of both!
YQL
• Cloud data store
• SQL-like syntax (select * from internet)
• REST
• YUI3 module built in
• Console
Puppies!
<html>
<head>
<title>YUI/YQL Flickr</title>
</head>
<body>
<div id="puppyBox">
<ul id="puppies"></ul>
</div>
</body>
</html>
http://www.flickr.com/photos/archangel_raphael/
http://www.flickr.com/photos/fazen/
<body class="yui3-skin-sam">
<div id="puppyBox">
<ul id="puppies"></ul>
</div>
<script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-
min.js"></script>
<script>
YUI().use('console', function(Y) {
new Y.Console().render();
});
</script>
</body>
<script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-
min.js"></script>
<script>
YUI().use('yql', 'console', 'dump', function(Y) {
new Y.Console().render();
Y.YQL('select * from flickr.photos.search(0,15) where
text="puppy"', function(r) {
Y.each(r.query.results.photo, function(photo) {
puppy = Y.log('<li><img src="' + Y.dump(photo) +
‘" height="75" width="75"></li>');
});
});
});
</script>
YUI().use('node', 'yql', 'substitute', function(Y) {
var flickr = {
template:
'http://farm{farm}.static.flickr.com/{server}/{id}_{secret}_s.jpg',
createLink: function(pieces) {
return(Y.substitute(this.template, pieces));
},
};
Y.YQL('select * from flickr.photos.search(0,15) where text="puppy"',
function(r) {
var puppies = Y.one('#puppies');
Y.each(r.query.results.photo, function(photo) {
puppy = Y.Node.create('<li><img src="'
+ flickr.createLink(photo) + '" height="75" width="75"></li>');
puppies.appendChild(puppy);
});
});
});
YUI().use('node', 'yql', 'substitute', function(Y) {
var flickr = {
template:
'http://farm{farm}.static.flickr.com/{server}/{id}_{secret}_s.jpg',
createLink: function(pieces) {
return(Y.substitute(this.template, pieces));
},
createCarousel: function() {
Y.use('yui2-carousel', function(YC) {
var YAHOO = YC.YUI2,
carousel = new YAHOO.widget.Carousel("puppyBox", {
selectOnScroll: false,
isCircular: true,
carouselEl: 'UL' });
carousel.render();
carousel.show();
});
}
};
….
<html>
<head>
<title>YUI/YQL Flickr</title>
<style type="text/css">
.yui-carousel-element li { height: 75px; width: 75px; }
.yui-carousel-element .yui-carousel-item-selected
{ border: none; }
</style>
</head>
<body class="yui3-skin-sam">
<div class="yui-skin-sam">
<div id="puppyBox">
<ul id="puppies"></ul>
</div>
</div>
<script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>
<script>
YUI().use('node', 'yql', 'substitute', 'console', function(Y) {
…
Y.YQL('select * from flickr.photos.search(0,15) where text="puppy"',
function(r) {
var puppies = Y.one('#puppies');
Y.each(r.query.results.photo, function(photo) {
puppy = Y.Node.create('<li><img src="'
+ flickr.createLink(photo) + '" height="75" width="75"></li>');
puppies.appendChild(puppy);
});
flickr.createCarousel();
});
});
</script>

More Related Content

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Recently uploaded (20)

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Rapid implementation with YUI + YQL

  • 1. Rapid Implementation with YUI + YQL ‘cause it’s your code that’s important
  • 2. Me.
  • 3. YUI • 2 • Around for a while • Many widgets • Adding scripts manually • Bigger initial load time • 3 • Small loader, pull in the modules you need • Granular • Fewer “native” widgets • Gallery 2-in-3: best of both!
  • 4. YQL • Cloud data store • SQL-like syntax (select * from internet) • REST • YUI3 module built in • Console
  • 5. Puppies! <html> <head> <title>YUI/YQL Flickr</title> </head> <body> <div id="puppyBox"> <ul id="puppies"></ul> </div> </body> </html> http://www.flickr.com/photos/archangel_raphael/ http://www.flickr.com/photos/fazen/
  • 6. <body class="yui3-skin-sam"> <div id="puppyBox"> <ul id="puppies"></ul> </div> <script src="http://yui.yahooapis.com/3.2.0/build/yui/yui- min.js"></script> <script> YUI().use('console', function(Y) { new Y.Console().render(); }); </script> </body>
  • 7. <script src="http://yui.yahooapis.com/3.2.0/build/yui/yui- min.js"></script> <script> YUI().use('yql', 'console', 'dump', function(Y) { new Y.Console().render(); Y.YQL('select * from flickr.photos.search(0,15) where text="puppy"', function(r) { Y.each(r.query.results.photo, function(photo) { puppy = Y.log('<li><img src="' + Y.dump(photo) + ‘" height="75" width="75"></li>'); }); }); }); </script>
  • 8. YUI().use('node', 'yql', 'substitute', function(Y) { var flickr = { template: 'http://farm{farm}.static.flickr.com/{server}/{id}_{secret}_s.jpg', createLink: function(pieces) { return(Y.substitute(this.template, pieces)); }, }; Y.YQL('select * from flickr.photos.search(0,15) where text="puppy"', function(r) { var puppies = Y.one('#puppies'); Y.each(r.query.results.photo, function(photo) { puppy = Y.Node.create('<li><img src="' + flickr.createLink(photo) + '" height="75" width="75"></li>'); puppies.appendChild(puppy); }); }); });
  • 9. YUI().use('node', 'yql', 'substitute', function(Y) { var flickr = { template: 'http://farm{farm}.static.flickr.com/{server}/{id}_{secret}_s.jpg', createLink: function(pieces) { return(Y.substitute(this.template, pieces)); }, createCarousel: function() { Y.use('yui2-carousel', function(YC) { var YAHOO = YC.YUI2, carousel = new YAHOO.widget.Carousel("puppyBox", { selectOnScroll: false, isCircular: true, carouselEl: 'UL' }); carousel.render(); carousel.show(); }); } }; ….
  • 10. <html> <head> <title>YUI/YQL Flickr</title> <style type="text/css"> .yui-carousel-element li { height: 75px; width: 75px; } .yui-carousel-element .yui-carousel-item-selected { border: none; } </style> </head> <body class="yui3-skin-sam"> <div class="yui-skin-sam"> <div id="puppyBox"> <ul id="puppies"></ul> </div> </div>
  • 11. <script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script> <script> YUI().use('node', 'yql', 'substitute', 'console', function(Y) { … Y.YQL('select * from flickr.photos.search(0,15) where text="puppy"', function(r) { var puppies = Y.one('#puppies'); Y.each(r.query.results.photo, function(photo) { puppy = Y.Node.create('<li><img src="' + flickr.createLink(photo) + '" height="75" width="75"></li>'); puppies.appendChild(puppy); }); flickr.createCarousel(); }); }); </script>