CustomisationThis is a featured page

There are serveral places that scripts can be installed to customise eLink. These are:

server side scripts - installed through eConfig
client side scripts - built into the templates
data synchronisation tool scripts - for data imports etc

Scripts can be written in a variety of languages, including javascript, vbscript and delphi. Each of these languages has advantages and drawbacks.

It is important to understand the context of any script (server-side, client-side, data synch). The context defines what is possible within a script. So, while the scripting language may be the same in all contexts, not all facilitie of that language will be available in all contexts. For example, it is very valuable to be able to trace the behaviour of a script during development and testing. We may choose to do this by using dialog messages (alert() in javascript, ShowMessage() in delphi, MsgBox in vbscript). All of these methods will work on the client side or in the data synch tool because the script has direct access to the display. But none of these methods will work on the server side because server side scripts are not running in association with any displays. ATTEMPTS TO display data from a server side script will cause eLink to crash and require the server to be rebooted.

An alternative approach to debugging is required on the server side. Fortunately, vbscript supports file access which works correctly under elink. Therefore, it is possible to write vbscripts which will maintain a log of their activities. Note that in accessing a disc, a server side script will be accessing discs on the server, or locations accessible from the server on which that script is running.

File access facilities are NOT available on the client side. Client scripts are specifically forbidden from accessing client files for reasons of security. Of course, client scripts have no access to server discs, since the scripts are running on the client.

The following table summarises the above:


Server Side Script Client Side Script Data Synch Tool Script
Display Accessible No Yes Yes
Disc Accessible Server Discs No Server Discs (not tested)


Language Variations

Most of the worked examples in the eLink documentation are given in delphi. They should all have equivalent facilities in the other scripting languages. However, there are significant variations in the use of the Link function calls, which are not documented.

A particular variation to watch out for is in the client side SOAP library. Superficially, it seems to support all the functions expected from the eLink documentation. For instance, BeginEditProject(...). However, it should be noted that those functions do not behave the same way as in the documentation. In particular, the returned data does not match that reported in the documentation. Please refer to this wiki for examples of each type of script.


mbw
mbw
Latest page update: made by mbw , Mar 27 2009, 4:25 AM EDT (about this update About This Update mbw Edited by mbw

467 words added

view changes

- complete history)
Keyword tags: None
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.