JavaScript Library Overview

jeresig
JavaScript Libraries
   John Resig - October 2008
         http://ejohn.org/
    http://twitter.com/jeresig/
Question: How do you want
   to write JavaScript?
1) Plug-and-Play

• Drop in a “calendar widget” or “tabbed
  navigation”
• Little, to no, JavaScript experience required.
• Just customize some options and go.
• No flexibility.
2) Some Assembly
         Required
• Write common utilities
 • Click a link, load a page via Ajax
 • Build a dynamic menu
 • Creating interactive forms
• Use pre-made code to distance yourself
  from browser bugs.
• Flexible, until you hit a browser bug.
3) Down-and-Dirty

• Write all JavaScript code from scratch
• Deal, directly, with browser bugs
• Quirksmode.org is your lifeline
• Excessively flexible, to the point of
  hinderance.
What we’ve just seen...

• Widgets
• Libraries
• Raw JavaScript
What we’ve just seen...

• Widgets
• Libraries
• Raw JavaScript
Why use a library?

• Makes JavaScript bearable
• Gets the job done fast
• Simplifies cross-browser support
• Sort of like C stdlib - no one just codes all
  of C by hand
What kind of libraries exist?
           Open Source       Commercial
                                Atlas
Client/      AjaxCFC
                             Backbase for
Server        Qcodo
                                Struts

        Prototype, jQuery,
Browser                       Backbase
         Yahoo UI, Dojo,
 Only                        SmartClient
            Mootools
What kind of libraries exist?
           Open Source       Commercial
                                Atlas
Client/      AjaxCFC
                             Backbase for
Server        Qcodo
                                Struts

        Prototype, jQuery,
Browser                       Backbase
         Yahoo UI, Dojo,
 Only                        SmartClient
            Mootools
Open Source Libraries
           Browser Only      Client/Server
           Scriptaculous
 Task                          AjaxCFC
              moo.fx
Specific                         Qcodo
            Open Rico

        Prototype, jQuery,
General                      Ruby on Rails
         Yahoo UI, Dojo,
Purpose                       CakePHP
            Mootools
Open Source Libraries
           Browser Only      Client/Server
           Scriptaculous
 Task                          AjaxCFC
              moo.fx
Specific                         Qcodo
            Open Rico

        Prototype, jQuery,
General                      Ruby on Rails
         Yahoo UI, Dojo,
Purpose                       CakePHP
            Mootools
Why these libraries?
March
  Developer Survey
jQuery   Prototype        Yahoo UI    Dojo                   Mootools
Other



                               18%

         34%


                                     18%


             8%
                     8%       13%
                                           http://ajaxian.com/archives/nitobi-survey-results-on-ajax-
                                           development
Google Trends
                                                                                                                       jQuery


                                                                                                                      Prototype

                                                                                                                      Mootools
                                                                                                                      Dojo
                                                                                                                      Yahoo UI



http://google.com/trends?q=prototype+javascript%2C+jquery+javascript%2C+yui+javascript%2C+dojo+javascript&ctab=0&geo=all&date=all&sort=0
Not Included

• (Besides obvious time constraints.)
• ExtJS - Closed development
• ASP.NET Ajax - Mostly .NET developers
• GWT - Strictly limited to Java developers
The Libraries
Prototype
Prototype: Overview

• Started March 2005 by Sam Stephenson
• Incredibly popular, tied with Ruby on Rails’
  popularity
• Development backed by 37 Signals
Prototype: Focus

• Improving the usability of the JavaScript
  language
• Big emphasis on adding in ‘missing’
  JavaScript features
• Clean structure, clean objects and ‘classes’
Prototype: Details

• Code quality is fantastic, great features
• All animations (and interactions) are in
  Scriptaculous
• Looking at Prototype 1.6.0.2
• 1.6.0.3/1.6.1 release upcoming
jQuery
jQuery: Overview

• Released January 2006 by John Resig
• Rapid rise in popularity
• Many developers across the globe
• Corporate backing (Microsoft, Nokia)
jQuery: Focus

• Improving the interaction between
  JavaScript and HTML
• Highly-effective, short, code
• Looking at jQuery 1.2.6
• 1.3 release upcoming
Yahoo! UI
YUI: Overview

• Released Feb 2006 by Yahoo!
• Maintained and financed internally
• Attempt to standardize internal JavaScript
YUI: Focus
• Exposing, and solving, common
  methodologies
• Looking for common idioms (Drag-and-
  Drop, Calendar, Auto-Complete)
• Yahoo UI 2.5.1 is current
• Looking at 3.0 today (large overhaul)
Dojo
Dojo: Overview

• Started early 2005 by Alex Russell + Co.
• Large development community
• Corporate backing (IBM, AOL)
Dojo: Focus
• Building complete web applications
• A package hierarchy, e.g.:
  dojo.addClass( ... )
• Focus has transcended into widgets (Dijit)
• Huge number of features
• Today we’re looking at Dojo 1.1.1
• 1.2 coming soon
Mootools
Mootools: Overview

• Released Sept 2006 by Valerio Proietti
• A spiritual fork of Prototype that included
  animations, drag and drop, etc.
  • (Borrowed concepts like native
    prototype extension and classical object
    construction.)
• Has evolved dramatically since then
Mootools: Focus

• A clean classical structure
• A more holistic approach to development
• Tackle a solid core set of functionality
• Include a couple core plugins
• Looking at 1.2
What should a library have?
Code Base
• Core Functionality
 • DOM
 • Events
 • Ajax
 • Animations
• User Interface Widgets
Development

• Good Architecture
• Open Licensing
• Wide Browser Support
• Small File Size
Project

• Development Team (Open, Funded)
• Code in SVN / Bug Tracker
• Good Unit Test Coverage
Documentation

