At the first request from IE (CMD=CREATEFORM...) an instance of VFP form is created, HTML code is generated and is sent back to IE – as shown by the dashed red arrow lines. An action of the user starts an event which is sent to server with data. On the server side, VFP2IIS accepts the request and starts the next base operation (sections) (the Schema of Work Flow shows in detail the collaboration between VFP2IIS and VFP application).
START
In this section VFP2IIS checks context, restores links and internal objects, decodes the request, checks the existence of the VFP object and restores environment. Then it invokes methods on VFP (if exist). The VFP application can abort an action, do own internal setting, restore etc.
This section is always executed.
DATA
In this section VFP2IIS updates the controls of the VFP form with the data sent from IE, realizes conversion from text to appropriate type, and updates using assign or replace.
For every control, the method of control(if exist) is called with the text value received from IE, so VFP application can handle update in its own manner (check national format, validity etc.).
Replacement by VFP2IIS depends on returned value.
This section is started only for requests with data transfer.
EVENT
In this section VFP2IIS maps an event from IE and calls on the appropriate method of VFP object. Some events are handled by VFP2IIS internally. Beyond its own action, the VFP application can prepare some conditions for the HTML generator or stop the processing.
This section is started only for request invoked from IE event to server.
HTML
In this section HTML code is generated for IE from actual status of VFP form, include internal scripts to link desired event from IE back to server. For each control, the methods of the VFP application are called to modifiy or create their own HTML code, bind IE event, insert script, meta tags etc.