src/cm/media/js/lib/yui/yui3.0.0/releasenotes/README.base
changeset 0 40c8f766c9b8
equal deleted inserted replaced
-1:000000000000 0:40c8f766c9b8
       
     1 3.0.0
       
     2 
       
     3 * Fixed hasImpl method on built classes, to look up the class
       
     4   hierarchy for applied extensions.
       
     5 
       
     6 * Plugin.Host removed from base-base module and delivered as it's 
       
     7   own module - "pluginhost"
       
     8 
       
     9 * base broken up into..
       
    10 
       
    11      base-base: Provides class hierarchy support for ATTRS and 
       
    12      initialization
       
    13 
       
    14      base-build: Provides Extension support in the form of 
       
    15      Base.build
       
    16 
       
    17      base-pluginhost: Augments Plugin.Host to Base, adding plugin
       
    18      support
       
    19 
       
    20 3.0.0 beta 1
       
    21 
       
    22 * Config argument for init event now merged into the event facade, 
       
    23   instead of being passed separately (available as e.cfg).
       
    24   
       
    25 * Removed Base.create. On review, considered to be overkill.
       
    26   Users can easily create new instances, using Base.build
       
    27 
       
    28 * Moved PluginHost down from Widget to Base, since utils and 
       
    29   Node will also support Plugins.
       
    30 
       
    31 * PluginHost.plug and unplug now accept the plugin class as 
       
    32   arguments [plug(pluginClass, cfg) and unplug(pluginClass)].
       
    33 
       
    34 * Split base module up into base-base and base-build.
       
    35 
       
    36 * Added lazy attribute initialization support, to improve performance.
       
    37   
       
    38   This also removes order dependency when processing ATTRS for a 
       
    39   particular class.
       
    40 
       
    41   If a get/set call is made for an uninitialized attribute A, in the 
       
    42   getter/setter/validator or valueFns of another attribute B, A will 
       
    43   be intiailized on the fly. 
       
    44 
       
    45 * Added ability to subscribe to on/after events through the 
       
    46   constructor config object, e.g.:
       
    47   
       
    48       new MyBaseObject({ 
       
    49          on: {
       
    50             init: handlerFn,
       
    51             myAttrChange: handlerFn
       
    52 	 },
       
    53 	 after: {
       
    54 	    init: handlerFn,
       
    55 	    myAttrChange: handlerFn
       
    56 	 },
       
    57 	 ...
       
    58 	 
       
    59       });
       
    60 
       
    61 * Developers can now override the default clone behavior we use to
       
    62   isolate default ATTRS config values, using cloneDefaultValue, e.g.:
       
    63 
       
    64   ATTRS = {
       
    65       myAttr : {
       
    66       	value: AnObjectOrArrayReference
       
    67 	    cloneDefaultValue: true|false|"deep"|"shallow"
       
    68       }
       
    69   }
       
    70 
       
    71   If the cloneDefaultValue property is not defined, Base will clone
       
    72   any Arrays or Object literals which are used as default values when
       
    73   configuring attributes for an instance, so that updates to instance 
       
    74   values do not modify the default value.
       
    75 
       
    76   This behavior can be over-ridden using the cloneDefaultValue property:
       
    77 
       
    78   true, deep: 
       
    79 
       
    80      Use Y.clone to protect the default value.
       
    81 
       
    82   shallow:
       
    83 
       
    84      Use Y.merge, to protect the default value.
       
    85 
       
    86   false:
       
    87 
       
    88      Don't clone Arrays or Object literals. The value is intended
       
    89      to be used by reference, for example, when it points to
       
    90      a utility object.
       
    91 
       
    92 * Base.plug and Base.unplug used to add static Plugins (default plugins
       
    93   for a class). Replaces static PLUGINS array, allowing subclasses to 
       
    94   easily unplug static plugins added higher up in the hierarchy.
       
    95 
       
    96 * Base adds all attributes lazily. This means attributes don't get
       
    97   initialized until the first call to get/set, speeding up construction
       
    98   of Base based objects.
       
    99 
       
   100   Attributes which have setters which set some other state in the object, 
       
   101   can configure the attribute to disable lazy initialization, by setting
       
   102   lazyAdd:false as part of their attribute configuration, so that the setter
       
   103   gets invoked during construction.
       
   104 
       
   105 3.0.0PR1 - Initial release
       
   106 
       
   107 Module Name: "base"
       
   108 Documentation: http://developer.yahoo.com/yui/3/base
       
   109 
       
   110 Base is designed to be a low level class from which other attribute 
       
   111 and event target based classes in the YUI library can be derived. 
       
   112 It provides a standard template for creating attribute based objects 
       
   113 across the library and provides a consistent init() and destroy() 
       
   114 sequence, by chaining initialization (initializer) and destruction 
       
   115 (destructor) methods for the class hierarcy.