Requirements - ANybakk/Snorky GitHub Wiki
This page lists the requirements.
| 01 | Use of the library should not require any special code in a UI template except in the form of link, script or meta tags located in the HTML header. |
| 02 | The library script is not allowed to change any elements in a UI template. The only thing allowed is code duplication when inserting query results with multiple items. |
| 03 | Insertion must always use structure specified in the UI template. |
| 04 | The library must offer default operation with minimal configuration. |
| 05 | It must be possible to bind a SPARQL query that is referred in the UI template to any given UI template element. |
| 06 | By default, mapping should be automatically performed by comparing the tag names (without prefix) of the bound element's children to the variable names in the query result. Alternatively, if regular HTML UI is used, names are compared to class attribute values. |
| 07 | Manual property-element mapping must be possible. |
| 08 | By default, a query result should be inserted by duplicating the bound element's child for each item in the result. If there are more than one child, only the first should be used. |
| 09 | It should be possible to disable code duplication. In such cases, if the number of items in a result surpass the number of children, those items will not be inserted. |
| 10 | Automatic polling must be configurable in milliseconds between polls. |
| 11 | There must be support for user-invoked polling through element binding. |
| 12 | Polling must be possible to be triggered manually through a JavaScript/DOM event. |
| 13 | States (such as "bound", "loading" and "loaded") must be made available through JavaScript/DOM events and CSS classes. |
| 14 | The core functionality should also be possible to use on a JavaScript server environment such as Node.js. |
| 15 | The library should follow CommonJS specifications where that makes sense. |