SlideShare a Scribd company logo
JavaScript Libraries
Future of Web Design
NYC08
Karl Swedberg
• Email: karl@learningjquery.com
• Twitter: @kswedberg
• Slides, links, and examples:
training.learningjquery.com
Roseland Ballroom
You can …
Roseland Ballroom
You can …
Be like Glenn
Why Use JavaScript?
• Keep HTML squeaky clean
• User Interaction & immediate feedback
• Server interaction without page refresh
Why Not Use Flash?
• Flash is great!
• You should use it.
• But it’s not the answer to every question,
or the solution to every problem
Why Use a
JavaScript Library?
• Crazy fast development
• Cross-browser solutions without the mess
• Leverage what you already know about
HTML & CSS
• Better CSS support than CSS
(cf. www.quirksmode.org)
Why Use a
JavaScript Library?
• Animation, movement, effects with ease
• Painlessly Unobtrusive
• Encourages Progressive Enhancement
What’s Available?
• Prototype / Scriptaculous
• Dojo Toolkit
• Mootools
• YUI :Yahoo! User Interface
• jQuery
The Big Five:
Prototype
• www.prototypejs.org
• script.aculo.us
• Extensions: scripteka.com
Dojo
• www.dojotoolkit.org
• Dojo Core
• Dijit
• DojoX
Mootools
• mootools.net
• mootorial.com
• Extensions:
• clientcide.com
• mooforum.net
• esteak.net
Yahoo! User Interface
YUI
• developer.yahoo.com/yui
jQuery
• jquery.com
• Plugins: plugins.jquery.com
• jQuery UI: ui.jquery.com
What’s Available?
• Mochikit
• Adobe Spry
• SproutCore
• Cappuccino
• ExtJS
• DOMAssistant
• base2
• DED|Chain
• JavaScriptMVC
• qooxdoo
• midori
• June
• UIZE
• SimpleJS
• fleegix.js
• Foundation
• GWT
• and many more!
Others:
What Can They Do
For Me?
• Find elements on a web page.
• Do something with them.
What Can They Do
For Me?
• Insert, copy, move, remove elements.
• Change their attributes, their appearance.
• Animate them – with slides, fades, scales,
and all manner of movement.
What Can They Do
For Me?
• Incorporate “widgets” (date pickers,
dialogs, data grids, sliders, etc.)
• Send information to the server.
• And receive information from the server.
• And do stuff with that information.
• Help with more “programmery” things.
What Do they look like?
• A lot more familiar than you might expect.
A lot like CSS
• element {} 

 
 
 
 div: <div>
• #id {} 
 
 
 
 
 
 #myid: <h2 id="myid">
• .class {}
 
 
 
 
 .myclass: <p class="myclass">
• selector1, selector2 {} 

 p, a: <p></p><a></a>
• ancestor descendant {} 
 p span: <p><span><span>
• parent > child {}
 
 
 p > span: <p><span><span>
• :nth-child() {}
 
 
 
 li:nth-child(2): <ul><li><li>
http://www.w3.org/TR/css3-selectors/
A lot like CSS
• $('element') 
 
 
 
 
 div: <div>
• $('#id') 
 
 
 
 
 
 #myid: <h2 id="myid">
• $('.class')
 
 
 
 
 
 .myclass: <p class="myclass">
• $('selector1, selector2') 
 
 p, a: <p></p><a></a>
• $('ancestor descendant') 
 
 p span: <p><span><span>
• $('parent > child') 
 
 
 p > span: <p><span><span>
• $(':nth-child()')
 
 
 
 li:nth-child(2): <ul><li><li>
