JQuery versus Dojo versus YUI

In search for a reliable open source javascript library/framework that works cross-browser, I came across the following:

JQuery

Pros:
- JQuery is the most popular one of them all.
- It is very easy to use and to understand.
- The core library is only 15Kb in size.
- Their statement is: ‘The Write Less, Do More, Javascript Library’.

Cons:
- Hard to use with object oriented programming
- JQuery supports plug-ins, but all these plug-ins are not verified.
- JQuery is a library

YUI

Pros:
- It is developed by Yahoo
- Fully documented, with a great API browser
- Very consistent and reliable
- Also contains unit testing framework
- YUI is a framework

Cons:
- Heavy page weight
- Very few utility or helper functions/methods
- Lacks the use of chaining methods together

Dojo Toolkit

Pros:
- Debug your code in Firebug
- Dojo integrated in Zend Framework
- Hierarchical package system speeds loading
- Dojo is a framework

Cons:
- Dojo fails in online documentation

The chosen one

While I was googling to compare these 3 libraries/frameworks, I found the following page which was quite useful. It showed me how quick the selectors of different libraries/frameworks were in different browsers. The results were quite astonishing:

Based on these results, you can conclude that YUI is the slowest one. This is also the reason why I didn’t chose for YUI. Dojo and JQuery scores the best.

Knowing that JQuery is the easiest to use and immense popular, Dojo has its advantage of being integrated in Zend Framework. Also, the difference in being a library or framework counts.
- A library is about reusable functionalities, but a framework is about reusable behaviours
- A library is something you call/inherit from your code, but framework is something that calls your code or provide services for your code
- A library is a collection of components and classes, where framework is how abstract classes and components interact with each others

In my opinion, Dojo is a framework and JQuery a library. What Yes-co 2.0 needs, is a framework and not a library. JQuery is good for small websites where you want to achieve a ‘WOW’ factor in relative short time. But when you are building an application, you need a robust framework where you can integrate your own codes. While Yes-co 2.0 uses Zend Framework for PHP, Yes-co 2.0 will be build on Dojo Toolkit for javascript.

Sources:
- Wikipedia: Comparison of JavaScript frameworks
- Kyle Hayes: Survey Result: JavaScript Frameworks
- Peter Velichkov: MooTools vs JQuery vs Prototype vs YUI vs Dojo Comparison Revised
- SlickSpeed Selectors Test

The Yahoo! User Interface Library (YUI)

Tags: , , ,

2 Reacties op “JQuery versus Dojo versus YUI”

  1. Polprav says:

    Hello from Russia!
    Can I quote a post in your blog with the link to you?

    • wyuen says:

      Hi,

      Be my guest. You may quote my post with a link to the site.
      Can you give me a link to the page you’re working on?

      Cheers.

Plaats een bericht