SlideShare a Scribd company logo
Y hack-china-2013
INTRODUCE YUI 3
PRESENTER
Name
 John Wu
 吳旭智

Title

Job





Mobile Wretch
Bottle
Mobile Auctions
UWW

 EC CENTRAL MOBILE
 F2E

3
CATALOG
 WHAT IS YUI?
 YUI3 COMPARISON

 CSS IN YUI3
 YUI3 EXTENSION

 COMMUNITY
 Q&A

4
WHAT IS YUI?

5
YUI IS …





Yahoo! User Interface
open source JavaScript and CSS framework
Core maintained by a team of Yahoo engineers
Using on client and server side

 Try it

http://yuilibrary.com/

6
WHAT IS YUI?
Why use YUI?
Modular architecture
Small, fast
Handle X browsers for you

May I use other frameworks?
Yes … for small projects
YUI help you more in a large project: modular
design, i18n, sandbox, plugins…

7
YUI3 COMPARISON

8
YUI3 COMPARISON
Sample Hello World!

9
YUI3 COMPARISON
jQuery code
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script>

$(document).ready(function() {
$("a").click(function(event) {
event.preventDefault();
alert('Hello World!');
});
});
</script>

10
YUI3 COMPARISON
jQuery code
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script>

$(document).ready(function() {
$("a").click(function(event) {
event.preventDefault();
alert('Hello World!');
});
});
</script>

11
YUI3 COMPARISON
jQuery code
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script>

$(document).ready(function() {
$("a").click(function(event) {
event.preventDefault();
alert('Hello World!');
});
});
</script>

12
YUI3 COMPARISON
jQuery code
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script>

$(document).ready(function() {
$("a").click(function(event) {
event.preventDefault();
alert('Hello World!');
});
});
</script>

13
YUI3 COMPARISON
YUI 3 code
<script
src="http://yui.yahooapis.com/3.10.1/build/yui/yuimin.js"></script>

14
YUI3 COMPARISON
YUI 3 code
<script
src="http://yui.yahooapis.com/3.10.1/build/yui/yuimin.js"></script>
<script>
YUI().use('node', 'event', function (Y) {
});
</script>

15
YUI3 COMPARISON
YUI 3 code
<script
src="http://yui.yahooapis.com/3.10.1/build/yui/yuimin.js"></script>
<script>
YUI().use('node', 'event', function (Y) {
Y.one('a').on('click', function (E) {
});
});
</script>
16
YUI3 COMPARISON
YUI 3 code
<script src="http://yui.yahooapis.com/3.10.1/build/yui/yuimin.js"></script>
<script>
YUI().use('node', 'event', function (Y) {
Y.one('a').on('click', function (E) {
E.preventDefault();
alert('Hello World!');
});
});
</script>

17
YUI3 COMPARISON
Sample 2
 Using a module B which needs to require
another module A.

18
YUI3 COMPARISON
jQuery code
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script src="moduleBrequireA.js"></script>
<script>
$(document).ready(function() {
$("a").click(function(event) {
event.preventDefault();
alert('Hello World!');
});
});
</script>

19
YUI3 COMPARISON
jQuery code
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script src="moduleBrequireA.js"></script>
<script>
$(document).ready(function() {
$("a").click(function(event) {
event.preventDefault();
alert('Hello World!');
});
});
</script>

20
YUI3 COMPARISON
jQuery code
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script src="moduleA.js"></script>
<script src="moduleBrequireA.js"></script>
<script>
$(document).ready(function() {
$("a").click(function(event) {
event.preventDefault();
alert('Hello World!');
});
});
</script>

21
YUI3 COMPARISON
YUI 3 code
<script src="http://yui.yahooapis.com/3.10.1/build/yui/yuimin.js"></script>
<script>
YUI().use('node', 'event', 'moduleBrequireA’, function (Y) {
Y.all('a').on('click', function (E) {
E.preventDefault();
alert('Hello World!');
});
});
</script>

22
YUI3 COMPARISON
jQuery vs YUI 3

23
CSS IN YUI3

24
CSS IN YUI3

25
CSS IN YUI3
Reset

26
CSS IN YUI3
Reset
+
Font

27
CSS IN YUI3
Reset
Removes the browser-provided styling for HTML
elements
Fonts
Provide cross-browser typographical normalization and
control (Arial , 13px size , 16px line-height)
Base

Apply a basic cross-browser styling
Grids
Provide a simple system for laying out content

28
YUI3 EXTENSION

29
YUI3 EXTENSION
Javascript modules
Utilities, Extensions
Plugins
Widgets

Dynamic loaded

30
YUI3 EXTENSION
Dynamic
loading

yui-min.js
CORE,
Module System
20.3 K

Dependency
checking

YUI().use()
Browser
specific

