Changes between Initial Version and Version 1 of FAQ_Internals


Ignore:
Timestamp:
Mar 8, 2006, 7:56:44 PM (12 years ago)
Author:
dkearney
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ_Internals

    v1 v1  
     1= How does Rappture1.x really work? =
     2
     3This is how it works, from start to finish:
     4
     5First, the user launches an application, the gui searches for
     6and visualizes the tool.xml file. Next, the user fills in the
     7values in gui and clicks simulate.
     8
     9Behind the scenes, the gui takes all of the values that the user
     10chose and places them into a file called driverNNNN.xml, where NNNN
     11is a number generated by the rappture gui. After generating the driver file,
     12the gui queries the tool.xml file for the data at the path "tool.command"
     13to determine the program to run. For more information on reading xml paths,
     14visit [wiki:FAQ_XmlPathNames ].
     15
     16"tool.command" is usually located in the first part
     17of the driver file and tends to looks like this:
     18
     19{{{
     20<?xml version="1.0"?>
     21<run>
     22    <tool>
     23        <about>Press Simulate to view results.</about>
     24        <command>tclsh @tool/fermi.tcl @driver</command>
     25    </tool>
     26    ...
     27<run>
     28}}}
     29
     30In the above example, the gui would be looking for a file called
     31'fermi.tcl' and try to execute it with driver file as its first
     32argument. For more information on what @tool and @driver mean, check out
     33this page [wiki:rappture_xml_elements describing rappture xml elements]
     34
     35Next, the gui executes the program specified in "tool.command"
     36The program that is executed is generally the science application
     37or a wrapper script.
     38
     39Generally people embed Rappture library calls into their code as
     40the standard mechanism for i/o for their code. This requires the use of
     41the [wiki:Documentation Rappture API's]. For compiled codes, this also
     42means the developer will need to be sure to
     43[wiki:FAQ_CompileAgainstRappture compile against the Rappture library].
     44
     45For legacy codes that have already been well developed and standardized,
     46there is the option to use a wrapper script around the science code.
     47The purpose of the wrapper script is to retrieve the user's inputs from
     48the xml file and produce an equivalent input deck for the science code.
     49The wrapper script is also responsible for executing the science code,
     50parsing the science code's output, and placing this output back into
     51the gui. More information on the basic flow of science codes and wrapper
     52scripts, check out [wiki:FAQ_WrapperScriptBasics Wrapper Script Basics]
     53
     54After the science code or wrapper script has completed, it sends a signal
     55to the gui by calling the result() function. The gui receives the signal
     56that the application has completed, looks for the runNNNN.xml file that was
     57automatically generated by the result() function and visualizes the output.
     58
     59
     60[wiki:FAQ Back to Frequently Asked Questions]
     61