http://docs.jquery.com/Selectors
A lot like real words
$('#myid span')
.addClass('newclass')
.parents('div:first')
.fadeIn('slow')
.find('a')
.click(function() {
confirm('You really wanna go there?');
});
A lot like real words
$('#policy-cta a')
.media({
width: 500,
height: 300,
flashVars: {
autostart: 'true',
controlbar: 'none',
flvPath: '/assets/videos/intro.flv'
}
});
Basic Example 1
Table row striping
• jQuery
$('tr:nth-child(odd)').addClass('alt');
• Mootools
$$('tr:odd').addClass('alt');
• Dojo
dojo.query('tr:nth-child(odd)').addClass('alt');
Basic Example 2
Hover
• Dojo
dojo.query('tr')
.onmouseenter(function(e) {
e.target.className += ' highlight';
})
.onmouseleave(function(e) {
e.target.className = e.target.className
.replace(/ highlight/, '');
});
Basic Example 2
Hover
• Mootools
$$('tr').addEvents({
mouseover: function() {
this.addClass('highlight');
},
mouseout: function() {
this.removeClass('highlight');
}
});
Basic Example 2
Hover
• jQuery
$('tr')
.mouseover(function() {
$(this).addClass('highlight');
})
.mouseout( function() {
$(this).removeClass('highlight');
});
Basic Example 2
Hover
• jQuery
$('tr').hover(function() {
$(this).addClass('highlight');
}, function() {
$(this).removeClass('highlight');
});
Let’s See It
• Demo
How Do I Choose?
• Library Maturity (alpha, beta, number of releases?
Unit tests?)
• Documentation (official, unofficial, online, offline,
books?)
• Community (Forums, Google groups, blogs, IRC,
Twitter? Tone, helpfulness, responsiveness?)
• Project requirements (web site or application?
ajax, effects, events?)
• Performance (benchmarks?)
How Do I Choose?
• Server-side Framework (Does it come bundled
with a JS library?)
• Extensibility (Plugins, widgets, components available
and easy to find? Create your own easily?)
• Style (What does the code look like? Is it easy to
figure out what's going on? Does it look familiar at
all?)
• Commitment to Unobtrusive JavaScript and
Accessibility
• Cost and Licensing (fee? open source? MIT, GNU,
GPL, LGPL, BSD, etc.)
How Do I Get Them?
• Go to their websites
How Do I Get Them?
• Go to their websites
• dojotoolkit.org
• jquery.com
• mootools.net
• prototypejs.org
• developer.yahoo.com/yui
How Do I Get Them?
• Go to the Google AJAX Libraries API
code.google.com/apis/ajaxlibs/
ThankYou!

More Related Content

PDF
Clojurescript slides
PDF
Polyglot and Poly-paradigm Programming for Better Agility
PDF
Functional Programming with Immutable Data Structures
PDF
Why you should be excited about ClojureScript
PPTX
My first powershell script
PDF
Web Development using Ruby on Rails
PPTX
Scalable Open Source
KEY
A web app in pure Clojure
Clojurescript slides
Polyglot and Poly-paradigm Programming for Better Agility
Functional Programming with Immutable Data Structures
Why you should be excited about ClojureScript
My first powershell script
Web Development using Ruby on Rails
Scalable Open Source
A web app in pure Clojure

What's hot (20)

PPTX
How NOT to get lost in the current JavaScript landscape
PDF
Modern javascript
KEY
Becoming a more productive Rails Developer
KEY
Freelancing and side-projects on Rails
PPTX
Be faster then rabbits
PDF
Bringing Interactivity to Your Drupal Site with Node.js Integration
KEY
Irb Tips and Tricks
PDF
CQ5 and Sling overview
PDF
GitBucket: The perfect Github clone by Scala
PDF
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
PDF
Flexible UI Components for a Multi-Framework World
PPTX
In-browser storage and me
PDF
Eureka Moment UKLUG
PDF
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
PDF
Masterin Large Scale Java Script Applications
PDF
Cloud conference - mongodb
PPTX
A tale of 3 databases
KEY
Introducing the Seneca MVP framework for Node.js
PPTX
Web Ninja
PPT
High Availability Perl DBI + MySQL
How NOT to get lost in the current JavaScript landscape
Modern javascript
Becoming a more productive Rails Developer
Freelancing and side-projects on Rails
Be faster then rabbits
Bringing Interactivity to Your Drupal Site with Node.js Integration
Irb Tips and Tricks
CQ5 and Sling overview
GitBucket: The perfect Github clone by Scala
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
Flexible UI Components for a Multi-Framework World
In-browser storage and me
Eureka Moment UKLUG
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
Masterin Large Scale Java Script Applications
Cloud conference - mongodb
A tale of 3 databases
Introducing the Seneca MVP framework for Node.js
Web Ninja
High Availability Perl DBI + MySQL
Ad