• Full API Coverage
• Plenty of Tutorials
• Some Books
• Wide variety of Demos
Community

• Active Mailing List / Forum
• Support and Training
• Popularity
Most Important
        Question:
• Does the JavaScript library help me to
  write JavaScript.
• The style of the library and its API is very
  core to this.
• Can really only be determined through
  sitting down and playing with a library.
Code Base
• Core Functionality
 • DOM
 • Events
 • Ajax
 • Animations
• User Interface Widgets
Core Functionality
• Bare minimum needed to make a dynamic
  “Ajax” web site:
 • DOM (Traversal and Manipulation)
 • Events
 • Ajax
 • Animations
DOM

• Traversal
 • Using CSS selectors to locate elements
• Modification
 • Create/remove/modify elements
 • Having a DOM builder is important
DOM Traversal

•   Prototype, Mootools:
    $$(“table > tr”)

•   jQuery:
    $(“div > p:nth-child(odd)”)

•   Dojo:
    dojo.query(“table tr:nth-child(even)”)

•   Yahoo UI:
    Y.get('div p')
DOM Modification

•   Prototype:
    $(“list”).insert(“<li>Another item</li>”);

•   jQuery:
    $(“#li”).append(“<li>An item</li>”);

•   Mootools:
    $(“li”).append(new Element(“li”, {html: “An item”}));
DOM Manipulation

•   Dojo:
    dojo.query(“#li”).addContent(“<li>An item</li>”);

•   Yahoo UI:
    Y.get(“#li”).appendChild(
       Y.create(“<li>An item</li>”));
Events
•   Support for simple event binding/removal
•   Support for custom events is essential
•   Prototype:
    $$(“#button”).invoke(“observe”, ”click”, function(){
        alert(“Thanks for the click!”);
    });

•   jQuery:
    $(“div”).click(function(){
        alert(“div clicked”);
    });
Events (cont.)
•   Yahoo UI:
    Y.get(“#list”).on(“click”, function(){
        alert(“List Clicked”);
    });

•   Dojo:
    dojo.query(quot;#mylinkquot;).connect(quot;clickquot;, function(){
        alert(“Link clicked”);
    });

•   Mootools:
    $$(quot;#mylinkquot;).addEvent(quot;clickquot;, function(){
        alert(“Link clicked”);
    });
Ajax
•   Request and load remote documents

