Wednesday, December 3rd, 2008

A great example of sharing; Sizzle Engine in Dojo Foundation

Category: CSS, Dojo, JavaScript, jQuery, Library, Prototype

>Voting has started in Dojo land to take in John Resig’s Sizzle next-gem CSS selector engine.

This is incredibly exciting, as it shows how Ajax libraries are working together more and more. Instead of reinventing the wheel in different ways for each project, is it possible to find some core pieces that can be nicely shared? Of course, if our world was nicer and we could share code by linking in a nice way maybe this would happen more.

As I mentioned in my thanksgiving note, the work that the Ajax library developers do is hugely important and impactful, and having them work together can only be great news.

Take a look at this public email to the Dojo Foundation on the vote:

Overview

The Sizzle project is a JavaScript library for performing selections
across a DOM tree using CSS selectors. The library is designed to be
standalone (have no external dependencies), lightweight, fast, and
extensible. This culminates in a library that is perfectly suited for
integration into other libraries. While it’s feasible that a developer
may use Sizzle directly the target audience for it is other library
authors.

The code for Sizzle can be found in the following Git repository:
http://github.com/jeresig/sizzle/tree/master

All of the code for the project has been written by John Resig and is
released under an MIT license. There are some patches pending from
some other contributors (namely Prototype).

Right now the following libraries are adopting or are looking to adopt
Sizzle as their primary CSS selector engine:

It’s likely that Sizzle will become the unified engine behind a
majority of the JavaScript libraries on the market (if not in numbers
then certainly in market share).

The project is owned by John Resig who will serve as BDFL/Project lead
if the project is accepted. There is no formal voting process, as of
yet, but it’s likely that one will come about, considering the number of
projects using the codebase.

If the project is accepted to the foundation then all contributors to
the project will be required to have a CLA and follow the policies of
the Dojo foundation.

It’s very likely that Sizzle will eventually expand into other areas
of JavaScript libraries (such as DOM manipulation and event binding).

That last line excites me too! It is interesting to see this happen in the Dojo Foundation. Remember, Dojo was founded out of toolkits coming together to aggregate forces. Kudos to everyone involved, and good luck!

Related Content:

  • EGL Rich UI on IBM i: Do you Dojo?
    Taking advantage of the Rich UI features of EGL architecture on the AS/400 can save you time and complexity. Rich internet applications can be...
  • Hot skills: Dojo encourages Ajax innovation
    What is it? In April 2006, a reviewer provided a round-up of 50 different Ajax frameworks and toolsets - and the number has certainly increased since...
  • Sound foundations
    The booming construction industry has enormous potential as a market for IT vendors, but selling systems in this...
  • Great blunders in IT history
    When Colin Crook offers advice on how companies should deal a security breach, he speaks from experience. He was CTO of Citicorp [now Citigroup,...
  • Customers make great marketers
    Customers aren't just a focus at KarmaLoop, an online apparel retailer; they market and sell the product as...

Posted by Dion Almaer at 12:58 am
11 Comments

++++-
4.2 rating from 66 votes

11 Comments »

Comments feed TrackBack URI

Damn you Dion, I wanted to blog this first! This is very exciting, and I can’t wait to see what this means for the overall cooperation between all these allegedly “competing” libraries. I threw a quick and heart-felt +1 on the Foundation list, and will repeat the sentiment here.

Comment by phiggins — December 3, 2008

w00t, thats is really good news. Again this shows how much the libraries are working together behind the scenes :) And I really hope to see more of this happen in the future

Comment by nonken — December 3, 2008

What are the performance numbers of Sizzle compared to dojo.query? Is it really so much faster that it justifies such a big rework of dojo core? If so, then great, but is not adopting this a little anti-competitive? The whole reason Sizzle (and dojo.query and all the other CSS selector engines) became so good is because of the very healthy arms race among toolkits to be the best.

If they all use the same base, does this competition, and the amazing progress it creates, go away? Is Sizzle really the absolute best we can get?

Comment by sos — December 3, 2008

TinyMCE? So a rich text editor is going to subsume a CSS selector engine?

Comment by Jordan1 — December 3, 2008

Yes, we currently have a basic CSS selector engine that only supports basic patterns. If we include Sizzle we will be able to use more advanced patterns, don’t really know if that is something we need for our API but it would be nice to adapt some form of standard implementation. And the Sizzle engine Resig is building seems to fit that need perfectly.

Comment by Spocke — December 3, 2008

@sos: competition is something absolutely important, I agree. In the case of the query engines I personally think that it is on the browser vendors now to speed things up and not on js framework developers to find yet another tweak to raise the benchmark bars.
We should focus on giving js/web developers the best possible tools to get their jobs done, the browser vendors have to give us the right and performant environment.

Comment by nonken — December 3, 2008

Peppy seems like the only serious competition to Sizzle now. It’d be nice to see Peppy and Sizzle battle for a while so browser makers can speed them both up.

Comment by Nosredna — December 3, 2008

It’s like Dojo is always 2 steps ahead. The other frameworks listed aren’t adopting, just looking.

Comment by lovejs — December 3, 2008

About selector engines, here’s a *very* different one; http://ra-ajax.org/selectors-for-webcontrols-querying-into-the-control-hierarchy-on-the-server.blog
.
Selector engine for running queries on server into ASP.NET Control hierarchies… :)

Comment by ThomasHansen — December 3, 2008

I’ve posted about this on Clientcide posing the question as to whether MooTools should switch to Sizzle:

http://www.clientcide.com/industry-news/sizzle-power-in-mootools/

Feedback most appreciated.

Comment by anewton — December 3, 2008

PURE is now fully supporting Sizzle:
http://beebole.com/blog/2008/12/04/pure-is-now-supporting-sizzle-and-mootools/

Comment by YvesBeeBole — December 4, 2008

Leave a comment

You must be logged in to post a comment.