SlideShare une entreprise Scribd logo
1  sur  24
Hack with Luke Smith @ls_n
YUI exists to build web applications faster
What is YUI? The YUI Library is a set of utilities and controls, written with JavaScript and CSS, for building richly interactive web applications. Open source under the liberal BSD license. Driven by the YUI Team at Yahoo! And contributors around the world. http://yuilibrary.com
What is YUI? 1K new sites every month, among the top 1M sites. “YUI Library is the only other library that is gaining market share.” 	- http://w3techs.com/blog/entry/highlights_of_web_technology_surveys_march_2011
WHO uses YUI? Mint Target LinkedIn Microsoft Google Reuters Walgreens NFL Ford Harley-Davidson Flickr National Geographic Gatorade Duck Duck Go http://yuiblog.com/blog/category/in-the-wild/
Why hack with YUI? ,[object Object]
 Avoid reinventing the wheel
Core: Rock solid DOM manipulation, events, and more
Transition: Rich effects using CSS3
Drag and Drop that works
Gesture Events: Swipe, flicks, and more for touch devices
ScrollView: Scrollable content on mobile and desktop alike,[object Object]
DOM events Y.one("#demo").on(“click”, function (e) { 		/* handle click */	});
Add html Y.one("#demo").append(“<p>I’m new here.</p>”);
Event delegation 	// any click on an <li> inside #demo will trigger Y.one("#demo").delegate(“click”, function (e) { 		/* handle click */ }, “li”);
Move stuff around 	// #demo will move to wherever a click happens Y.one(”document”).on (“click”, function (e) { Y.one(“#demo”).setXY( [ e.pageX, e.pageY ] ); });
Animated transitions 	// Hello HTML5! Y.one(”#demo”).transition({ 		easing: “ease-out”, 		duration: 2, // seconds 		opacity: 0 }, function () {	// callback executed when done this.remove(); 	}); Same API if the browser supports CSS3 transitions or not.
Ajax Y.io(“my.aweso.me/service.php”, { 		on: { 			complete: function (id, response) { var data = Y.JSON.parse(response); 				/* handle response */ 			} 		} 	});
Add more features with Y.use() Y.use(“dd-plugin”, function () { Y.one(“#foo”).plug(Y.Plugin.Drag); 	});
yql Y.use(“yql”, function () { 		function render(res) { Y.one(“#demo”).append( 				“<h2>Weather for “ + zip + “</h2>” + res.query.results.channel.item.description); 		} Y.YQL(“select * from weather.forecast “ + 				“where location=“ + zip, render); 	});
YUI Gallery The YUI of tomorrow, today. ,[object Object]
BSD license
Hosted on Yahoo!’s CDN

Contenu connexe

En vedette

Sebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFREToolsSebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Source Conference
 
YQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationYQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentation
Korben00
 

En vedette (8)

Sebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFREToolsSebastian Porst - Reverse-Engineering Flash Files with SWFRETools
Sebastian Porst - Reverse-Engineering Flash Files with SWFRETools
 
YQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentationYQL - Christian Heilmann Open Hack London presentation
YQL - Christian Heilmann Open Hack London presentation
 
Conférence Net Neutrality
Conférence Net NeutralityConférence Net Neutrality
Conférence Net Neutrality
 
Yahoo BOSS Presentation London Open Hack Day Talk Boss
Yahoo BOSS Presentation London Open Hack Day Talk   BossYahoo BOSS Presentation London Open Hack Day Talk   Boss
Yahoo BOSS Presentation London Open Hack Day Talk Boss
 
Million Browser Botnet
Million Browser BotnetMillion Browser Botnet
Million Browser Botnet
 
Double Dog Dare
Double Dog Dare Double Dog Dare
Double Dog Dare
 
I want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICI want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUIC
 
iBanking - a botnet on Android
iBanking - a botnet on AndroidiBanking - a botnet on Android
iBanking - a botnet on Android
 

Similaire à Hack with YUI

Y hack-china-2013
Y hack-china-2013Y hack-china-2013
Y hack-china-2013
Syu-jhih Wu
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
Tom Croucher
 

Similaire à Hack with YUI (20)

Hack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT KharagpurHack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT Kharagpur
 
yui3 is Sexy - 使用 YUI 3 的 Sexy Part !
yui3 is Sexy - 使用 YUI 3 的 Sexy Part !yui3 is Sexy - 使用 YUI 3 的 Sexy Part !
yui3 is Sexy - 使用 YUI 3 的 Sexy Part !
 
YUI for your Hacks
YUI for your Hacks YUI for your Hacks
YUI for your Hacks
 
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
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
 
Introduction to YUI
Introduction to YUIIntroduction to YUI
Introduction to YUI
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
Intro to jQuery @ Startup Institute
Intro to jQuery @ Startup InstituteIntro to jQuery @ Startup Institute
Intro to jQuery @ Startup Institute
 
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
 
YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU
 
Y hack-china-2013
Y hack-china-2013Y hack-china-2013
Y hack-china-2013
 
Yui intro
Yui introYui intro
Yui intro
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
 
Introduction to YUI - IIT Kharagpur
Introduction to YUI - IIT KharagpurIntroduction to YUI - IIT Kharagpur
Introduction to YUI - IIT Kharagpur
 
jQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda KatzjQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda Katz
 
Build your web apps with yql and yui
Build your web apps with yql and yuiBuild your web apps with yql and yui
Build your web apps with yql and yui
 

Plus de Luke Smith

Inheritance patterns
Inheritance patternsInheritance patterns
Inheritance patterns
Luke Smith
 

Plus de Luke Smith (9)

Promises. The basics, from Promises/A+
Promises. The basics, from Promises/A+Promises. The basics, from Promises/A+
Promises. The basics, from Promises/A+
 
Attribute
AttributeAttribute
Attribute
 
Inheritance patterns
Inheritance patternsInheritance patterns
Inheritance patterns
 
Debugging tips in YUI 3
Debugging tips in YUI 3Debugging tips in YUI 3
Debugging tips in YUI 3
 
YUI 3: Events Evolved
YUI 3: Events EvolvedYUI 3: Events Evolved
YUI 3: Events Evolved
 
YUI 3 quick overview
YUI 3 quick overviewYUI 3 quick overview
YUI 3 quick overview
 
YUI 3: Below the Surface
YUI 3: Below the SurfaceYUI 3: Below the Surface
YUI 3: Below the Surface
 
Yui3
Yui3Yui3
Yui3
 
Front end engineering, YUI Gallery, and your future
Front end engineering, YUI Gallery, and your futureFront end engineering, YUI Gallery, and your future
Front end engineering, YUI Gallery, and your future
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Hack with YUI

  • 1.
  • 2. Hack with Luke Smith @ls_n
  • 3. YUI exists to build web applications faster
  • 4. What is YUI? The YUI Library is a set of utilities and controls, written with JavaScript and CSS, for building richly interactive web applications. Open source under the liberal BSD license. Driven by the YUI Team at Yahoo! And contributors around the world. http://yuilibrary.com
  • 5. What is YUI? 1K new sites every month, among the top 1M sites. “YUI Library is the only other library that is gaining market share.” - http://w3techs.com/blog/entry/highlights_of_web_technology_surveys_march_2011
  • 6. WHO uses YUI? Mint Target LinkedIn Microsoft Google Reuters Walgreens NFL Ford Harley-Davidson Flickr National Geographic Gatorade Duck Duck Go http://yuiblog.com/blog/category/in-the-wild/
  • 7.
  • 9. Core: Rock solid DOM manipulation, events, and more
  • 11. Drag and Drop that works
  • 12. Gesture Events: Swipe, flicks, and more for touch devices
  • 13.
  • 14. DOM events Y.one("#demo").on(“click”, function (e) { /* handle click */ });
  • 16. Event delegation // any click on an <li> inside #demo will trigger Y.one("#demo").delegate(“click”, function (e) { /* handle click */ }, “li”);
  • 17. Move stuff around // #demo will move to wherever a click happens Y.one(”document”).on (“click”, function (e) { Y.one(“#demo”).setXY( [ e.pageX, e.pageY ] ); });
  • 18. Animated transitions // Hello HTML5! Y.one(”#demo”).transition({ easing: “ease-out”, duration: 2, // seconds opacity: 0 }, function () { // callback executed when done this.remove(); }); Same API if the browser supports CSS3 transitions or not.
  • 19. Ajax Y.io(“my.aweso.me/service.php”, { on: { complete: function (id, response) { var data = Y.JSON.parse(response); /* handle response */ } } });
  • 20. Add more features with Y.use() Y.use(“dd-plugin”, function () { Y.one(“#foo”).plug(Y.Plugin.Drag); });
  • 21. yql Y.use(“yql”, function () { function render(res) { Y.one(“#demo”).append( “<h2>Weather for “ + zip + “</h2>” + res.query.results.channel.item.description); } Y.YQL(“select * from weather.forecast “ + “where location=“ + zip, render); });
  • 22.
  • 25. All available from Y.use(“here!”)http://yuilibrary.com/gallery Ratings, paginator, resize, loading mask, inline editing, and lots more.
  • 26.
  • 29.
  • 30.
  • 31. Write once, works on the client and server
  • 32. Our wrapper creates a simulated DOM for youhttp://yuilibrary.com/projects/nodejs-yui3 Easy installation $npm install yui3 See http://npmjs.org
  • 33. YUI Reset, fonts, grids Stylesheets to make your life easier You want to use this. Just drop it in.
  • 34. Reset & fonts Reset CSS makes browser styling consistent. <linkhref=“http://yui.yahooapis.com/3.3.0/build/ cssreset/cssreset-min.css”> Fonts CSS provides typographical normalization, while allowing users to change font size. <linkhref=“http://yui.yahooapis.com/3.3.0/build/ cssfonts/cssfonts-min.css”>
  • 35. CSS grids Simple, flexible, infinitely nestable in 1.2K <linkhref=“http://yui.yahooapis.com/3.3.0/build/ cssgrids/cssgrids-min.css”> Divide into three equalunits <div class=“yui3-g”> <div class=“yui3-u-1-3”></div> <div class=“yui3-u-1-3”></div> <div class=“yui3-u-1-3”></div> </div>
  • 36. Thanks! Luke Smith @ls_n lsmith@yahoo-inc.com @yuilibrary http://developer.yahoo.com/yui/3/