Viewers also liked (20)

PDF
Compiladores
PDF
Ficha javacc
PDF
Como Construir um compilador-cap 2
PDF
Trabalho
PDF
Compilers - Using Lex and YACC
PPT
PDF
poscomp-Gabarito ano2010
PDF
[TUTORIAL] PetitParser
PDF
Compilador analise lexica
PDF
Poscomp-Cadernodequestes ano2011
PDF
poscomp-Gabarito ano2011
PPTX
Compilador Web: uma Experiência Interdisciplinar entre as Disciplinas de Enge...
PDF
Instalando o MPLab X e o C18
PDF
Guia: Instalação MPLABX e compilador XC8
PDF
Como Construir um Compilador cap-1
PPT
Gerador de Código-Objeto - Compiladores
PDF
Siglas de sensores e atuadores
PDF
Compilador-Analisador Léxico com FLEX + Linguagem C
PDF
Apostila sensores e atuadores (1)
Compiladores
Ficha javacc
Como Construir um compilador-cap 2
Trabalho
Compilers - Using Lex and YACC
poscomp-Gabarito ano2010
[TUTORIAL] PetitParser
Compilador analise lexica
Poscomp-Cadernodequestes ano2011
poscomp-Gabarito ano2011
Compilador Web: uma Experiência Interdisciplinar entre as Disciplinas de Enge...
Instalando o MPLab X e o C18
Guia: Instalação MPLABX e compilador XC8
Como Construir um Compilador cap-1
Gerador de Código-Objeto - Compiladores
Siglas de sensores e atuadores
Compilador-Analisador Léxico com FLEX + Linguagem C
Apostila sensores e atuadores (1)
Ad

Similar to Javascript Libraries (20)

PPTX
JavaScript!
PDF
Advanced guide to develop ajax applications using dojo
PDF
jQuery for beginners
PPTX
CT presentatie JQuery 7.12.11
PPTX
jQuery
PDF
fuser interface-development-using-jquery
KEY
User Interface Development with jQuery
PPT
PPTX
Unobtrusive javascript with jQuery
PPTX
jQuery - the world's most popular java script library comes to XPages
PDF
Learning jquery-in-30-minutes-1195942580702664-3
KEY
JavaScript For People Who Don't Code
KEY
Week 4 - jQuery + Ajax
PDF
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
PPT
JS Libraries and jQuery Overview
PPT
Introduction to jQuery
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PPTX
Jquery fundamentals
ODP
Jquery- One slide completing all JQuery
JavaScript!
Advanced guide to develop ajax applications using dojo
jQuery for beginners
CT presentatie JQuery 7.12.11
jQuery
fuser interface-development-using-jquery
User Interface Development with jQuery
Unobtrusive javascript with jQuery
jQuery - the world's most popular java script library comes to XPages
Learning jquery-in-30-minutes-1195942580702664-3
JavaScript For People Who Don't Code
Week 4 - jQuery + Ajax
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
JS Libraries and jQuery Overview
Introduction to jQuery
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Jquery fundamentals
Jquery- One slide completing all JQuery

More from elliando dias (20)