•   Prototype:
    new Ajax.Request(“test.html”, {
        method: “GET”,
        onComplete: function(res){
          $$(‘#results’).invoke(“update”,( res.responseText );
        }
    });

•   jQuery:
    jQuery.get(“test.html”, function(html){
      $(“#results”).html( html );
    });
Ajax (cont.)
•   Yahoo UI
    Y.on(“io:complete”, function(id, data){
     Y.get(“#results”).set(“innerHTML”, data.responseText);
    });
    Y.io(“test.html”);

•   Dojo
    dojo.xhrGet({
      url: quot;test.htmlquot;,
      load: function(type, data) {
        dojo.query(“#results”).empty().addContent( data );
      }
    });
Ajax (cont.)


• Mootools: onComplete: function(t, e, html){
  new Request.HTML({
    $$(“#results”).html( html );
  }}).get('myPage.html');
Ajax (cont.)
• jQuery and Mootools are capable of doing
  DOM traversing over XML
• jQuery.get(“test.xml”, function(xml){
        $(“user”, xml).each(function(){
            $(“<li/>”).text( $(this).text() )
               .appendTo(“#userlist”);
        });
  });
Animations

• Simple animations (hide/show/toggle)
• Provide elegant transitions
• Prototype, using Scriptaculous:
  $(‘menu’).appear({duration: 0.6});

• jQuery:
  $(“#menu”).animate({opacity: 1}, 600);
Animations (cont.)

•   Yahoo UI:
    new Y.Anim({ node: “#list”, duration: 600, {
     to: {opacity: 1}}}).run();

•   Dojo:
    dojo.query(“#list”).anim({opacity: 1}, 600);

•   Mootools:
    new Fx.Tween(“list”, {duration: 600}).start(“opacity”, 0, 1);
Core Feature Summary
            DOM Events   Anim.   Ajax
Prototype    X     X       /      X
 jQuery      X     X      X       X
Yahoo UI     X     X      X       X
  Dojo       X     X      X       X
Mootools     X     X      X       X
User Interface Widgets

• Difficult to implement components, made
  easy
• Commonly used, save duplication
• Some common components:
  Drag & Drop, Tree, Grid, Modal Dialog,
  Tabbed Pane, Menu / Toolbar, Datepicker,
  Slider
User Interface Packages
• Only looking at officially-supported code:
 • Prototype has Scriptaculous
 • jQuery has jQuery UI
 • Dojo has Dijit
 • Mootools includes some in Core
 • Included in Yahoo UI
Drag & Drop


• Drag an item from one location and drop in
  an other
• Supported by all libraries
Tree

•   A navigable hierarchy
    (like a folder/file
    explorer)

•   In Dojo and Yahoo UI
Grid


• An advanced table (resizable, editable, easily
  navigable)
• In Dojo and Yahoo UI
Modal Dialog


• Display confined content (usually drag &
  droppable) and confirmation dialogs
• In Dojo,Yahoo UI, and jQuery
Tabbed Pane


• Multiple panes of content navigable by a
  series of tabs
• In Dojo,Yahoo UI, and jQuery
Menu / Toolbar


• A list of navigable items (with sub-menus)
• In Dojo and Yahoo UI
Datepicker

•   An input for selecting a
    date (or a range of
    dates)

•   In Dojo,Yahoo UI, and
    jQuery
Slider


• A draggable input for entering a general,
  numerical, value
• In all libraries
Tons More!
• Color Picker (Dojo,YUI, jQuery)
• Layout (Dojo,YUI)
• Auto Complete (Dojo, Proto,YUI, jQuery)
• Selectables (Dojo, Proto, jQuery)
• Accordion (Dojo, jQuery, Mootools)
• WYSIWYG (Dojo,YUI)
Themeing

• A consistent look-and-feel for widgets
• jQuery,Yahoo UI, and Dojo provide
  themeing capabilities
• jQuery’s and Yahoo UI’s are documented
Accessibility
• Taking in to consideration points from
  ARIA (Accessible Rich Internet
  Applications)
• Dojo is taking a solid lead, here
• jQuery received funding and is working on
  ARIA integration to jQuery UI
• Yahoo is investigating ARIA
Development

• Good Architecture
• Open Licensing
• Wide Browser Support
• Small File Size
• Speed
Architecture
• Bottom Up (Prototype, jQuery)
    vs. Top Down (Dojo,Yahoo UI)
• jQuery, Dojo, and Yahoo UI all use a single
  namespace
• Prototype extends native objects (high
  likelihood of inter-library conflict)
• jQuery is extensible with plugins
• Dojo uses a package system
Licensing

• All use liberal licenses
• MIT: (“Keep my name on the file”)
  Prototype, jQuery, Mootools
• BSD: (“...and please don’t sue me.”)
  Yahoo UI, Dojo
Browser Support

• Everyone supports:
  IE 6+, Firefox 2+, Safari 3+, Opera 9+
• Note:
 • Most are in the process of dropping
    support for Safari 2
File Size
 • Serving your JavaScript minified + Gzipped
 • Optimal level of compression and speed
 • Core file size (in KB):
35.00

26.25

17.50

 8.75

   0
        Prototype jQuery   Yahoo UI   Dojo   Mootools
Speed
• Hard to quantify
• Currently the only point of comparison is
  in CSS Selectors
 • Speed varies across browsers
 • Competition is strong (much faster than
    what they use to be)
• DOM Modification, Events completely un-
  compared
Project

• Development Team (Open, Funded)
• Code in SVN / Bug Tracker
• Good Unit Test Coverage
Development Team

• Prototype, jQuery, Mootools, and Dojo all
  have open development (anyone can
  contribute)
• jQuery,Yahoo UI, and Dojo all have paid,
  full-time, developers working on the code
• All have paid, part-time, developers
SVN / Bug Tracker

• Prototype, jQuery, Mootools, and Dojo all
  have code in a public SVN repositories
• Yahoo UI’s development is private and is
  limited to Yahoo employees
  • They’re working to fix this!
• All have a public bug tracker
Unit Tests
• All libraries have some automated unit
  tests
• jQuery,Yahoo UI, and Dojo all have public
  unit test URLs
• jQuery and Dojo have tests that can run in
  Rhino
• UI Testing: Windmill,Yahoo UI, jQuery UI’s
  testing framework
Documentation

• Full API Coverage
• Plenty of Tutorials
• Some Books
• Wide variety of Demos
API Documentation

• Prototype, jQuery, Mootools, and Yahoo UI
  all have full coverage
• Dojo’s coverage has improved dramatically
• jQuery provides runnable examples with
  each API item
Tutorials
• All libraries provide some tutorials
• jQuery,Yahoo UI, and Dojo have
  screencasts/presentations
• Prototype: 6
• jQuery: 118 (English)
• Yahoo UI: 30+ (each component has at
  least one)
• Dojo: 24
Books
• Prototype:
 •   Prototype and Scriptaculous in Action (Manning)

 •   Prototype and Scriptaculous (Pragmatic)

• jQuery:
 •   Learning jQuery (Packt)

 •   jQuery Reference Guide (Packt)

• Yahoo UI:
 • Learning the Yahoo UI Library (Packt)
Books (cont.)
• Dojo:
 • Dojo: The Definitive Guide (O’Reilly)
 • Mastering Dojo (Prag Prog)
 • Dojo (Developer’s Library)
 • Practical Dojo Projects (Apress)
• Mootools:
 • Mootools Essentials (Apress)
Demos
• Yahoo UI provides a considerable number
  of live demos and examples for all features
• jQuery provides live examples and a few
  demo applications
• Mootools provides a large number of
  demos
• Dojo provides demo applications for their
  widgets
Community

• Active Mailing List / Forum
• Support and Training
• Popularity
Mailing List / Forum
• Prototype, jQuery, Mootools, and Yahoo UI
  have mailing lists
 • Prototype: 32 posts/day
 • jQuery: 116 posts/day
 • Yahoo UI: 55 posts/day
 • Mootools: 21 posts/day
• Dojo has an active forum
• Mootools also has a user-built forum
Support and Training

• Dojo provides paid support and training
  (via Sitepen)
• jQuery provides paid jQuery UI support
  and training (via Liferay)
Popularity
• Who uses what:
 • Prototype: Apple, ESPN, CNN, Fox News
 • jQuery: Google, IBM, Microsoft, Nokia
 • Yahoo:Yahoo, LinkedIn, Target, Slashdot
 • Dojo: IBM, AOL, Mapquest, Bloglines
 • Mootools: W3C, CNet,Vimeo, Jeep
Common Questions
Why don’t the libraries
      merge?
• It’s really hard to have a unified backend
• Everyone fixes different bugs
• Everyone implements *slightly* different
  features
• A combined library would be massive
Can common
components be made?

• Possibly.
• Again hit the problem of finding the correct
  mix of features and bugs.
• Component would have to be very special.
Sizzle

• Build common features
• A common selector engine
• Being integrated into:
  jQuery, Prototype, and MochiKit
Why not make a unified
        API?

• A library’s API helps makes it unique
• Embody different philosophies
• Combining all of them and trying to please
  everyone creates a unified, boring, mess
More Information
      ... questions?
• Prototype:
  http://prototypejs.org/
• jQuery:
  http://jquery.com/
• Yahoo UI:
  http://developer.yahoo.com/yui/
• Dojo:
  http://dojotoolkit.org/
1 of 94

Recommended

jQuery Internals + Cool Stuff by
jQuery Internals + Cool StuffjQuery Internals + Cool Stuff
jQuery Internals + Cool Stuffjeresig
6.1K views37 slides
MVC pattern for widgets by
MVC pattern for widgetsMVC pattern for widgets
MVC pattern for widgetsBehnam Taraghi
3.5K views13 slides
State of jQuery '08 by
State of jQuery '08State of jQuery '08
State of jQuery '08jeresig
6.1K views24 slides
JavaScript Libraries (@Media) by
JavaScript Libraries (@Media)JavaScript Libraries (@Media)
JavaScript Libraries (@Media)jeresig
2.6K views89 slides
JavaScript Libraries (Kings of Code) by
JavaScript Libraries (Kings of Code)JavaScript Libraries (Kings of Code)
JavaScript Libraries (Kings of Code)jeresig
2.2K views83 slides
Starting with jQuery by
Starting with jQueryStarting with jQuery
Starting with jQueryAnil Kumar
1.7K views39 slides

More Related Content

What's hot

JavaScript Library Overview by
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overviewjeresig
30.7K views83 slides
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 by
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Jeado Ko
2.2K views64 slides
[FEConf Korea 2017]Angular 컴포넌트 대화법 by
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법Jeado Ko
2.4K views73 slides
The jQuery Library by
The  jQuery LibraryThe  jQuery Library
The jQuery LibraryLearnNowOnline
789 views202 slides
React django by
React djangoReact django
React djangoHeber Silva
252 views27 slides
Mobile App Development: Primi passi con NativeScript e Angular 2 by
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Filippo Matteo Riggio
743 views35 slides

What's hot(20)

JavaScript Library Overview by jeresig
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overview
jeresig30.7K views
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 by Jeado Ko
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko2.2K views
[FEConf Korea 2017]Angular 컴포넌트 대화법 by Jeado Ko
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
Jeado Ko2.4K views
Mobile App Development: Primi passi con NativeScript e Angular 2 by Filippo Matteo Riggio
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
Reactive Type-safe WebComponents by Martin Hochel
Reactive Type-safe WebComponentsReactive Type-safe WebComponents
Reactive Type-safe WebComponents
Martin Hochel719 views
Pengenalan AngularJS by Edi Santoso
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJS
Edi Santoso405 views
Creating the interfaces of the future with the APIs of today by gerbille
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of today
gerbille8K views
Reactive Type safe Webcomponents with skateJS by Martin Hochel
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJS
Martin Hochel586 views
Netvibes UWA workshop at ParisWeb 2007 by Netvibes
Netvibes UWA workshop at ParisWeb 2007Netvibes UWA workshop at ParisWeb 2007
Netvibes UWA workshop at ParisWeb 2007
Netvibes1.3K views
jQuery and_drupal by BlackCatWeb
jQuery and_drupaljQuery and_drupal
jQuery and_drupal
BlackCatWeb352 views
Basic Tutorial of React for Programmers by David Rodenas
Basic Tutorial of React for ProgrammersBasic Tutorial of React for Programmers
Basic Tutorial of React for Programmers
David Rodenas530 views
jQuery in the [Aol.] Enterprise by Dave Artz
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
Dave Artz6K views
Sane Async Patterns by TrevorBurnham
Sane Async PatternsSane Async Patterns
Sane Async Patterns
TrevorBurnham14.6K views
An Event Apart Boston: Principles of Unobtrusive JavaScript by Peter-Paul Koch
An Event Apart Boston: Principles of Unobtrusive JavaScriptAn Event Apart Boston: Principles of Unobtrusive JavaScript
An Event Apart Boston: Principles of Unobtrusive JavaScript
Peter-Paul Koch1.5K views

Similar to JavaScript Library Overview

JavaScript Library Overview (Ajax Exp West 2007) by
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)jeresig
1.4K views62 slides
How to make Ajax Libraries work for you by
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for youSimon Willison
1.4K views51 slides
JavaScript Libraries (Ajax Exp 2006) by
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
3.1K views62 slides
Jquery by
JqueryJquery
JqueryMomentum Design Lab
727 views9 slides
jQuery - the world's most popular java script library comes to XPages by
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesMark Roden
7.8K views43 slides
Google App Engine Java, Groovy and Gaelyk by
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
45.8K views85 slides

Similar to JavaScript Library Overview(20)

JavaScript Library Overview (Ajax Exp West 2007) by jeresig
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)
jeresig1.4K views
How to make Ajax Libraries work for you by Simon Willison
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
Simon Willison1.4K views
JavaScript Libraries (Ajax Exp 2006) by jeresig
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
jeresig3.1K views
jQuery - the world's most popular java script library comes to XPages by Mark Roden
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
Mark Roden7.8K views
Google App Engine Java, Groovy and Gaelyk by Guillaume Laforge
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
Guillaume Laforge45.8K views
qooxdoo - Open Source Ajax Framework by ecker
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Framework
ecker1.3K views
Learning jQuery @ MIT by jeresig
Learning jQuery @ MITLearning jQuery @ MIT
Learning jQuery @ MIT
jeresig1.5K views
jQuery - Boston IxDA by jeresig
jQuery - Boston IxDAjQuery - Boston IxDA
jQuery - Boston IxDA
jeresig1.6K views
Jquery(2) by tomcoh
Jquery(2)Jquery(2)
Jquery(2)
tomcoh400 views
jQueryTO: State of jQuery March 2013 by dmethvin
jQueryTO: State of jQuery March 2013jQueryTO: State of jQuery March 2013
jQueryTO: State of jQuery March 2013
dmethvin1.5K views
jQuery - Chapter 1 - Introduction by WebStackAcademy
 jQuery - Chapter 1 - Introduction jQuery - Chapter 1 - Introduction
jQuery - Chapter 1 - Introduction
WebStackAcademy682 views
jQuery Features to Avoid by dmethvin
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoid
dmethvin1.6K views
jQuery: The World's Most Popular JavaScript Library Comes to XPages by Teamstudio
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
Teamstudio4K views
Building a JavaScript Library by jeresig
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
jeresig11.7K views
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13 by Fred Sauer
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
Fred Sauer1.5K views
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016 by Matt Raible
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Matt Raible5.5K views
Ajax Tutorial by oscon2007
Ajax TutorialAjax Tutorial
Ajax Tutorial
oscon2007605 views

More from jeresig

Does Coding Every Day Matter? by
Does Coding Every Day Matter?Does Coding Every Day Matter?
Does Coding Every Day Matter?jeresig
3K views19 slides
Accidentally Becoming a Digital Librarian by
Accidentally Becoming a Digital LibrarianAccidentally Becoming a Digital Librarian
Accidentally Becoming a Digital Librarianjeresig
1.3K views72 slides
2014: John's Favorite Thing (Neo4j) by
2014: John's Favorite Thing (Neo4j)2014: John's Favorite Thing (Neo4j)
2014: John's Favorite Thing (Neo4j)jeresig
847 views42 slides
Computer Vision as Art Historical Investigation by
Computer Vision as Art Historical InvestigationComputer Vision as Art Historical Investigation
Computer Vision as Art Historical Investigationjeresig
1K views89 slides
Hacking Art History by
Hacking Art HistoryHacking Art History
Hacking Art Historyjeresig
925 views107 slides
Using JS to teach JS at Khan Academy by
Using JS to teach JS at Khan AcademyUsing JS to teach JS at Khan Academy
Using JS to teach JS at Khan Academyjeresig
1K views25 slides

More from jeresig(20)

Does Coding Every Day Matter? by jeresig
Does Coding Every Day Matter?Does Coding Every Day Matter?
Does Coding Every Day Matter?
jeresig3K views
Accidentally Becoming a Digital Librarian by jeresig
Accidentally Becoming a Digital LibrarianAccidentally Becoming a Digital Librarian
Accidentally Becoming a Digital Librarian
jeresig1.3K views
2014: John's Favorite Thing (Neo4j) by jeresig
2014: John's Favorite Thing (Neo4j)2014: John's Favorite Thing (Neo4j)
2014: John's Favorite Thing (Neo4j)
jeresig847 views
Computer Vision as Art Historical Investigation by jeresig
Computer Vision as Art Historical InvestigationComputer Vision as Art Historical Investigation
Computer Vision as Art Historical Investigation
jeresig1K views
Hacking Art History by jeresig
Hacking Art HistoryHacking Art History
Hacking Art History
jeresig925 views
Using JS to teach JS at Khan Academy by jeresig
Using JS to teach JS at Khan AcademyUsing JS to teach JS at Khan Academy
Using JS to teach JS at Khan Academy
jeresig1K views
Applying Computer Vision to Art History by jeresig
Applying Computer Vision to Art HistoryApplying Computer Vision to Art History
Applying Computer Vision to Art History
jeresig826 views
NYARC 2014: Frick/Zeri Results by jeresig
NYARC 2014: Frick/Zeri ResultsNYARC 2014: Frick/Zeri Results
NYARC 2014: Frick/Zeri Results
jeresig2.1K views
EmpireJS: Hacking Art with Node js and Image Analysis by jeresig
EmpireJS: Hacking Art with Node js and Image AnalysisEmpireJS: Hacking Art with Node js and Image Analysis
EmpireJS: Hacking Art with Node js and Image Analysis
jeresig18.5K views
Applying Computer Vision to Art History by jeresig
Applying Computer Vision to Art HistoryApplying Computer Vision to Art History
Applying Computer Vision to Art History
jeresig3.1K views
Introduction to jQuery (Ajax Exp 2006) by jeresig
Introduction to jQuery (Ajax Exp 2006)Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)
jeresig2.4K views
jQuery Recommendations to the W3C (2011) by jeresig
jQuery Recommendations to the W3C (2011)jQuery Recommendations to the W3C (2011)
jQuery Recommendations to the W3C (2011)
jeresig1.7K views
jQuery Open Source Process (RIT 2011) by jeresig
jQuery Open Source Process (RIT 2011)jQuery Open Source Process (RIT 2011)
jQuery Open Source Process (RIT 2011)
jeresig1.7K views
jQuery Open Source Process (Knight Foundation 2011) by jeresig
jQuery Open Source Process (Knight Foundation 2011)jQuery Open Source Process (Knight Foundation 2011)
jQuery Open Source Process (Knight Foundation 2011)
jeresig2.2K views
jQuery Mobile by jeresig
jQuery MobilejQuery Mobile
jQuery Mobile
jeresig1.5K views
jQuery Open Source (Fronteer 2011) by jeresig
jQuery Open Source (Fronteer 2011)jQuery Open Source (Fronteer 2011)
jQuery Open Source (Fronteer 2011)
jeresig4K views
Holistic JavaScript Performance by jeresig
Holistic JavaScript PerformanceHolistic JavaScript Performance
Holistic JavaScript Performance
jeresig4K views
New Features Coming in Browsers (RIT '09) by jeresig
New Features Coming in Browsers (RIT '09)New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)
jeresig1.5K views
Introduction to jQuery (Ajax Exp 2007) by jeresig
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)
jeresig1.3K views
Advanced jQuery (Ajax Exp 2007) by jeresig
Advanced jQuery (Ajax Exp 2007)Advanced jQuery (Ajax Exp 2007)
Advanced jQuery (Ajax Exp 2007)
jeresig1.3K views

Recently uploaded

iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
37 views69 slides
Democratising digital commerce in India-Report by
Democratising digital commerce in India-ReportDemocratising digital commerce in India-Report
Democratising digital commerce in India-ReportKapil Khandelwal (KK)
15 views161 slides
virtual reality.pptx by
virtual reality.pptxvirtual reality.pptx
virtual reality.pptxG036GaikwadSnehal
11 views15 slides
MVP and prioritization.pdf by
MVP and prioritization.pdfMVP and prioritization.pdf
MVP and prioritization.pdfrahuldharwal141
31 views8 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
56 views21 slides
STPI OctaNE CoE Brochure.pdf by
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdfmadhurjyapb
14 views1 slide

Recently uploaded(20)

iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker37 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 views
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays11 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software263 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive

JavaScript Library Overview

  • 1. JavaScript Libraries John Resig - October 2008 http://ejohn.org/ http://twitter.com/jeresig/
  • 2. Question: How do you want to write JavaScript?
  • 3. 1) Plug-and-Play • Drop in a “calendar widget” or “tabbed navigation” • Little, to no, JavaScript experience required. • Just customize some options and go. • No flexibility.
  • 4. 2) Some Assembly Required • Write common utilities • Click a link, load a page via Ajax • Build a dynamic menu • Creating interactive forms • Use pre-made code to distance yourself from browser bugs. • Flexible, until you hit a browser bug.
  • 5. 3) Down-and-Dirty • Write all JavaScript code from scratch • Deal, directly, with browser bugs • Quirksmode.org is your lifeline • Excessively flexible, to the point of hinderance.
  • 6. What we’ve just seen... • Widgets • Libraries • Raw JavaScript
  • 7. What we’ve just seen... • Widgets • Libraries • Raw JavaScript
  • 8. Why use a library? • Makes JavaScript bearable • Gets the job done fast • Simplifies cross-browser support • Sort of like C stdlib - no one just codes all of C by hand
  • 9. What kind of libraries exist? Open Source Commercial Atlas Client/ AjaxCFC Backbase for Server Qcodo Struts Prototype, jQuery, Browser Backbase Yahoo UI, Dojo, Only SmartClient Mootools
  • 10. What kind of libraries exist? Open Source Commercial Atlas Client/ AjaxCFC Backbase for Server Qcodo Struts Prototype, jQuery, Browser Backbase Yahoo UI, Dojo, Only SmartClient Mootools
  • 11. Open Source Libraries Browser Only Client/Server Scriptaculous Task AjaxCFC moo.fx Specific Qcodo Open Rico Prototype, jQuery, General Ruby on Rails Yahoo UI, Dojo, Purpose CakePHP Mootools
  • 12. Open Source Libraries Browser Only Client/Server Scriptaculous Task AjaxCFC moo.fx Specific Qcodo Open Rico Prototype, jQuery, General Ruby on Rails Yahoo UI, Dojo, Purpose CakePHP Mootools
  • 14. March Developer Survey jQuery Prototype Yahoo UI Dojo Mootools Other 18% 34% 18% 8% 8% 13% http://ajaxian.com/archives/nitobi-survey-results-on-ajax- development
  • 15. Google Trends jQuery Prototype Mootools Dojo Yahoo UI http://google.com/trends?q=prototype+javascript%2C+jquery+javascript%2C+yui+javascript%2C+dojo+javascript&ctab=0&geo=all&date=all&sort=0
  • 16. Not Included • (Besides obvious time constraints.) • ExtJS - Closed development • ASP.NET Ajax - Mostly .NET developers • GWT - Strictly limited to Java developers
  • 19. Prototype: Overview • Started March 2005 by Sam Stephenson • Incredibly popular, tied with Ruby on Rails’ popularity • Development backed by 37 Signals
  • 20. Prototype: Focus • Improving the usability of the JavaScript language • Big emphasis on adding in ‘missing’ JavaScript features • Clean structure, clean objects and ‘classes’
  • 21. Prototype: Details • Code quality is fantastic, great features • All animations (and interactions) are in Scriptaculous • Looking at Prototype 1.6.0.2 • 1.6.0.3/1.6.1 release upcoming
  • 23. jQuery: Overview • Released January 2006 by John Resig • Rapid rise in popularity • Many developers across the globe • Corporate backing (Microsoft, Nokia)
  • 24. jQuery: Focus • Improving the interaction between JavaScript and HTML • Highly-effective, short, code • Looking at jQuery 1.2.6 • 1.3 release upcoming
  • 26. YUI: Overview • Released Feb 2006 by Yahoo! • Maintained and financed internally • Attempt to standardize internal JavaScript
  • 27. YUI: Focus • Exposing, and solving, common methodologies • Looking for common idioms (Drag-and- Drop, Calendar, Auto-Complete) • Yahoo UI 2.5.1 is current • Looking at 3.0 today (large overhaul)
  • 28. Dojo
  • 29. Dojo: Overview • Started early 2005 by Alex Russell + Co. • Large development community • Corporate backing (IBM, AOL)
  • 30. Dojo: Focus • Building complete web applications • A package hierarchy, e.g.: dojo.addClass( ... ) • Focus has transcended into widgets (Dijit) • Huge number of features • Today we’re looking at Dojo 1.1.1 • 1.2 coming soon
  • 32. Mootools: Overview • Released Sept 2006 by Valerio Proietti • A spiritual fork of Prototype that included animations, drag and drop, etc. • (Borrowed concepts like native prototype extension and classical object construction.) • Has evolved dramatically since then
  • 33. Mootools: Focus • A clean classical structure • A more holistic approach to development • Tackle a solid core set of functionality • Include a couple core plugins • Looking at 1.2
  • 34. What should a library have?
  • 35. Code Base • Core Functionality • DOM • Events • Ajax • Animations • User Interface Widgets
  • 36. Development • Good Architecture • Open Licensing • Wide Browser Support • Small File Size
  • 37. Project • Development Team (Open, Funded) • Code in SVN / Bug Tracker • Good Unit Test Coverage
  • 38. Documentation • Full API Coverage • Plenty of Tutorials • Some Books • Wide variety of Demos
  • 39. Community • Active Mailing List / Forum • Support and Training • Popularity
  • 40. Most Important Question: • Does the JavaScript library help me to write JavaScript. • The style of the library and its API is very core to this. • Can really only be determined through sitting down and playing with a library.
  • 41. Code Base • Core Functionality • DOM • Events • Ajax • Animations • User Interface Widgets
  • 42. Core Functionality • Bare minimum needed to make a dynamic “Ajax” web site: • DOM (Traversal and Manipulation) • Events • Ajax • Animations
  • 43. DOM • Traversal • Using CSS selectors to locate elements • Modification • Create/remove/modify elements • Having a DOM builder is important
  • 44. DOM Traversal • Prototype, Mootools: $$(“table > tr”) • jQuery: $(“div > p:nth-child(odd)”) • Dojo: dojo.query(“table tr:nth-child(even)”) • Yahoo UI: Y.get('div p')
  • 45. DOM Modification • Prototype: $(“list”).insert(“<li>Another item</li>”); • jQuery: $(“#li”).append(“<li>An item</li>”); • Mootools: $(“li”).append(new Element(“li”, {html: “An item”}));
  • 46. DOM Manipulation • Dojo: dojo.query(“#li”).addContent(“<li>An item</li>”); • Yahoo UI: Y.get(“#li”).appendChild( Y.create(“<li>An item</li>”));
  • 47. Events • Support for simple event binding/removal • Support for custom events is essential • Prototype: $$(“#button”).invoke(“observe”, ”click”, function(){ alert(“Thanks for the click!”); }); • jQuery: $(“div”).click(function(){ alert(“div clicked”); });
  • 48. Events (cont.) • Yahoo UI: Y.get(“#list”).on(“click”, function(){ alert(“List Clicked”); }); • Dojo: dojo.query(quot;#mylinkquot;).connect(quot;clickquot;, function(){ alert(“Link clicked”); }); • Mootools: $$(quot;#mylinkquot;).addEvent(quot;clickquot;, function(){ alert(“Link clicked”); });
  • 49. Ajax • Request and load remote documents • Prototype: new Ajax.Request(“test.html”, { method: “GET”, onComplete: function(res){ $$(‘#results’).invoke(“update”,( res.responseText ); } }); • jQuery: jQuery.get(“test.html”, function(html){ $(“#results”).html( html ); });
  • 50. Ajax (cont.) • Yahoo UI Y.on(“io:complete”, function(id, data){ Y.get(“#results”).set(“innerHTML”, data.responseText); }); Y.io(“test.html”); • Dojo dojo.xhrGet({ url: quot;test.htmlquot;, load: function(type, data) { dojo.query(“#results”).empty().addContent( data ); } });
  • 51. Ajax (cont.) • Mootools: onComplete: function(t, e, html){ new Request.HTML({ $$(“#results”).html( html ); }}).get('myPage.html');
  • 52. Ajax (cont.) • jQuery and Mootools are capable of doing DOM traversing over XML • jQuery.get(“test.xml”, function(xml){ $(“user”, xml).each(function(){ $(“<li/>”).text( $(this).text() ) .appendTo(“#userlist”); }); });
  • 53. Animations • Simple animations (hide/show/toggle) • Provide elegant transitions • Prototype, using Scriptaculous: $(‘menu’).appear({duration: 0.6}); • jQuery: $(“#menu”).animate({opacity: 1}, 600);
  • 54. Animations (cont.) • Yahoo UI: new Y.Anim({ node: “#list”, duration: 600, { to: {opacity: 1}}}).run(); • Dojo: dojo.query(“#list”).anim({opacity: 1}, 600); • Mootools: new Fx.Tween(“list”, {duration: 600}).start(“opacity”, 0, 1);
  • 55. Core Feature Summary DOM Events Anim. Ajax Prototype X X / X jQuery X X X X Yahoo UI X X X X Dojo X X X X Mootools X X X X
  • 56. User Interface Widgets • Difficult to implement components, made easy • Commonly used, save duplication • Some common components: Drag & Drop, Tree, Grid, Modal Dialog, Tabbed Pane, Menu / Toolbar, Datepicker, Slider
  • 57. User Interface Packages • Only looking at officially-supported code: • Prototype has Scriptaculous • jQuery has jQuery UI • Dojo has Dijit • Mootools includes some in Core • Included in Yahoo UI
  • 58. Drag & Drop • Drag an item from one location and drop in an other • Supported by all libraries
  • 59. Tree • A navigable hierarchy (like a folder/file explorer) • In Dojo and Yahoo UI
  • 60. Grid • An advanced table (resizable, editable, easily navigable) • In Dojo and Yahoo UI
  • 61. Modal Dialog • Display confined content (usually drag & droppable) and confirmation dialogs • In Dojo,Yahoo UI, and jQuery
  • 62. Tabbed Pane • Multiple panes of content navigable by a series of tabs • In Dojo,Yahoo UI, and jQuery
  • 63. Menu / Toolbar • A list of navigable items (with sub-menus) • In Dojo and Yahoo UI
  • 64. Datepicker • An input for selecting a date (or a range of dates) • In Dojo,Yahoo UI, and jQuery
  • 65. Slider • A draggable input for entering a general, numerical, value • In all libraries
  • 66. Tons More! • Color Picker (Dojo,YUI, jQuery) • Layout (Dojo,YUI) • Auto Complete (Dojo, Proto,YUI, jQuery) • Selectables (Dojo, Proto, jQuery) • Accordion (Dojo, jQuery, Mootools) • WYSIWYG (Dojo,YUI)
  • 67. Themeing • A consistent look-and-feel for widgets • jQuery,Yahoo UI, and Dojo provide themeing capabilities • jQuery’s and Yahoo UI’s are documented
  • 68. Accessibility • Taking in to consideration points from ARIA (Accessible Rich Internet Applications) • Dojo is taking a solid lead, here • jQuery received funding and is working on ARIA integration to jQuery UI • Yahoo is investigating ARIA
  • 69. Development • Good Architecture • Open Licensing • Wide Browser Support • Small File Size • Speed
  • 70. Architecture • Bottom Up (Prototype, jQuery) vs. Top Down (Dojo,Yahoo UI) • jQuery, Dojo, and Yahoo UI all use a single namespace • Prototype extends native objects (high likelihood of inter-library conflict) • jQuery is extensible with plugins • Dojo uses a package system
  • 71. Licensing • All use liberal licenses • MIT: (“Keep my name on the file”) Prototype, jQuery, Mootools • BSD: (“...and please don’t sue me.”) Yahoo UI, Dojo
  • 72. Browser Support • Everyone supports: IE 6+, Firefox 2+, Safari 3+, Opera 9+ • Note: • Most are in the process of dropping support for Safari 2
  • 73. File Size • Serving your JavaScript minified + Gzipped • Optimal level of compression and speed • Core file size (in KB): 35.00 26.25 17.50 8.75 0 Prototype jQuery Yahoo UI Dojo Mootools
  • 74. Speed • Hard to quantify • Currently the only point of comparison is in CSS Selectors • Speed varies across browsers • Competition is strong (much faster than what they use to be) • DOM Modification, Events completely un- compared
  • 75. Project • Development Team (Open, Funded) • Code in SVN / Bug Tracker • Good Unit Test Coverage
  • 76. Development Team • Prototype, jQuery, Mootools, and Dojo all have open development (anyone can contribute) • jQuery,Yahoo UI, and Dojo all have paid, full-time, developers working on the code • All have paid, part-time, developers
  • 77. SVN / Bug Tracker • Prototype, jQuery, Mootools, and Dojo all have code in a public SVN repositories • Yahoo UI’s development is private and is limited to Yahoo employees • They’re working to fix this! • All have a public bug tracker
  • 78. Unit Tests • All libraries have some automated unit tests • jQuery,Yahoo UI, and Dojo all have public unit test URLs • jQuery and Dojo have tests that can run in Rhino • UI Testing: Windmill,Yahoo UI, jQuery UI’s testing framework
  • 79. Documentation • Full API Coverage • Plenty of Tutorials • Some Books • Wide variety of Demos
  • 80. API Documentation • Prototype, jQuery, Mootools, and Yahoo UI all have full coverage • Dojo’s coverage has improved dramatically • jQuery provides runnable examples with each API item
  • 81. Tutorials • All libraries provide some tutorials • jQuery,Yahoo UI, and Dojo have screencasts/presentations • Prototype: 6 • jQuery: 118 (English) • Yahoo UI: 30+ (each component has at least one) • Dojo: 24
  • 82. Books • Prototype: • Prototype and Scriptaculous in Action (Manning) • Prototype and Scriptaculous (Pragmatic) • jQuery: • Learning jQuery (Packt) • jQuery Reference Guide (Packt) • Yahoo UI: • Learning the Yahoo UI Library (Packt)
  • 83. Books (cont.) • Dojo: • Dojo: The Definitive Guide (O’Reilly) • Mastering Dojo (Prag Prog) • Dojo (Developer’s Library) • Practical Dojo Projects (Apress) • Mootools: • Mootools Essentials (Apress)
  • 84. Demos • Yahoo UI provides a considerable number of live demos and examples for all features • jQuery provides live examples and a few demo applications • Mootools provides a large number of demos • Dojo provides demo applications for their widgets
  • 85. Community • Active Mailing List / Forum • Support and Training • Popularity
  • 86. Mailing List / Forum • Prototype, jQuery, Mootools, and Yahoo UI have mailing lists • Prototype: 32 posts/day • jQuery: 116 posts/day • Yahoo UI: 55 posts/day • Mootools: 21 posts/day • Dojo has an active forum • Mootools also has a user-built forum
  • 87. Support and Training • Dojo provides paid support and training (via Sitepen) • jQuery provides paid jQuery UI support and training (via Liferay)
  • 88. Popularity • Who uses what: • Prototype: Apple, ESPN, CNN, Fox News • jQuery: Google, IBM, Microsoft, Nokia • Yahoo:Yahoo, LinkedIn, Target, Slashdot • Dojo: IBM, AOL, Mapquest, Bloglines • Mootools: W3C, CNet,Vimeo, Jeep
  • 90. Why don’t the libraries merge? • It’s really hard to have a unified backend • Everyone fixes different bugs • Everyone implements *slightly* different features • A combined library would be massive
  • 91. Can common components be made? • Possibly. • Again hit the problem of finding the correct mix of features and bugs. • Component would have to be very special.
  • 92. Sizzle • Build common features • A common selector engine • Being integrated into: jQuery, Prototype, and MochiKit
  • 93. Why not make a unified API? • A library’s API helps makes it unique • Embody different philosophies • Combining all of them and trying to please everyone creates a unified, boring, mess
  • 94. More Information ... questions? • Prototype: http://prototypejs.org/ • jQuery: http://jquery.com/ • Yahoo UI: http://developer.yahoo.com/yui/ • Dojo: http://dojotoolkit.org/