
Using YUI 2 on the DuckDuckGo Search Engine  - taylorwc
http://www.yuiblog.com/blog/2010/08/19/yui-at-duckduckgo/
======
antics
Asynchronous image loading is something that most sites can benefit from, and
the YUI has a simple and elegant solution for this. If you're in web
development, I highly recommend looking at it, if not using it.

~~~
minouye
Is there an equivalent in any of the other libraries out there (e.g. jQuery,
Prototype, etc.)?

~~~
danwolff2
Check out the jQuery plugin Lazy Load:

<http://plugins.jquery.com/project/lazyload>
<http://www.appelsiini.net/projects/lazyload>

~~~
minouye
Cheers--plan on implementing this on a project later today :)

------
wdewind
I've used both YUI and jQuery a fair bit and honestly, YUI just doesn't cut it
in comparison to jQuery. YUIs DOM level utilities are not nearly as simple or
powerful as jQuery's built in stuff, and all of its modules are completely
monolithic. YUI manages to hit the worst layers of abstraction: it's a weird
mix of the DOM level stuff that isn't much easier to use than standard JS, and
a collection of random modules.

jQuery hits the sweet spot for me: it's really easy to build custom things in,
there are a ton of libraries out there for complicated stuff, the
documentation is significantly better than YUI's, and in my experience it
performs better than YUI as well.

None of the things in this article are done better with YUI than jQuery IMO.

~~~
rgrove
What version of YUI did you use? What kinds of websites did you use it for
(and what do you use jQuery for now)?

I find YUI 3's Node and NodeList interfaces, which allow you to manipulate and
traverse the DOM using selectors, to be just as easy as (and often easier
than) the jQuery equivalents.

I can't imagine why anyone would seriously describe YUI's modules as
"monolithic", even in YUI 2. YUI 3 in particular has very granular modules,
and provides developers with a lot of freedom in being able to load only
exactly what they need to accomplish a particular task. I wouldn't describe
the selection of modules as "random", either.

It seems especially contradictory to describe YUI, which is inherently
modular, as monolithic in comparison to jQuery, which is the very definition
of monolithic (everything in a single file, so you load it all even if you
don't need it all).

YUI and jQuery are each awesome in many ways and flawed in others, but I don't
think your criticisms are fair.

Standard disclaimer applies: I've been a YUI user for years and am now a
member of the YUI team, so I clearly have a preference here.

~~~
andrewcooke
I use both, but prefer YUI (feels much better engineered, for one). Please
keep up the good work!

------
Luc
Duck Duck Go is pretty neat.

In the article, the link for 'an image' is
<http://thor.duckduckgo.com/Yahoo!_UI_Library> , which appears to forward the
search term 'UI Library' to Yahoo Search.

I'm just curious why this is implemented this way. I was expecting a search
result on DDG when I saw the URL before I clicked.

~~~
epi0Bauqu
This was a bug I apparently introduced this morning. Fixed!