PPT
Nomenclatura e peças de container
PDF
Geometria Projetiva
PDF
How to Make an Eight Bit Computer and Save the World!
PDF
Ragel talk
PDF
A Practical Guide to Connecting Hardware to the Web
PDF
Introdução ao Arduino
PDF
Minicurso arduino
PDF
Incanter Data Sorcery
PDF
PDF
Fab.in.a.box - Fab Academy: Machine Design
PDF
The Digital Revolution: Machines that makes
PDF
Hadoop + Clojure
PDF
Hadoop - Simple. Scalable.
PDF
Hadoop and Hive Development at Facebook
PDF
Multi-core Parallelization in Clojure - a Case Study
PDF
From Lisp to Clojure/Incanter and RAn Introduction
PDF
FleetDB A Schema-Free Database in Clojure
PDF
Clojure and The Robot Apocalypse
PDF
Clojure - A new Lisp
PDF
Clojure - An Introduction for Lisp Programmers
Nomenclatura e peças de container
Geometria Projetiva
How to Make an Eight Bit Computer and Save the World!
Ragel talk
A Practical Guide to Connecting Hardware to the Web
Introdução ao Arduino
Minicurso arduino
Incanter Data Sorcery
Fab.in.a.box - Fab Academy: Machine Design
The Digital Revolution: Machines that makes
Hadoop + Clojure
Hadoop - Simple. Scalable.
Hadoop and Hive Development at Facebook
Multi-core Parallelization in Clojure - a Case Study
From Lisp to Clojure/Incanter and RAn Introduction
FleetDB A Schema-Free Database in Clojure
Clojure and The Robot Apocalypse
Clojure - A new Lisp
Clojure - An Introduction for Lisp Programmers

Recently uploaded (20)

PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Cloud computing and distributed systems.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
MYSQL Presentation for SQL database connectivity
PDF
KodekX | Application Modernization Development
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PDF
Advanced Soft Computing BINUS July 2025.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Advanced methodologies resolving dimensionality complications for autism neur...
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Chapter 2 Digital Image Fundamentals.pdf
Transforming Manufacturing operations through Intelligent Integrations
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
Review of recent advances in non-invasive hemoglobin estimation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Cloud computing and distributed systems.
Diabetes mellitus diagnosis method based random forest with bat algorithm
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
NewMind AI Monthly Chronicles - July 2025
Spectral efficient network and resource selection model in 5G networks
MYSQL Presentation for SQL database connectivity
KodekX | Application Modernization Development
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
Advanced Soft Computing BINUS July 2025.pdf

