CS-Script 3.20.0

Extending applications with scripting (Script Hosting)

Traditionally scripting has two areas of application: executing a script as a standalone application and executing a script from another application (Script Hosting). Script Hosting is a flexible way of extending native capabilities of the host application. This flexibility comes from dynamic nature of script execution.

Very often scripts that the host application can execute are not the fixed collection of "scripted operations" but rather a set of pluggable script files or in-memory code fragments. Such scripts can be easily manageable even by the end-user. A good example of such application is MS Excel where VBScript is used to extend functionality of the main application.

CS-Script as a scripting framework can provide development opportunities for Script Hosting as well. Hosting the CS-Script engine can be anything between a very simple and moderate complexity implementation, depending on your programming needs. CS-Script hosting follows the two major implementation patterns which will be explained in this section.

 

In This Section

"Isolated execution" pattern    
Description of very a simple implementation of script hosting when the script and the host application have no knowledge about each other.

"Type sharing" pattern      
Information about ways of executing the scripts from applications when passing objects between the script and the host application is required.