Engine Service
The Engine service is a declarative language parser.
It optionally uses the Task Service to bootstrap dependencies, such as the engine.config.xml, config.xml, and ValidationPatterns.xml files.
After all task dependencies are complete, each Engine applies an Engine Configuration.
An Engine Configuration may be itself, declared as self, or a named configuration group.
scans its child nodes. If a node is defined, the scan continues through the node's children.
A node is defined when it has a corresponding object-definition. The definition describes the implementation, constructor, and any required parameters.
Dynamic parameter values are supported for passing attribute or node references, or XPath expressions.
The XHTMLComponent definition branches the node to the XHTMLFormComponent library if it is a form field, and to the Application Component library if an application component id is specified.
API: org.cote.js.engine
Engine Abstraction
Engine configurations can be used to switch blocks of content and to describe declarative implementations of third party widgets.
For example, a custom element such as <MyElement /> can be defined as programattic connector or even a placeholder to a widget provided by another framework.
Once the definition is specified, no code need be written. Just use your custom element.
API: org.cote.js.engine
Virtual Forms
The XHTMLFormComponent library creates virtual forms for aggregating user input for the lifecyle of a Web 2.0 application.
In doing so, it creates a Virtual Form.
The forms are virtual in that the data exists and belongs to a collection of form values, but the HTML representing the form and form fields do not need to exist.
As XML and HTML nodes are processed by an Engine, the corresponding XHTMLComponent object-definition will implement and initialize any corresponding XHTMLFormComponent or Application Component objects.
When a new input field processed through the XHTMLComponent, it is synchronized against a Virtual Form that is automatically created for the Engine.
At that time, any existing values for the field are applied.
The special rid attribute is used to specify a context-sensitivie friendly name.
In this manner, a single template containing several form fields can co-exist on a single page, but in differert Virtual Forms.
If a Virtual Form fields exists within an HTML form, the fields are submitted to the server as normal.
Or, the virtual form can easily be serialized into XML for an AJAX call to the server.
INPUT, SELECT, and TEXTAREA fields are automatically added to virtual forms when included inside an Engine.
API: org.cote.js.xhtml.form
Engine Configuration and Component Templates
Documentation: Engine Configuration