Javascript Libraries

  • 2. Karl Swedberg • Email: [email protected] • Twitter: @kswedberg • Slides, links, and examples: training.learningjquery.com
  • 4. Roseland Ballroom You can … Be like Glenn
  • 5. Why Use JavaScript? • Keep HTML squeaky clean • User Interaction & immediate feedback • Server interaction without page refresh
  • 6. Why Not Use Flash? • Flash is great! • You should use it. • But it’s not the answer to every question, or the solution to every problem
  • 7. Why Use a JavaScript Library? • Crazy fast development • Cross-browser solutions without the mess • Leverage what you already know about HTML & CSS • Better CSS support than CSS (cf. www.quirksmode.org)
  • 8. Why Use a JavaScript Library? • Animation, movement, effects with ease • Painlessly Unobtrusive • Encourages Progressive Enhancement
  • 9. What’s Available? • Prototype / Scriptaculous • Dojo Toolkit • Mootools • YUI :Yahoo! User Interface • jQuery The Big Five:
  • 11. Dojo • www.dojotoolkit.org • Dojo Core • Dijit • DojoX
  • 12. Mootools • mootools.net • mootorial.com • Extensions: • clientcide.com • mooforum.net • esteak.net
  • 13. Yahoo! User Interface YUI • developer.yahoo.com/yui
  • 14. jQuery • jquery.com • Plugins: plugins.jquery.com • jQuery UI: ui.jquery.com
  • 15. What’s Available? • Mochikit • Adobe Spry • SproutCore • Cappuccino • ExtJS • DOMAssistant • base2 • DED|Chain • JavaScriptMVC • qooxdoo • midori • June • UIZE • SimpleJS • fleegix.js • Foundation • GWT • and many more! Others:
  • 16. What Can They Do For Me? • Find elements on a web page. • Do something with them.
  • 17. What Can They Do For Me? • Insert, copy, move, remove elements. • Change their attributes, their appearance. • Animate them – with slides, fades, scales, and all manner of movement.
  • 18. What Can They Do For Me? • Incorporate “widgets” (date pickers, dialogs, data grids, sliders, etc.) • Send information to the server. • And receive information from the server. • And do stuff with that information. • Help with more “programmery” things.
  • 19. What Do they look like? • A lot more familiar than you might expect.
  • 20. A lot like CSS • element {} div: <div> • #id {} #myid: <h2 id="myid"> • .class {} .myclass: <p class="myclass"> • selector1, selector2 {} p, a: <p></p><a></a> • ancestor descendant {} p span: <p><span><span> • parent > child {} p > span: <p><span><span> • :nth-child() {} li:nth-child(2): <ul><li><li> http://www.w3.org/TR/css3-selectors/
  • 21. A lot like CSS • $('element') div: <div> • $('#id') #myid: <h2 id="myid"> • $('.class') .myclass: <p class="myclass"> • $('selector1, selector2') p, a: <p></p><a></a> • $('ancestor descendant') p span: <p><span><span> • $('parent > child') p > span: <p><span><span> • $(':nth-child()') li:nth-child(2): <ul><li><li> http://docs.jquery.com/Selectors
  • 22. A lot like real words $('#myid span') .addClass('newclass') .parents('div:first') .fadeIn('slow') .find('a') .click(function() { confirm('You really wanna go there?'); });
  • 23. A lot like real words $('#policy-cta a') .media({ width: 500, height: 300, flashVars: { autostart: 'true', controlbar: 'none', flvPath: '/assets/videos/intro.flv' } });
  • 24. Basic Example 1 Table row striping • jQuery $('tr:nth-child(odd)').addClass('alt'); • Mootools $$('tr:odd').addClass('alt'); • Dojo dojo.query('tr:nth-child(odd)').addClass('alt');
  • 25. Basic Example 2 Hover • Dojo dojo.query('tr') .onmouseenter(function(e) { e.target.className += ' highlight'; }) .onmouseleave(function(e) { e.target.className = e.target.className .replace(/ highlight/, ''); });
  • 26. Basic Example 2 Hover • Mootools $$('tr').addEvents({ mouseover: function() { this.addClass('highlight'); }, mouseout: function() { this.removeClass('highlight'); } });
  • 27. Basic Example 2 Hover • jQuery $('tr') .mouseover(function() { $(this).addClass('highlight'); }) .mouseout( function() { $(this).removeClass('highlight'); });
  • 28. Basic Example 2 Hover • jQuery $('tr').hover(function() { $(this).addClass('highlight'); }, function() { $(this).removeClass('highlight'); });
  • 30. How Do I Choose? • Library Maturity (alpha, beta, number of releases? Unit tests?) • Documentation (official, unofficial, online, offline, books?) • Community (Forums, Google groups, blogs, IRC, Twitter? Tone, helpfulness, responsiveness?) • Project requirements (web site or application? ajax, effects, events?) • Performance (benchmarks?)
  • 31. How Do I Choose? • Server-side Framework (Does it come bundled with a JS library?) • Extensibility (Plugins, widgets, components available and easy to find? Create your own easily?) • Style (What does the code look like? Is it easy to figure out what's going on? Does it look familiar at all?) • Commitment to Unobtrusive JavaScript and Accessibility • Cost and Licensing (fee? open source? MIT, GNU, GPL, LGPL, BSD, etc.)
  • 32. How Do I Get Them? • Go to their websites
  • 33. How Do I Get Them? • Go to their websites • dojotoolkit.org • jquery.com • mootools.net • prototypejs.org • developer.yahoo.com/yui
  • 34. How Do I Get Them? • Go to the Google AJAX Libraries API code.google.com/apis/ajaxlibs/