The YAHOO Global Object is a single global namespace within which all yui libarary code resides. It must be included on every page that utilized the yui libarary, adn it must appear before any of the other yui componet.

YAHOO全局对象提供了一个全局唯一的命名控件, 其它所有的代码都在这个空间中. 该全局对象必须包含在每一个使用yui的页面中,而且必须出现在其它组件引用之前.

YAHOO.namespace
The YHOO Object automatically generates namespaces for YAHOO.util, YAHOO.widget, YAHOO.example. These namespaces are reserved for script that is included in the yui release. Addtional namesapces can be created to contain custom applications buit upon the library.
YAHOO对象自动产生YAHOO.util, YAHOO.widget,YAHOO,example命名空间. 这些命名空间在YUI的发布中是保留的.其它的命名空间可以在这个基础上创建.
例如:
      YAHOO.namespace("testproject");
      YAHOO.testproject.testclass=function(info){ altert(info);};

 YAHOO.extend   
YAHOO.extend 提供了为拓展对象而设置prototype, constructor, 和superclass属性的简单快捷机制. 同时,其提供防止被继承对象的constructor被执行2次.
例如:
      YAHOO.namespace("testproject");
      YAHOO.testproject.test1=function(info){alert("test1:"+info);};
      YAHOO.testproject.test1.prototype.testMethod=function(info){alert("test1:testMethod:"+info);}
     
      YAHOO.testproject.test2=function(info){
                             YAHOO.testproject.test2.superclass.constructor.call(this,info);

                              alert("test2:"+info);

                             };
      //test1 is extended by test2. 这个集成必须在test2的constructor之后立即进行.
      YAHOO.extend(YAHOO.testproject.test2,YAHOO.testproject.test1);
      YAHOO.testproject.test2.prototype.testMethod=function(info){
                            YAHOO.testproject.test2.superclass.testMethod.call(this,info);
                             alert("test2:testMethod:"+info);
                              }
       var test2Instance = new YAHOO.testproject.test2("constructor executed");
       test2Instance.testMethod("testMethod invoked");


YAHOO.augment
YAHOO.augment 提供了在一个对象里重用另一个对象的部分或者全部prototype属性的方法.
示例:

       YAHOO.namespace("augmentproject");
       YAHOO.augmentproject.ClassA = function(){};
       YAHOO.augmentproject.ClassA.prototype={
              msgbox:function(msg){
                     alert(msg);
              }
       };
       YAHOO.augmentproject.ClassB = function(){};
       YAHOO.augment(YAHOO.augmentproject.ClassB,YAHOO.augmentproject.ClassA);

       var test = new YAHOO.augmentproject.ClassB();
       test.msgbox("msgbox info");

YAHOO.log
yahoo.log 包含在全局对象中, 以便YUI的任意代码都能访问到,方便调试.这并不要求YUI Logger UI包含在页面中.如果Logger Control包含在页面中YAHOO.log会执行YAHOO.widget.Logger.log ,否则,其什么都不做.