{"_id":"joosex-namespace-depended","_rev":"29-e5d4d00638805d5e54f66dceeb4663d6","name":"joosex-namespace-depended","description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","dist-tags":{"latest":"0.18.0"},"versions":{"0.09.0":{"engines":{"node":"*"},"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.09.0","dependencies":{"joose":">=3.10.0"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"_id":"joosex-namespace-depended@0.09.0","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.09.0.tgz","shasum":"f05939d5c1b4d2e232263a83dc7075f3e30c6e41","integrity":"sha512-3vjCP1KS202XP4OxayOF0yTkj6/T9O9gMj09h6KSDO90irIg9NIxCgg9SdMHMEQ2KRpdddNYm3wO13L1fWr3+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDf73ykP3bGuAYXPzcf+ki8Mie8FC7IJnxz+M5DZs4UzAiAqA83BU+lLfN9FG1bW4sGMFfVdRFRHVrfj148/C3cbwg=="}]}},"0.10.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.10.0","dependencies":{"joose":">=3.10.0"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"_id":"joosex-namespace-depended@0.10.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.10.0.tgz","shasum":"865f430a9a5902ca9f8a8cb48b8ccaa7e6e470cf","integrity":"sha512-ph4Mk028B4T021MzGPuOQBBym0mLA6DIpNym0/7zRiJWYKwfGozTNYXtFTQCUN6SAt0rkVTwZSgYbJr3+lTNkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWj86XL1Gum93ElVXfvvf2UnxQ46C7uXZdcy+B7xGLRwIhAO9oGAOdtQPi99V+3g0DYMMyE0IKdexSFeNjEzXTQaP/"}]}},"0.11.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.11.0","dependencies":{"joose":">= 3.14.0","joosex-meta-lazy":">= 0.3.0","joosex-simplerequest":">= 0.2.0"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"scripts":{"postactivate":"$SHELL __script/postactivate.sh"},"_id":"joosex-namespace-depended@0.11.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.11.0.tgz","shasum":"337d63a7c26b3563877f46823b5bfb7e4e1b6110","integrity":"sha512-jl1bntyNJEtiXOCTwpD04pidemodYoGWABJFSchcu9Zbg/VN5fqgt41XTdeJnx3VzlKfZNxILCABY8NAnQxXWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGaoGonlXVHbiWnk2q8edZ42gvzpZAvWFRvIzUPqKQJQAiEA3fNtk/hAnAD0m9f1xKWMTUNF0fioyYsx/KG9LX3nVMI="}]}},"0.12.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.12.0","dependencies":{"joose":">= 3.14.0","joosex-meta-lazy":">= 0.3.0","joosex-simplerequest":">= 0.2.0"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"scripts":{"postactivate":"$SHELL __script/postactivate.sh"},"_id":"joosex-namespace-depended@0.12.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.0","dist":{"tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.12.0.tgz","shasum":"234dcc7ec17dd632a6c16d6dd135acd9fc5ea9c2","integrity":"sha512-Ybm6Z43wp45+zQZE7SbobTpMui/goiIEu5bytfw11IPIC2hBvHHaUgio8zDIVywqnCeLP3sQwwx86uigSos1Qg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID1Sj5NcZrsYsBm1hOU3SZtK4o9gjkVfFIUAD0ULcsroAiBhN/1Upk73Ba9v1E5aUvvbgdqLXutCt+xeqBBjKEqpEg=="}]}},"0.13.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.13.0","dependencies":{"joose":">= 3.14.0","joosex-meta-lazy":">= 0.3.0","joosex-simplerequest":">= 0.2.0"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"scripts":{"postactivate":"$SHELL __script/postactivate.sh"},"_id":"joosex-namespace-depended@0.13.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.1","dist":{"shasum":"374cd566fb7ffd5b896a8248e1cff4fea63be9ce","tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.13.0.tgz","integrity":"sha512-TJp1/wEa0z4HkUpxK1S/9aBNe+9MCmHVHHscs7noNSYNti1sNnaLVBxByhhJBlClPrWHnmyibHFL+1HL9MeYhQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICI98bk60C7M9o+hzTzyEu9+zbKMVnB7YTZ1DQJeOkzHAiBZzhBZl4erqxLgxV0JFfEN2Dlm8vPbktRWilYOv3wd+g=="}]}},"0.14.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.14.0","dependencies":{"joose":">= 3.16.0","joosex-meta-lazy":">= 0.3.1","joosex-simplerequest":">= 0.2.1"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"scripts":{"postactivate":"$SHELL __script/postactivate.sh"},"_id":"joosex-namespace-depended@0.14.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.1","dist":{"shasum":"3b1121c24346634c62ccc394459954a1a68bc278","tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.14.0.tgz","integrity":"sha512-5y6bKLjUEMvaAzwYImSCGZOtcTW1Xr3nQB2HqqAimBQ9hC/WuTWfQ8n86IrdPu6V43K0yyeclSKvE4xEu6Yudw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCALMrZR9iFS7lU2WE8So2Toq8apRIUFJX1ctlStyR3CwIhAIehivzx5KE6sdQZHqdJgO8MssRvNTJ2F+1vmibQ/HnK"}]}},"0.15.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.15.0","dependencies":{"joose":">= 3.16.0","joosex-meta-lazy":">= 0.3.1","joosex-simplerequest":">= 0.2.1"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"scripts":{"postactivate":"$SHELL __script/postactivate.sh"},"_id":"joosex-namespace-depended@0.15.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.1","dist":{"shasum":"62d58c350e2514fc72641f5e68145b9104014c0c","tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.15.0.tgz","integrity":"sha512-8BKuyZrsWRqFZPpwfgUWNdkzlrsNaT7f8evd5/H33nIhxWJbF2V84X36okBS9556I2P+HW3JELtInHuGZgKQ8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUWn0VTdl6+t8Baqi+JtwvPR64YW0/uDM5F2CHmiJ1EAIgMkxSZy9cG2RLBrCL8eM2uguqy8GI4egY1UhNXcmB9ns="}]}},"0.16.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.16.0","dependencies":{"joose":">= 3.16.0","joosex-meta-lazy":">= 0.3.1","joosex-simplerequest":">= 0.2.1"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"scripts":{"postactivate":"$SHELL __script/postactivate.sh"},"_id":"joosex-namespace-depended@0.16.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.1","dist":{"shasum":"b79f7c0ea496ad70edd866ab9fdf8074e8135010","tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.16.0.tgz","integrity":"sha512-GemyvPMybaTqPeTUIQ+5NlJDdQmcGUWDun9E2GhtWnkhAepU5KJdnHOtnL/bel/xAO4P0wQsQmS0xvqcKeJjZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICpWH3LBP7AZ64MEavV652ENOPyKDHoWoqcQsewr+288AiBxRJ5hbnevC2dTURcea90SS763c0E5BPhN4+4zgukKNg=="}]}},"0.17.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.17.0","dependencies":{"joose":">= 3.16.0","joosex-meta-lazy":">= 0.3.1","joosex-simplerequest":">= 0.2.1"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"lib/Task/JooseX/Namespace/Depended/NodeJS","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"scripts":{"postactivate":"$SHELL __script/postactivate.sh"},"_id":"joosex-namespace-depended@0.17.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.5","files":[""],"_defaultsLoaded":true,"man":[],"dist":{"shasum":"667ec52b02ca06d531580d75a8beb4615e77f67f","tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.17.0.tgz","integrity":"sha512-M9fuV3WMXgCeTo9wMYWCJNHNdnUtP37HYJ2sWO+ZqBFMJADEhJNfEDyNeN9gpEyGmMvOlijQPXlOAHYL/yk8Fg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHXVDWiBF/b6E2+5kb3k1WXONt5kmq7FFbS66e1U8PxRAiAigE0M+VBC6nWyRp6gxgWt0CgXol9/4PbpgQN08jNsXQ=="}]}},"0.18.0":{"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"directories":{"man":"./man","lib":"./lib","doc":"./doc/mmd"},"version":"0.18.0","dependencies":{"joose":">= 3.16.0","joosex-simplerequest":">= 0.2.1"},"name":"joosex-namespace-depended","author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"description":"Cross-platform (browser/NodeJS), non-blocking, dependencies handling implementation, integrated with Joose3","main":"joosex-namespace-depended-all.js","homepage":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","contributors":[],"_npmUser":{"name":"samuraijack","email":"nickolay8@gmail.com"},"_id":"joosex-namespace-depended@0.18.0","devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"man":[],"dist":{"shasum":"3d82c113a331b2b1b860193a7bf3fc3ed56f9f1c","tarball":"https://registry.npmjs.org/joosex-namespace-depended/-/joosex-namespace-depended-0.18.0.tgz","integrity":"sha512-IOi5sy5+zR/GMKlTep5CHzEWl5f1DpSfoDjXyBLbWlwaMRAz7hG48B3kkSonTdk4hR1LRNqhRHSF51ZDNuXaMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7TFzd7NPT/3dYLLsTfLVr6qBNZSuI7EmErnuDbXKSyAiEA5sLzqhuDYTalPYzosXZwcfiDVllpsvq80rFFBwedGSI="}]},"scripts":{},"maintainers":[{"name":"samuraijack","email":"nickolay8@gmail.com"}]}},"maintainers":[{"name":"samuraijack","email":"nickolay8@gmail.com"}],"author":{"name":"Nickolay Platonov","email":"nplatonov@cpan.org"},"repository":{"web":"http://github.com/SamuraiJack/JooseX-Namespace-Depended/tree","url":"git://github.com/SamuraiJack/JooseX-Namespace-Depended.git","type":"git"},"time":{"modified":"2022-06-19T04:47:26.892Z","created":"2011-01-12T18:40:56.367Z","0.09.0":"2011-01-12T18:40:56.367Z","0.10.0":"2011-01-12T18:40:56.367Z","0.11.0":"2011-01-12T18:40:56.367Z","0.12.0":"2011-01-12T18:40:56.367Z","0.13.0":"2011-01-12T18:40:56.367Z","0.14.0":"2011-01-12T18:40:56.367Z","0.15.0":"2011-01-12T18:40:56.367Z","0.16.0":"2011-01-23T09:40:31.435Z","0.17.0":"2011-06-27T06:59:22.008Z","0.18.0":"2012-03-08T16:15:28.393Z"},"users":{"fgribreau":true},"readme":"Name\n====\n\nJooseX.Namespace.Depended - a cross-platform (browser/NodeJS), asynchronous, 100% compatible with &lt;script&gt; tags dependencies handling, integrated with Joose3\n\nSYNOPSIS\n========\n\nSetup for browsers (see [Joose installation notes](http://joose.github.com/Joose/doc/html/Joose/Manual/Installation.html)):\n\n            <!-- Joose ->\n            <script type=\"text/javascript\" src=\"/jsan/Task/Joose/Core.js\"></script>    \n            \n                <!-- JooseX.Namespace.Depended - web-specific files only ->\n                <script type=\"text/javascript\" src=\"/jsan/Task/JooseX/Namespace/Depended/Web.js\"></script>\n    \n                <!-- or ->\n                \n                <!-- JooseX.Namespace.Depended - cross-platform bundle ->\n                <script type=\"text/javascript\" src=\"/jsan/Task/JooseX/Namespace/Depended/Auto.js\"></script>\n\n            \n            <script type=\"text/javascript\">\n                use.paths = [ 'lib', '/jsan' ] // this is default and can be omitted\n            </script>\n\nSetup for NodeJS:\n\n            // this extension is bundled into the following package\n            require('task-joose-nodejs')\n\n\nDeclare dependencies in various class builders:\n\n            Class('Some.Class', {\n                VERSION : 0.02,\n            \n                meta    : 'My.Meta',\n                \n                isa     : 'Super.Class',\n                \n                does    : {\n                    'Some.Role'         : 0.01,\n                    'Some.Other.Role'   : 0.02\n                },\n                \n                trait   : 'Some.Trait',\n                \n                has     : {\n                    \n                    attr : {\n                        meta    : 'Attribute.Meta',\n                        trait   : 'Attribute.Trait',\n                        \n                        is      : 'rw'\n                    }\n                },\n                \n                use     : [ 'Cant.Get.Enough' ],\n                \n                \n            body : function (module) {\n            \n                // All dependencies will be loaded here\n                \n            }})\n            \n            // 'Some.Class' is still fetching dependencies here, too early to instantiate it\n            \n        \nOr load them on-demand from code:\n\n        use({ 'Some.Class' : 0.01 }, function () {\n            \n            // Some.Class and all its dependencies are ready\n            \n            var obj = new Some.Class()\n        })\n\n\nINSTALLATION\n============\n\nFrom `npm`:\n\n    > [sudo] npm install joosex-namespace-depended\n\nTarballs are available for downloading at: <http://search.npmjs.org/#/joosex-namespace-depended>\n\n        \n\nDESCRIPTION\n===========\n\n`JooseX.Namespace.Depended` is a cross-platform (browsers/NodeJS) dependencies handling framework, tightly integrated with Joose3.\n\nIt allows you to refer to other (not yet loaded) classes/roles in your class declaration. Those classes will be loaded prior your class declaration.\nAll edge cases like referring to already loaded class, double loading, etc are handled correctly. \n\nIf you are reading this file as README from github, you may want to open [this link](http://samuraijack.github.com/JooseX-Namespace-Depended/) instead. \n\n\nUSAGE\n=====\n\nDependency descriptor\n---------------------\n\nAll dependencies should be specified with the *dependency descriptors*. In the simplest case, the descriptor is just a plain string \nwith the name of class:\n\n        'MyApp.Widget.Header'\n    \nIn more complex case, the descriptor is an object, which keys are classes names and values - their's versions:\n\n        {\n            'MyApp.Widget.Header'   : 0.03,\n            'MyApp.Util.Helper'     : 0.01\n        }\n        \nSuch descriptors can contain several dependencies, though they are limited to Joose classes only.\n\nIn general case, the dependency descriptor is an object with the following structure:\n        \n        {\n            type    : 'joose',\n            token   : 'MyApp.Widget.Header',\n            version : 0.03\n        }\n        \nSuch descriptor can contain exactly one dependency, with the resource of any type.\n\nSee also [delayed dependencies].\n\n\nThe rule\n--------\n\nGeneral rule is - whereever in your class declaration you can refer to other class (for example in the `does` builder) - you can specify the\ndependency descriptor instead. \n\nThis means, that you can specify the dependencies in:\n\n    - `meta` builder (!)\n    - `isa` builder\n    - `trait` builder\n    - `does` builder\n    \n    - `meta/trait` parameters of attributes\n    \nFor example this declaration is perfectly valid:    \n    \n            Class('Some.Class', {\n                meta : 'My.Meta',\n                \n                isa : 'Super.Class',\n                \n                does : {\n                    'Some.Role'         : 0.01,\n                    'Some.Other.Role'   : 0.02\n                },\n                \n                trait : 'Some.Trait',\n                \n                has : {\n                    \n                    attr : {\n                        meta    : 'Attribute.Meta',\n                        trait   : 'Attribute.Trait',\n                        \n                        is      : 'rw'\n                    }\n                }\n                \n                ...\n            })\n    \nAlso in any other custom builder (some [authoring][] required) \n\nThe framework will scan class declaration for dependencies, pre-load them, then substitute descriptors with actual classes and continue the declaration process.\n\n\n`use` builder\n-------------\n\nAdditionaly, you can provide an array of dependencies (or a single dependency) in the `use` builder:\n            \n            Class('Some.Class', {\n                \n                use : [ 'Some.Other.Class', 'Some.Other.Role' ],\n                \n                ...\n            })\n\n\n\nASYNCHRONOUS WARNING\n====================\n\nThis framework behaves totally asynchronously, so pay attention to the following notes. \n\nThe dependencies of the class won't be available immediately after class declaration:  \n\n            Class('Some.Class', {\n               \n                isa : 'Super.Class',\n                \n                does : {\n                    'Some.Role'         : 0.01\n                }\n            })\n            \n            // kaboom! - 'Super.Class' and 'Some.Role' are not yet loaded at this point\n            var a = new Some.Class \n\nDependencies will be available in the `body` builder of the class:\n\n            Class('Some.Class', {\n               \n                isa : 'Super.Class',\n                \n                does : {\n                    'Some.Role'         : 0.01\n                },\n                \n            body : function () {\n            \n                // ok\n                var a = new Some.Class()\n            }})\n\nIn general, for example if you've included some class with &lt;script&gt; tag, and that class has declared but not yet loaded dependencies,\nwrap the usage of the class with `use` from code (see below).\n\n\n`use` from code\n---------------\n\nYou can also load the dependencies from code:\n\n            use([ 'Some.Class1', 'Some.Class2' ], function () {\n                \n                var a = new Some.Class1()\n                var b = new Some.Class2()\n            })\n\n\nClass name -> file name conversion\n----------------------------------\n\nThe class name you are refering to, will be converted to file name using this simple scheme:\n\n        class name: MyClass\n        file  name: MyClass.js\n        \n        class name: Some.Class\n        file  name: Some/Class.js\n        \n        class name: Some.Other.Class\n        file  name: Some/Other/Class.js\n    \nGenerally each dot is replaced with directory separator, and the 'js' extension is appended to result\n    \n\nThe libraries\n-------------\n\nThe framework will look up the classes in several *libraries*, which are just the directories, containing the source files.\n\nThe current list of libraries is stored as an array in: `use.paths` (on NodeJS platform its just an alias of `require.paths`). Default value is:\n\n        use.paths = [ 'lib', '/jsan' ]\n\nYou can freely modify this value, however it will be a good idea to use only methods of array, which mutates it in-place.\n \nFor example, if you are running a test harness, as `t/index.html`, and would like to refer\nto your files, which are in `lib/`, you'll need to add the `../lib` entry with:\n\n        use.paths.unshift('../lib')\n\nFramework will scan through the libraries list sequentially and attempt to load the class from every entry.\nClass will be loaded from the first library, which contains the corresponded file. If there are no such file,\nloading will continue to another entry.\n\nFor example, if we are loading class `Some.Class`, and we have the default setting for libraries, then first it will be tried to load with the following URL:\n    \n        lib/Some/Class.js\n    \nIf there are no such file, the 2nd entry will be tried:\n        \n        /jsan/Some/Class.js\n\nIf there are no such file again, the exception will be thrown.\n\n\n\nATTRIBUTE HELPER\n================\n\nThis package adds a new [attribute initializer](http://joose.github.com/Joose/doc/html/Joose/Manual/Attributes.html): `Joose.I.FutureClass`\n\nIt can be used, when the default value of the attribute should be set to the constructor of some class, \nwhich may be not yet loaded on the declaration stage:\n\n\n        Class('MyApp.Widget.Template', {\n            \n            use : 'MyApp.Util.Helper',\n            \n            has : {\n                helperClass : Joose.I.FutureClass('MyApp.Util.Helper')\n            }\n        \n        })\n\n\nDELAYED DEPENDENCIES\n====================\n\nYou can also specify a \"delayed\" dependency descriptors, using the attribute helper:\n\n        Class('Some.Class', {\n            \n            use     : 'Task.Some.Bundle', \n            \n            does    : Joose.I.FutureClass('Some.Role.From.Bundle')\n        })\n        \nor just an arbitrary function (function shouldn't has a `meta` property):\n\n        Class('Some.Class', {\n            \n            use     : 'Task.Some.Bundle', \n            \n            does    : function () { return Some.Role.From.Bundle }\n        })\n        \n        \nThe framework won't attempt to load such descriptors. Instead, the provided function will called\nbefore class construction (when other \"real dependencies\" were already loaded). Function is supposed \nto return a class (or role) which will be used as part of the class declaration.\n\nThis feature is useful for example, when you'd like to depend from a file, containing definitions of several roles,\nand you'd like to use those roles in your class.  \n\n\nLOADING NON-JOOSE CODE\n======================\n\nTo load non-joose code, specify the descriptor with the 'javascript' type and with url to the source in token, as follows:\n        \n        {\n            type        : 'javascript',\n            \n            token       : 'MyApp/Widget/Header.js',\n            \n            presence    : function () {\n                return MyApp.Widget.Header\n            }\n        }\n\nNote the `presence` field. `presence` is function which should return `true` value, if the\nresource is already presented in the scope (for example has been loaded with the &lt;script&gt; tag). In such case, \nthe loading of resource will be skipped. `presence` can be specified as string, which will be `eval`ed (exceptions are caught).\n\n`type : 'javascript'` is optional if token contains \"/\" or ends with \".js\". So, the descriptor above \ncould be also written as:\n \n        {\n            token       : 'MyApp/Widget/Header.js',\n            \n            presence    : 'MyApp.Widget.Header'\n        }\n        \nIf the url in `token` is relative, then the it will prepended with paths from `use.paths` (each path will be checked, sequentially).\nIf the url is absolute (starts with \"/\" or \"http://\") or starts with \"=\" then it will be used directly and `use.paths` will be ignored: \n\n        {\n            token       : '=MyApp/Widget/Header.js', // ignore `use.path` settings\n            \n            presence    : 'MyApp.Widget.Header'\n        }\n        \nAlso, when specifying the descriptor as string, the type of the descriptor will be switched to 'javascript' if it contains the \"/\" or\nends with \".js\":\n\n\n        use('http://ajax.googleapis.com/ajax/libs/ext-core/3.1.0/ext-core.js', function () {\n            ...\n        })\n\nThe code above will load \"ext-core\" library. However, currently there is no way to specify the `presence` attribute in such descriptor\nand no checks will be performed prior loading (potentially allowing repeated loading). This may change in future versions.\n\n\nADDITIONAL INFORMATION\n======================\n\nUsing this library in browsers\n------------------------------\n\nJooseX.Namespace.Depended is 100% compatible with &lt;script&gt; tag loading and files concatenation. Some notes:\n\n- Make sure you always use `presence` when loading non-joose code to avoid double-loading.\n- Remember the asynchronous behavior.\n\nAdditionally, if you will concatenate your JS files in the single file *in the correct order* (which is not required(!))\nyou'll receive a synchronous execution of the whole file (no `setTimeout` delays).\n\n\nDebugging in firebug\n--------------------\n\nWhen debugging the code, loaded with JooseX.Namespace.Depended in FireBug, switch to the \"Show Static and eval Scripts\" option\non the Scripts panel (2nd button from on the toolbar, probably \"static\"). Also make sure, the \"Decompile for eval() sources\" option is *unchecked*\notherwise Firebug will re-format your sources.\n\n\nChanging the default transport/materialization (advanced)\n---------------------------------------------------------\n\nBy default, JooseX.Namespace.Depended will fetch the source files with asynchronous XHR request and execute it with \"eval\". \n\nYou may want to change this behavior, for example switch to using &lt;script&gt; tags for loading & execution (unreliable in IE):\n\n            <script type=\"text/javascript\" src=\"/jsan/Task/JooseX/Namespace/Depended/Web.js\"></script>\n            <script type=\"text/javascript\">\n                \n                JooseX.Namespace.Depended.Resource.JavaScript.meta.extend({\n                    \n                    doesnt  : [ JooseX.Namespace.Depended.Transport.XHRAsync, JooseX.Namespace.Depended.Materialize.Eval ],\n                    \n                    does    : JooseX.Namespace.Depended.Transport.ScriptTag\n                })\n                \n                use.paths = [ 'lib', '/jsan' ]\n            </script>\n\n\nUsing this library in NodeJS\n------------------------------\n\nWhen using this framework on NodeJS platform, the `use.paths` will be an alias of `require.paths`.  \n\nFor additional information, please refer to the documentation of the [Task.Joose.NodeJS](http://samuraijack.github.com/Task-Joose-NodeJS)\n\n\nAuthoring\n---------\n\nFramework is highly customizable, additional resources/transport/materialization modes can be easily added.\nPlease refer to [JooseX.Namespace.Depended.Authoring][authoring] for more information. \n\n\n\nGrouped loading mode\n--------------------\n\nThis framework can operate in special mode, in which it can load *any* class, with *any number* of dependencies (in-depth),\nwith **2** http requests.\n\nFor more information about this mode please refer to <http://www.extjs.com/forum/showthread.php?t=69161> \n\nThis item is currently in TODO list.  \n\n\n\nGETTING HELP\n============\n\nThis extension is supported via github issues tracker: <http://github.com/SamuraiJack/JooseX-Namespace-Depended/issues>\n\nFor general Joose questions you can also visit [#joose](http://webchat.freenode.net/?randomnick=1&channels=joose&prompt=1) on freenode or the mailing list at <http://groups.google.com/group/joose-js>\n\n\nSEE ALSO\n========\n\n[Authoring this framework][authoring]\n\nBase resource class: [JooseX.Namespace.Depended.Resource](Depended/Resource.html)\n\nWeb page of this module: <http://github.com/SamuraiJack/JooseX-Namespace-Depended/>\n\nGeneral documentation for Joose: <http://joose.github.com/Joose/>\n\n\nBUGS\n====\n\nAll complex software has bugs lurking in it, and this module is no exception.\n\nPlease report any bugs through the web interface at <http://github.com/SamuraiJack/JooseX-Namespace-Depended/issues>\n\n\n\nAUTHORS\n=======\n\nNickolay Platonov <nplatonov@cpan.org>\n\n\n\nCOPYRIGHT AND LICENSE\n=====================\n\nCopyright (c) 2010, Nickolay Platonov\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n* Neither the name of Nickolay Platonov nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. \n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n\n\n[authoring]: Depended/Authoring.html\n","readmeFilename":""}