Documentation

Plugins/Claypool

From jQuery JavaScript Library

Jump to: navigation, search

« Back to the jQuery Claypool Plugin page

Claypool is a small, fast, railable Javascript Application Framework, built on jQuery that provides all the usual important patterns for large, long-lived client-side apps, server-side apps, or something strangely, beautifully in the middle.

Contents

Get Lazy!

Lazy is important with limited resources. How is it possible to not create the event handler you need in your application before your application component is used?

The answer is to be lazy. jquery.claypool.js provides routers to stand in between the framework and the application, so events can be registered up front, and the actual component can be created only when it's required by the actualization of a relevant event. It's like TiVo for jquery.

Cool X-Ray Glasses

Using a couple simple conventions to create routers, tune logging levels, toggle development or production setting, scan for application components, your applications wiring becomes transparent to other developers.

jquery.claypool also provides a full featured, highly efficient category logging implementation so you can quickly debug very specific areas of your application in any browser or even running in Rhino. And when you turn it off you will see nearly zero impact on performance. Claypool itself is fully instrumented with category logging so you can always peer under the runtime hood.

Write Less, Do More

Lazy also mean we don't want to have to configure any more than required unless our application really, really, really needs it.

jquery.claypool provides highly railable patterns to avoid configuration, while giving your application tons of space to grow. We didnt try to think of every thing, only what 90% of you will need anyway.

Plugin Methods for Users

Just a couple plugin methods are all that is required to take advantage of jquery.claypool.js!

NameType
Plugin methods:
























NameType
$( id, obj )Returns: Object
Retrieves or sets an object saved in application context
config( idobj )Returns: Object
Retrieves or extends the entire configuration, or a subset of the configuration.
env( name, env )Returns: Object
Sets, extends, or retrieves properties from the environment.
logger( category )Returns: Object
Retrieves or creates a category logger.
boot( callback )Returns: Object
Triggers the application framework to initialize, reading in all configurations and scan paths.
reboot( callback )Returns: Object
Causes the application to re-read configurations.

Plugin Methods for Developers

As a framework plugin, jquery.claypool.js is very extensible and uses these plugins internally while providing them externally for serious developers who want to extend the framework itself.

NameType
Plugin methods:



















Plugins/Claypool/serve Plugins/Claypool/

NameType
guid( )Returns: Object
Creates a globally unique identifier
resolve( id )Returns: Object
Resolves a string into object.
register( context, prioty )Returns: Object
Register the context to be searchable.
manage( container, nickname )Returns: Object
Adds the containers object pool to the pool of application managed objects.
router( id, options )
Creates a new low level router.

Application Organization Conventions

jquery.claypool.js encourages the following conventions for building applications or application plugins so that other developers can take advantage of the fore knowledge of where to look to immediately be efficient contributors.