 |
| | jMaki Homepage | jMaki Wiki
Discussions on jMaki Data Models | |
< < | Here is the place for discussions on the data models in jMaki. See Carla's blog for the documentation of the data models supported in the .9 release of jMaki. After some discussions and feedback we want to update the models to support additional features.
Because some of the discussion are long, discussions for the various data models are on their own wiki pages listed below. | > > | Standardized data and event models simplify interactions between the widgets and simplifies the programming model so developers can quickly build rich web applications. The following pages describe the jMaki data and event models in detail. Below is a list of widgets and the models that they support. | | | jMaki Accordion Data Module discussion | | | jMaki Tabbed View Data Module discussion | |
> > | Widgets supporting models
| Model | Widgets |
| Menu | Yahoo Menu, jMaki Menu, jMaki Tab Menu, jMaki Accordion Menu |
| Table | Yahoo Datatable, Dojo Table |
| Tree | Yahoo Tree, Dojo Tree |
| Combobox | Dojo Combobox |
| Accordion or Tabbed View | Dojo Accordion, Dojo Tabbedview, Yahoo Tabbedview, Spry Accordion |
| Fisheye | Dojo Fisheye |
| Drawer | Dojo Drawer |
| | | Conventions
The data models are described using BNF notation. |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | Conventions
The data models are described using BNF notation. | |
< < | The following definitions are used in the specifications: | > > | The following terminals are used in the specifications: | | | JavaScript object literal = an object literal as described in the JavaScript programming language |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | Conventions
The data models are described using BNF notation. | |
< < |
Some definitions used in the specifications: | > > | The following definitions are used in the specifications: | | | JavaScript object literal = an object literal as described in the JavaScript programming language |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | Some definitions used in the specifications:
JavaScript object literal = an object literal as described in the JavaScript programming language | |
> > | | | | string = Alphanumeric characters | |
< < | CSS | > > | CSS markup = valid CSS markup | | | |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | The data models are described using BNF notation. | |
< < | Some definitions: | > > | Some definitions used in the specifications: | | | JavaScript object literal = an object literal as described in the JavaScript programming language | |
> > | string = Alphanumeric characters
CSS | | | |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | Conventions | |
< < | The data models are described using BNF notation. | > > | The data models are described using BNF notation. | | |
Some definitions: |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models
Here is the place for discussions on the data models in jMaki. See Carla's blog for the documentation of the data models supported in the .9 release of jMaki. After some discussions and feedback we want to update the models to support additional features. | |
< < | Discussions for the various data models are on their own wiki pages listed below: | > > | Because some of the discussion are long, discussions for the various data models are on their own wiki pages listed below. | | | jMaki Menu Data Model discussion |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | Discussions for the various data models are on their own wiki pages listed below: | |
< < | Maki Menu Data model discussion? | > > | Maki Menu Data model discussion | | | |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models
Here is the place for discussions on the data models in jMaki. See Carla's blog for the documentation of the data models supported in the .9 release of jMaki. After some discussions and feedback we want to update the models to support additional features. | |
< < | Menus | > > | Discussions for the various data models are on their own wiki pages listed below: | | | | |
< < | All menus in .9 release should support the following data model. Current example of the menu data model is as follows using JSON format.
{menu: [
{ label:'Must Read',
menu: [
{ label:'Slashdot', url:'http://www.slashdot.org' },
{ label:'dev.java.net', menu: [
{label : 'jMaki',url:'http://ajax.dev.java.net'},
{label : 'Glass',url:'http://glassfish.dev.java.net'}
] }
]
},
{ label:'Click me for fun!',style:{strongemphasis:true} },
{ label:'Disabled!',style:{disabled:true} },
{ label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
{ label:'Oracle', url:'http://www.oracle.com' }
]}
This however doesn't support the feature where a page can be loaded by the dcontainer. There needs to be a way to publish a URL without navigating to the URL so that
the injector can do the work.
The proposal for doing that is as follows starting from the example above:
{menu: [
{ label:'Must Read',
menu: [
{ label:'Slashdot', url:'http://www.slashdot.org' },
{ label:'dev.java.net', menu: [
{label : 'jMaki',url:'http://ajax.dev.java.net'},
{label : 'Glass',url:'http://glassfish.dev.java.net'}
] }
] },
{ label:'Click me for fun!',style:{strongemphasis:true} },
{ label:'Disabled!',style:{disabled:true} },
{ label:'Google', publish:'http://www.google.com' },
{ label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
{ label:'Oracle', url:'http://www.oracle.com' }
]}
One addtional thing to consider is lazy loading. In the case of tabs, we may want to load the pages when the user clicks on the tab and not when the page is loading.
That would mean adding a property to url to indicate lazy loading. I tried to specify the model in a BNF like notation to avoid confusion.
topMenu ::= "{" <menu> "}"
menu ::= menu: "[" <label> {<label>} "]"
label ::= "{" label: <text>, <menu> | <url>, | <pulbish>, | [style] "},"
url::= url: <text>
publish ::= publish: <text>
style ::= style: "{" <disabled> | <checked> | <strongemphasis> "}"
disabled ::= disabled: true
checked ::= checked: true
strongemphasis ::= strongemphasis: true
Note: text is the topic name to publish to
Comment (ntruchsess):
I'd suggest to allow both the topic and the actual message to be set:
publish ::= publish: <text>
message ::= message: <text>
- message being what is going to be sent to the topic
- publish being the topic name to publish to (if not set, publish to the topic name that is set in the widget-args)
Take 2: Incorporating the feedback from the team here is the latest rev of the data model. We wanted to
add an action property which allows users to specify the message to publish and the topic to publish to.
If no topic is specified then the default topic is used. We want the message to be a string or JavaScript
object literal and this may need additional specification. Also we want to be able to specify CSS which
is passed through to the underlying widget.
menuBar ::= "{" <menu> "}"
menu ::= "menu:" "[" <label> {<label>} "]"
label ::= "{" "label:" <string>, [<menu> | <url> | <action> | <disabled> | <checked> | <style> ] "},"
url::= "url:" <string> ,
action ::= "action:" "{" [<topic>] <message> "},"
topic ::= "topic:" <string>,
message ::= "message:" <obj>
obj ::= <string> | <object literal>
style ::= "style:" "{" <valid CSS here> "}"
disabled ::= "disabled: true"
checked ::= "checked: true"
| > > | Maki Menu Data model discussion? | | | |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | {label : 'jMaki',url:'http://ajax.dev.java.net'},
{label : 'Glass',url:'http://glassfish.dev.java.net'}
] } | |
< < | ]
}, | > > | ] }, | | | { label:'Click me for fun!',style:{strongemphasis:true} },
{ label:'Disabled!',style:{disabled:true} },
{ label:'Google', publish:'http://www.google.com' }, | | | - message being what is going to be sent to the topic
- publish being the topic name to publish to (if not set, publish to the topic name that is set in the widget-args) | |
> > | Take 2: Incorporating the feedback from the team here is the latest rev of the data model. We wanted to
add an action property which allows users to specify the message to publish and the topic to publish to.
If no topic is specified then the default topic is used. We want the message to be a string or JavaScript
object literal and this may need additional specification. Also we want to be able to specify CSS which
is passed through to the underlying widget.
menuBar ::= "{" <menu> "}"
menu ::= "menu:" "[" <label> {<label>} "]"
label ::= "{" "label:" <string>, [<menu> | <url> | <action> | <disabled> | <checked> | <style> ] "},"
url::= "url:" <string> ,
action ::= "action:" "{" [<topic>] <message> "},"
topic ::= "topic:" <string>,
message ::= "message:" <obj>
obj ::= <string> | <object literal>
style ::= "style:" "{" <valid CSS here> "}"
disabled ::= "disabled: true"
checked ::= "checked: true"
|
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | Note: text is the topic name to publish to | |
> > | Comment (ntruchsess):
I'd suggest to allow both the topic and the actual message to be set:
publish ::= publish: <text>
message ::= message: <text>
- message being what is going to be sent to the topic
- publish being the topic name to publish to (if not set, publish to the topic name that is set in the widget-args) |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | strongemphasis ::= strongemphasis: true
| |
< < | Note: lazyload is false by default | > > | | | | Note: text is the topic name to publish to |
| | -- Main.carlavmott - 17 May 2007 | |
< < | Discussions on jMaki Data Models | > > | Discussions on jMaki Data Models | | | Here is the place for discussions on the data models in jMaki. See Carla's blog for the documentation of the data models supported in the .9 release of jMaki. After some discussions and feedback we want to update the models to support additional features. | |
< < | Menus | > > | Menus | | | | |
< < | All menus in .9 release should support the following data model. | > > | All menus in .9 release should support the following data model. Current example of the menu data model is as follows using JSON format. | | |
{menu: [
{ label:'Must Read', | | | This however doesn't support the feature where a page can be loaded by the dcontainer. There needs to be a way to publish a URL without navigating to the URL so that
the injector can do the work. | |
< < | The proposal for doing that is as follows: | > > | The proposal for doing that is as follows starting from the example above: | | |
{menu: [
{ label:'Must Read', | | | { label:'Disabled!',style:{disabled:true} },
{ label:'Google', publish:'http://www.google.com' },
{ label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} }, | |
< < | { label:'Oracle', url:'http://www.oracle.com', lazyload:true } | > > | { label:'Oracle', url:'http://www.oracle.com' } | | | ]}
One addtional thing to consider is lazy loading. In the case of tabs, we may want to load the pages when the user clicks on the tab and not when the page is loading.
That would mean adding a property to url to indicate lazy loading. I tried to specify the model in a BNF like notation to avoid confusion. | |
< < | menu ::= "{" menu: "[" | > > | topMenu ::= "{" | | | publish ::= publish:
style ::= style: "{" | | "}"
disabled ::= disabled: true |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | url::= url: [lazyload]
lazyload ::= lazyload: true
publish ::= publish: | |
< < | style ::= style: "{" | "}" | > > | style ::= style: "{" | | "}"
disabled ::= disabled: true
checked ::= checked: true
strongemphasis ::= strongemphasis: true | | |
Note: lazyload is false by default |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | That would mean adding a property to url to indicate lazy loading. I tried to specify the model in a BNF like notation to avoid confusion. | |
< < | menu ::= { menu: '[' | > > | menu ::= "{" menu: "[" | | | url::= url: [lazyload] | |
< < | lazyload ::= lazyload: true Note: lazyload is false by default
publish ::= publish: Note: text is the topic name to publish to
style ::= style: { | } | > > | lazyload ::= lazyload: true
publish ::= publish:
style ::= style: "{" | "}" | | | | |
> > | Note: lazyload is false by default
Note: text is the topic name to publish to |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | That would mean adding a property to url to indicate lazy loading. I tried to specify the model in a BNF like notation to avoid confusion. | |
< < | menu ::= 'menu:' | > > | menu ::= { menu: '[' | | | |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | menu: [
{ label:'Slashdot', url:'http://www.slashdot.org' },
{ label:'dev.java.net', menu: [ | |
< < | {label : 'jMaki',url:'http://ajax.dev.java.net'}, {label : 'Glass',url:'http://glassfish.dev.java.net'} | > > | {label : 'jMaki',url:'http://ajax.dev.java.net'},
{label : 'Glass',url:'http://glassfish.dev.java.net'} | | | ] }
]
},
{ label:'Click me for fun!',style:{strongemphasis:true} },
{ label:'Disabled!',style:{disabled:true} }, | |
< < | { label:'Yahoo!', url:'http://www.yahoo.com' }, | | | { label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
{ label:'Oracle', url:'http://www.oracle.com' }
]} | | | menu: [
{ label:'Slashdot', url:'http://www.slashdot.org' },
{ label:'dev.java.net', menu: [ | |
< < | {label : 'jMaki',url:'http://ajax.dev.java.net'}, {label : 'Glass',url:'http://glassfish.dev.java.net'} | > > | {label : 'jMaki',url:'http://ajax.dev.java.net'},
{label : 'Glass',url:'http://glassfish.dev.java.net'} | | | ] }
]
},
{ label:'Click me for fun!',style:{strongemphasis:true} },
{ label:'Disabled!',style:{disabled:true} }, | |
< < | { label:'Yahoo!', url:'http://www.yahoo.com' }, | | | { label:'Google', publish:'http://www.google.com' },
{ label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} }, | |
< < | { label:'Oracle', url:'http://www.oracle.com' } | > > | { label:'Oracle', url:'http://www.oracle.com', lazyload:true } | | | ]}
One addtional thing to consider is lazy loading. In the case of tabs, we may want to load the pages when the user clicks on the tab and not when the page is loading. | |
> > | That would mean adding a property to url to indicate lazy loading. I tried to specify the model in a BNF like notation to avoid confusion.
menu ::= 'menu:' <label> | <menu>
label ::= 'label:' <url> | <pulbish>
url::= 'url:' <text> [lazyload]
lazyload ::= 'lazyload; true' lazyload is false by default
publish ::= 'publish:' <text> text is the topic name to publish to
| | | |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | | | Menus
All menus in .9 release should support the following data model. | |
< < | | > > | | | | {menu: [
{ label:'Must Read',
menu: [ | | | { label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
{ label:'Oracle', url:'http://www.oracle.com' }
]} | |
< < | | > > | | | | This however doesn't support the feature where a page can be loaded by the dcontainer. There needs to be a way to publish a URL without navigating to the URL so that
the injector can do the work.
The proposal for doing that is as follows: | |
< < | | > > | | | | {menu: [
{ label:'Must Read',
menu: [ | | | { label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
{ label:'Oracle', url:'http://www.oracle.com' }
]} | |
< < | | > > | | | | One addtional thing to consider is lazy loading. In the case of tabs, we may want to load the pages when the user clicks on the tab and not when the page is loading. |
| | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | |
< < | Here is the place for discussions on the data models in jMaki. See Carla's blog for the documentation of the data models supported in the .9 release of jMaki. After some discussions and feedback we want to update the models to support | > > | Here is the place for discussions on the data models in jMaki. See Carla's blog for the documentation of the data models supported in the .9 release of jMaki. After some discussions and feedback we want to update the models to support additional features.
Menus
All menus in .9 release should support the following data model.
{menu: [
{ label:'Must Read',
menu: [
{ label:'Slashdot', url:'http://www.slashdot.org' },
{ label:'dev.java.net', menu: [
{label : 'jMaki',url:'http://ajax.dev.java.net'}, {label : 'Glass',url:'http://glassfish.dev.java.net'}
] }
]
},
{ label:'Click me for fun!',style:{strongemphasis:true} },
{ label:'Disabled!',style:{disabled:true} },
{ label:'Yahoo!', url:'http://www.yahoo.com' },
{ label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
{ label:'Oracle', url:'http://www.oracle.com' }
]}
This however doesn't support the feature where a page can be loaded by the dcontainer. There needs to be a way to publish a URL without navigating to the URL so that
the injector can do the work.
The proposal for doing that is as follows:
{menu: [
{ label:'Must Read',
menu: [
{ label:'Slashdot', url:'http://www.slashdot.org' },
{ label:'dev.java.net', menu: [
{label : 'jMaki',url:'http://ajax.dev.java.net'}, {label : 'Glass',url:'http://glassfish.dev.java.net'}
] }
]
},
{ label:'Click me for fun!',style:{strongemphasis:true} },
{ label:'Disabled!',style:{disabled:true} },
{ label:'Yahoo!', url:'http://www.yahoo.com' },
{ label:'Google', publish:'http://www.google.com' },
{ label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
{ label:'Oracle', url:'http://www.oracle.com' }
]}
One addtional thing to consider is lazy loading. In the case of tabs, we may want to load the pages when the user clicks on the tab and not when the page is loading. | | | |
|
< < | | | | -- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models | |
> > | Here is the place for discussions on the data models in jMaki. See Carla's blog for the documentation of the data models supported in the .9 release of jMaki. After some discussions and feedback we want to update the models to support |
|
< < | | | | -- Main.carlavmott - 17 May 2007 | |
< < | Discussions on jMaki Data Models | > > | Discussions on jMaki Data Models | | | |
|
> > |
-- Main.carlavmott - 17 May 2007
Discussions on jMaki Data Models |
|