For the casual user, those examples are anything but simple! Perhaps
things are different for an experienced programmer with plenty of
object-oriented experience, but when I started using this library, I
wanted examples where:
1) custom-built classes are out of the picture
2) all the code is in a single block (in the head of the HTML document
3) the code isn't full of debugging information for a logging component
4) most non-obvious lines of code are commented
Let's look at the drag and drop example for DDProxy. The HTML page
contains 2 JS code blocks, as well as an external JS file (in addition
to all the libraries,) and has a few inline JS calls for good measure.
The heart of the example, YAHOO.example.DDApp, is an instance of a
YAHOO.example.DDSwap which is an extension of YAHOO.util.DDProxy
(itself of course an extension of YAHOO.util.DD) which can be very
There are few comments, and the quality of the HTML doesn't help in
trying to follow the behaviour of the objects (style elements do not
go in the body, and nothing should be nested 6 levels deep!)
Ok, rant over. Don't think I don't appreciate all the work that's
been put into this amazingly helpful and powerful library. But the
examples are certainly not simple, especially for the beginning or
> You'll find information on getting started with each of the YUI's
> individual components at http://developer.yahoo.com/yui, and you'll
> find single-page Cheat Sheets for 13 components at http://
> developer.yahoo.com/yui/#cheatsheets. Throughout the documentation,
> you'll see simple use cases being described, and each component's
> documentation has some simple examples — here, for example, are the
> examples for Drag & Drop.
> You may also want to check out this free chapter from Christian
> Heilmann's new book in which he goes through some examples of adding
> YUI to your site.
> Eric Miraglia
> Yahoo! Presentation Platform Engineering
> On Sep 26, 2006, at 1:17 AM, Felipe Gaúcho wrote:
> > Dear YUI users,
> > I am starting to evaluate YUI for our projects and I am having some
> > dificulty to find simple information about how to start...
> > please give some references about step-by-step tutorials on how to
> > add YUI to my JSP and Html pages.
> > thank you,
> > Felipe Gaucho