Choosing the Scripting Platform

You should exercise care in choosing the scripting platform for DTCs. If you set the scripting platform as Server, each time an event occurs in a DTC the event is processed on the server, resulting in a complete roundtrip from the browser to the server and back. This occurs because the Scripting Object Model wraps each page in an HTML form. When an event occurs, the form is posted to the server, processed, and then sent back to the browser. This processing takes time and should be carefully controlled.

If you set the scripting platform as Client, the events for a DTC are processed in the page completely in the browser. The result is faster response time, less network traffic, and less load on the server.

Often the best approach to choosing the scripting platform is to use both Server and Client modes for different DTCs. For example, you can have a page with a Textbox DTC and a Button DTC. If your database connections are all server-based, it might make sense to have the Textbox DTC use the Client scripting platform and the Button DTC use the Server scripting platform. This will allow the page to quickly process client events related to the Textbox, but let the server process any button-click events.



Programming Microsoft Visual InterDev 6. 0
Programming Microsoft Visual InterDev 6.0
ISBN: 1572318147
EAN: 2147483647
Year: 2005
Pages: 143

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net