ChangeLog: 3.7.0 Add dependency injection Fix issues using isTypeOf 3.6.0 Extend and deprecate use the same api. Size improvements. 3.5.0 Deprecate the extend method Fix Readme.md documentation with the missing Api argument. Change the order of module instance in the decorator method to be compatible with the rest of the api. [0] - Bus api access [1] - Module api access [2] - ErrorHandler api access [3] - Hydra Api access [4] - Module instance if we use decorate method to extend modules. 3.4.2 Change the access to Hydra api from using 'this.api' in methods, now is delegated to the creator function. Arguments: [0] - Bus api access [1] - Module instance decorating modules [1] - Module api access [2] - Module api access decorating modules [2] - ErrorHandler api access [3] - ErrorHandler api decorating modules [3] - Hydra Api access [4] - Hydra Api access 3.4.1 Fix issue when cloning data of jQuery objects. 3.4.0 Allow access to Hydra api from methods using 'this.api' 3.3.2 Improving the decorate method to 'inherit' parent methods. 3.3.1 Fix the problem in clone, if the object to clone is an Event it fails to stack overflow. 3.3.0 Adding decorate method to decorate modules instead of using extend to improve reusability of code. 3.2.2 Adding retrocompatibility to previous versions. 3.2.1 Added Bower support Added error method to ErrorHandler 3.2.0 Add two special methods to get a copy of channels and modules only to be used in plugins or extensions. 3.1.5 Improve code documentation 3.1.4 Bug fixing. Make Hydra more extensible. 3.1.3 Small improvements to protect Hydra in special cases. Thanks to @ramonacus and @cvillu 3.1.2 Register and extend will return a module object with these methods: - start - extend - stop This change will make easy-to-use using Hydra.js in AMD modules as requireJS modules. 3.1.1 Added new public method 'setUnblockUI' to set on/off the unblocking UI. 3.1.0 The system of register events was so limited, then now you can subscribe the events in this way: No more 'oEventsCallbacks' is more semantic use 'events' oModule.events: { 'channel': { 'item:actionChannel': function() { } }, 'channel2': { 'item:actionChannel2': function() { } } } The subscribing and unsubscribing of events is automatically done when init and destroying the module. Added two new methods: * subscribeTo Method to subscribe a callback to a channel and event. * unsubscribeFrom Method to unsubscribe all the callbacks from one channel and event. 3.0.2 Add a private method to handle the execution of callbacks to avoid blocking the user interface. 3.0.1 Reduce ciclomatic complexity in all the methods that need it. 3.0.0 * A new system of register events to any object with a oEvents property where the keys must be the events to be triggered and the values the callbacks to be executed. The system adds automatically the events using the oEvents object. * Action has been moved to one extension in https://github.com/tcorral/Hydra_Extensions/tree/master/Sandbox if you need backward compatibility. 2.7.0 * Added the multi-module start feature. No more than one line when starting more than one module at the same time. Now you can pass: An array of ids of modules An array of instance ids An array of data objects An array with booleans indicating if the module will be a single instance or not. 2.6.0 * Added backward compatibility with previous versions. Start and Stop methods allow not to pass any instance id. When starting a module without any instance id it will generate one automatically. When stopping a module without any instance id it will stop all the instances of the module. 2.5.3 * Helper test methods have been moved to one extension to reduce final size of Hydra.js * Added log of events when running in debug mode. 2.5.2 * Now all the extended modules can access the parent methods using __super__ 2.5.1 * Fix bug on extended modules when using lazy pattern 2.5.0 * Added methods to decouple the test environment * Added documentation to some methods * Added a variable to check if is loaded in Node.js * Opening new web page 2.2.1 * Separate Hydra in two differents projects, Core and Extensions. * Modify test to remove test from ErrorHandler that are not needed anymore. 2.2.0 * Separate all the elements not needed for modular architecture. * BasicErrorHandler * Deferred * Create jQuery wrappers to avoid high coupling in modules. * Ajax * DOM * Events * Added new methods: * noConflict -> Create an alias to one part of Hydra to be called as a different name * extend -> Add a new functionality to Hydra. 2.1.0 * Added method to set vars in a private scope only accessible from the init arguments method or using the getter method * Methods added: - setVars (Expect one object as argument) - getVars (Returns a current snapshot of the vars object) 2.0.0 * Add multi-instance for modules. * Now is possible to add more than one instance for the same module. * It has been added a new param (id of the DOM element that will be the '__container__' property of the module instance when these methods are called: - start - stop - getModule - isModuleStarted 1.3.1 * Improve aListeningEvents generation. Now the listening events are taken from oEventsCallbacks property of methods. - Thanks, Ramonacus - 1.3.0 * Delegate some repetitive jobs to the module instance creator, maintaining the size of Hydra. * Make easier the work of developers reducing duplicated code and decrease the final size of projects where Hydra.js is used. * Some modules have been moved from modules to the instance object when creating it: * These methods are not needed anymore to be added to your modules: - handleAction - destroy * Added new properties to the module: - aListeningEvents - Array of events that the module will start listening - oEventsCallbacks - Object of callbacks that must match the events - onDestroy - New destroy method, only, will stop all listeners. - This method will be executed before stop listeners. * When the module is started the listeners will be activated before the code in init method. * Is not needed anymore to start listeners. 1.2.0 * Added Promise and Deferred objects 1.1.1 * Added clasical inheritance to objects. * Added __action__ to access Action object from modules * Added __super__ to access parent object from methods using __call__ method.