Engine Demonstration #1

[ engine demonstrations | engine overview | imnmotion.com | Stephen W. Cote ]

Engine Demonstration #1 exemplifies a basic engine implementation that directly loads a simple config file, using a declarative syntax on the engine element. The files required for this demonstration are as follows:

The purpose of this demonstration is to show the declarative syntax used to configure an engine object from an otherwise regular div element. The specified configuration identifies an external file which may contain arbitrary XHTML or Engine-specific elements, instructs the Engine Service to use this engine object as the configuration task, and identifies a configuration to apply when the configuration file is loaded. The only script statically declared on this page simply enables auto-loading of the engine element, which can also be pre-configured.

If you see the text Engine Loaded in the following block, then the demonstration succeeded. If the engine is not started text does not vanish, you may be using an unsupported browser or there may be a bug in the software.

engine is not started

The Engine for Web Applications should start almost immediately. If this message does not disappear, there may be a bug with the software, a connectivity problem to the server, or you may be using an unsupported browser.

HTML for Declaration

The following HTML represents the engine declaration used for this demonstration, and the script used to enable auto loading. Please note that auto loading is disabled for the pre-configured public release, and must be enabled for the EngineService to automatically inspect the page for engine elements.


<script type = "text/javascript"><!--
if(
   typeof _js_validate_package == "function"
   &&
   _js_validate_package("org.cote.js.engine.EngineService")
){
   org.cote.js.engine.EngineService.setAutoLoad(1);
}			
//--></script>
		
<div
   is-engine = "1"
   engine-action = "/path/engine_config.xml"
   engine-action-type = "xml"
   engine-config-task = "engine_loader"
   engine-config = "demonstration_1"
   class = "some css class"
>
   <!-- VOLATILE_CONTENT -->
</div>