Lazy
loading

Module

Module

Module

Module

31
YUI3 EXTENSION
Plugin
Add / remove feature
Simple
Configurable
Y.one(‘#dragdiv’).plug(Y.Plugin.Drag);
Y.all(‘.resize’).plug(Y.Plugin.Resize);

32
YUI3 EXTENSION
Plugin.Align

Plugin.EditorLists

Plugin.Shim

Plugin.AutoComplete

Plugin.EditorPara

Plugin.SortScroll

Plugin.Base

Plugin.EditorParaBase

Plugin.Tree.Lazy

Plugin.Button

Plugin.EditorParaIE

Plugin.WidgetAnim

Plugin.Cache

Plugin.EditorTab

plugin.NodeFocusManager

Plugin.CalendarNavigator

Plugin.ExecCommand

plugin.NodeMenuNav

Plugin.ConsoleFilters

Plugin.Flick

Plugin.CreateLinkBase

Plugin.Host

Plugin.DDConstrained

Plugin.NodeFX

Plugin.DDNodeScroll

Plugin.Pjax

Plugin.DDProxy

Plugin.Resize

Plugin.DDWindowScroll

Plugin.ResizeConstrained

Plugin.DataTableDataSource

Plugin.ResizeProxy

Plugin.Drag

Plugin.ScrollInfo

Plugin.Drop

Plugin.ScrollViewList

Plugin.EditorBR

Plugin.ScrollViewPaginator

Plugin.EditorBidi

Plugin.ScrollViewScrollbars
33
YUI3 EXTENSION
Simple Plugin
<script>
YUI().use('plugin', function (Y) {

});
</script>

34
YUI3 EXTENSION
Simple Plugin
function AnchorPlugin(config) {
this._node = config.host;
}
AnchorPlugin.NS = "anchors”;
AnchorPlugin.prototype = {
disable: function() {
var node = this._node;
var anchors = node.queryAll("a");
anchors.addClass("disabled");
anchors.setAttribute("disabled", true);
}
};

35
YUI3 EXTENSION
Simple Plugin
var container = Y.one("div.actions");
container.plug(AnchorPlugin);
container.anchors.disable();

36
YUI3 EXTENSION
Widgets













AutoComplete
Button
Calendar
Charts
DataTable
Dial
MenuNav Node Plugin
Overlay
Panel
ScrollView
Slider
TabView
YUI3 EXTENSION
Widgets
COMMUNITY

39
COMMUNITY
YUI Gallery
533 modules
COMMUNITY
Contribute
Host on github
Anyone can fork / request push
COMMUNITY

BOTTLE
COMMUNITY
Bottle














Carousel Widget
Container Widget
Device Utility
Loader Widget
Overlay Widget
Page Widget
PhotoGrid Widget
PushPop Widget
ShortCut Widget
SlideTab Widget
SyncScroll Widget
UI Components (testing)
View Widget
COMMUNITY
Bottle


YUI().use(‘gallery-bottle’, function (Y) {
Y.Bottle.init(true);
});



Data-attribute
COMMUNITY
Bottle
COMMUNITY
Bottle
COMMUNITY

http://yuilibrary.com
Q&A

48
THANKS

49

More Related Content

PPTX
jQuery Mobile Introduction ( demo on EZoapp )
PPTX
Utility libraries to make your life easier
PDF
Yui intro
TXT
Xxx
PDF
Campus party mexico the future of the open web
TXT
Comment pages 002
PDF
Criando um componente de busca com AngularJS
PPTX
ChocolateChip-UI
jQuery Mobile Introduction ( demo on EZoapp )
Utility libraries to make your life easier
Yui intro
Xxx
Campus party mexico the future of the open web
Comment pages 002
Criando um componente de busca com AngularJS
ChocolateChip-UI

What's hot (14)

PPT
YUI for your Hacks-IITB
ZIP
YUI 3
PDF
jQuery: Events, Animation, Ajax
PPTX
FuncUnit
PDF
YUI on the go
PPT
Ionic tabs template explained
PDF
So long, jQuery, and thanks for all the fish!
PDF
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍
PPT
Creating the interfaces of the future with the APIs of today
KEY
Seti 09
PPTX
Iac ins vikrant
PDF
Prototype UI
PDF
Netvibes UWA workshop at ParisWeb 2007
PDF
How kris-writes-symfony-apps-london
YUI for your Hacks-IITB
YUI 3
jQuery: Events, Animation, Ajax
FuncUnit
YUI on the go
Ionic tabs template explained
So long, jQuery, and thanks for all the fish!
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍
Creating the interfaces of the future with the APIs of today
Seti 09
Iac ins vikrant
Prototype UI
Netvibes UWA workshop at ParisWeb 2007
How kris-writes-symfony-apps-london

Viewers also liked (20)

PPT
Yahoo! Open Hackday 2013 - Frosted Glass Effect
PPT
如何快速打造慾望牆 Yahoo! 前端開發實錄
PDF
프로세일즈맨의 스마트워크 강의(프레젠테이션) 20131120
PPT
jQuery Loves You
PPTX
咩星征服計劃 用 Js 征服地球
DOCX
17 19 questions and vocab
DOCX
Chapters 1 4 vocab and questions 2013
PPTX
Lesson 1 4 outline power point
PPT
Greece ppt
DOCX
Outline alernative notes
PPTX
Using technology for teaching and learning in the
DOCX
FACTURA EXCEL
PPT
Middle ages ppt
DOCX
Chapter 13 16 vocab and question 2013
PPT
Jerry spinelli ppt
DOCX
A new god or goddess project
PPTX
咩星征服計劃 用 Js 征服地球 Part II
PPTX
Career pilot
PPTX
jQuery mobile vs Twitter bootstrap
DOC
Chapter 5 8 vocab and questions 2013
Yahoo! Open Hackday 2013 - Frosted Glass Effect
如何快速打造慾望牆 Yahoo! 前端開發實錄
프로세일즈맨의 스마트워크 강의(프레젠테이션) 20131120
jQuery Loves You
咩星征服計劃 用 Js 征服地球
17 19 questions and vocab
Chapters 1 4 vocab and questions 2013
Lesson 1 4 outline power point
Greece ppt
Outline alernative notes
Using technology for teaching and learning in the
FACTURA EXCEL
Middle ages ppt
Chapter 13 16 vocab and question 2013
Jerry spinelli ppt
A new god or goddess project
咩星征服計劃 用 Js 征服地球 Part II
Career pilot
jQuery mobile vs Twitter bootstrap
Chapter 5 8 vocab and questions 2013

Similar to Y hack-china-2013 (20)

PDF
yui3 is Sexy - 使用 YUI 3 的 Sexy Part !
KEY
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
PPT
Jquery ui
PPTX
Hack with YUI
PDF
lecture5
PDF
lecture5
PPT
JS Loading strategies
PPTX
jQuery Ecosystem
PDF
jQuery UI and Plugins
PDF
Liferay UI (R)evolution
PPTX
YUI for your Hacks
PPTX
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
PPTX
Starting with jQuery
PDF
jQuery in the [Aol.] Enterprise
PPT
SEA Open Hack - YAP
PPTX
jQuery for web development
PDF
HTML5 and Mobile
PDF
WebGUI Developers Workshop
PDF
Vaadin 7 CN
PDF
Making your site mobile-friendly - DevCSI Reading 21.07.2010
yui3 is Sexy - 使用 YUI 3 的 Sexy Part !
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
Jquery ui
Hack with YUI
lecture5
lecture5
JS Loading strategies
jQuery Ecosystem
jQuery UI and Plugins
Liferay UI (R)evolution
YUI for your Hacks
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
Starting with jQuery
jQuery in the [Aol.] Enterprise
SEA Open Hack - YAP
jQuery for web development
HTML5 and Mobile
WebGUI Developers Workshop
Vaadin 7 CN
Making your site mobile-friendly - DevCSI Reading 21.07.2010

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Empathic Computing: Creating Shared Understanding
PPTX
sap open course for s4hana steps from ECC to s4
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
MIND Revenue Release Quarter 2 2025 Press Release
Empathic Computing: Creating Shared Understanding
sap open course for s4hana steps from ECC to s4
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MYSQL Presentation for SQL database connectivity
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
Chapter 3 Spatial Domain Image Processing.pdf
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology

Y hack-china-2013

Editor's Notes

  • #2: 首先不免俗的,歡迎大家來參加Yahoo北研的Hack day
  • #3: 接下來講的是一個比較輕鬆的section,了解YUI3
  • #4: 那我先自我介紹一下,我叫吳旭智,大家可以叫我John,目前是在Yahoo Taiwan EC central mobile team裡擔任F2E的工作,目前已經生出來且還在線上的小孩包括手機版無名小站、Bottle、手機版拍賣,以及慾望牆。
  • #5: 好!我們來介紹一下這一節的catalog,首先是yui淺談、yui3與jQuery的比較、YUI3對CSS的support、yui3的extension,以及community的部份。
  • #6: Ok,那我們來進入第一個主題,什麼是yui?
  • #7: Yui就是…. Yahoo! User Interfacelibrary ,他是一個開放的js與css的framework,那她主要是由一群yahoo的工程師來進行核心維護的工作。而且yui目前也不僅運用在client上,因為node.js的興起,Yahoo在以node.js為基礎的server端framework mojito上,也大量的使用了作為js核心的一個部分。