Search |
||
jMaki ExtensionsPosted by gmurray71 on June 7, 2007 at 3:37 PM PDT
Just when we thought it was safe to call jMaki feature complete we got a lot of feedback for various features that could all be handled by a single extension feature. What are extensions in jMaki? Extensions are behavior / functionality that are shared across widgets. Extensions are loaded after the What does an extension look like?
jmaki.namespace("jmaki.extensions.jmaki.ext.bar");
jmaki.extensions.jmaki.ext.bar.Extension = function(args) {
jmaki.debug = true;
jmaki.log("jMaki bar Extension intialized");
jmaki.log("jMaki bar : extensionDir=" + args.extensionDir);
}
Extensions are namespaced JavaScript objects that are mapped in the
{
'config': {
'version': '.9.3',
'extensions' : [
'jmaki.ext.foo'
]
}
}
Extensions are like widgets in that the application will look under
resources
|
+jmaki
|
+ext
|
+foo
|
+extension.js
Extensions can also be loaded on a per URL basis or based on a wildcard like you may see in the code below:
{
'config': {
'version': '.9.3',
'extensions' : [
{ url : '/basicArgs.jsp', name : 'jmaki.ext.foo' },
{ url : '*.jsp', name : 'jmaki.ext.bar'},
{ url : '/relativedir/*', name : 'jmaki.ext.foo', args : { 'topic' : 'footopic'}}
]
}
}
Notice the We also plan on adding a page level tag and or function for adding functions in the next release. It is our hope to keep the core of jMaki small and nimble. At the same time we want to future proof jMaki.Extensions are available in the PHP, Phobos, and Java versions of jMaki and may be found at the jMaki Downloads page. Here are some extensions we are thinking about:
What kind of extensions would you like to see for jMaki? »
Related Topics >>
Java Enterprise Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|