1 / 8

JavaScript Context (Unique, shared)

Definitions. Models. Text Sink (1, inherited). Definitions. Models. Definitions (N, inherited). Models ( N,inherited ). JavaScript Context (Unique, shared). Context Elements. < JSeance />. Source. Engine. Output. Model. < JSeance />. Model. Model. <XML/>. Template.

shepry
Download Presentation

JavaScript Context (Unique, shared)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Definitions Models Text Sink (1, inherited) Definitions Models Definitions (N, inherited) Models (N,inherited) JavaScript Context (Unique, shared) Context Elements <JSeance/>

  2. Source Engine Output Model <JSeance/> Model Model <XML/> Template Any Text Format <XML:JSeance/> Java + JavaScript Code Code Code

  3. <JSeance/> Features E4X Support and Iterators External Includes with dependency validation Multiple XML Input Models Multiple Output Files Context Sensitive State Management JavaScript Engine (Rhino) Conditional Expressions Runtime Template Parameterization

  4. Example Application Layers Code Generation Feasibility User Interface Business Logic Data Access API Stored Procedures Database Schema Auto-generation candidate Code must be written manually

  5. Legend RootNode Context 1 RootNode Node1 Context 2 XML Node Node1 Node1 Node 1.1 Context # Execution order Node1.1 3 Parent Context Copy of Parent + Local modifications Node 1.2 Context Node1.2 4 Context Rules Node2 Context 5 Node2 Node 2.1 Context Node2.1 6 Node 2.2 Context Node2.2 7

  6. XML Models • Collection of XML models loaded in the template • Each model has: • A unique name • Root node • Current node XML Model (name) Root Node Current Node Definitions • Definitions are named variables used for explicitly passing data to included templates or for naming commonly-used values Definition (name) Text Sink • Destination for text produced by children elements, text outputs up the node chain until a Text Sink is found

  7. Template Model Text Text FileOutput Children Conditional If Children ElseIf Children Else Children Switch Case Children Default Children Definition Children Include OutputIterator Children JavaScript Children Child elements can be any green node Children

More Related