Skip to content

nathanoehlman/registry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Registry

It's a bucket. A Javascript bucket. A big Javascript bucket for defining your modules, classes, configuration objects, etc. While we could throw around different acronyms like IoC, AOP and the like, nothing quite fits exactly how registry works. But they do give you a feel for the concepts and inspiration behind the project.

The Importance of Namespaces

Registry uses namespaces to pragmatically define the purpose of a class, module or function. Items are stored in the registry under a namespace and can be accessed either directly by the namespace, or by wildcard matches.

Consider the following example:

// define a (pretend) loader that can read from a local files 
registry.define('loader.file', function() {
    return {
        load: function(target) {
        }
    };
});

// create a new loader instance (using a wildcard )
var loader = registry('loader').create();

About

JS IoC implementation #experimental

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published