An interesting addition within the work we did with the embedded CLI stems from the fact that apart from the application embedding its own shell interpreter, it also embeds its presentation (web-based) GUI. (This was accomplished by embedding the Jakarta-Tomcat servlet engine).
The presentation code was designed and implemented to - after all the GUI manipulation, wizard interaction, etc. are done - boil down to the generation of a command in canonical form.
The CLI functional equivalent was chosen to be that canonical form (in essence the
argv list for the CLI command). In that way
we were able to implement GUI Capture for later replay in a
reasonably easy manner, and comply with directives such as anything
done on the GUI should be able to be done in a CLI.
The user is able to toggle GUI capture, and at his own discretion, the user is able to dump the accumulated activity to a file. Such file can later be executed as a script or via standard input redirection via the Java shell.
