Bookshelf Home | Contents | Index | Search | PDF |
Configuration Guidelines > Development Standards for Siebel Script Languages and Object Interfaces > Script Guidelines >
Browser Script
The following section only applies to browser script. JavaScript is the only supported language for browser script.
- Avoid direct Document Object Model (DOM) manipulation of Siebel objects.
The Siebel High Interactivity Client makes extensive use of the Document Object Model. Because browser script runs within this framework, it can access the DOM and all of the objects that constitute the Siebel High Interactivity Client. This access is not supported and could cause problems because the structure of these objects is not guaranteed to be static. Whenever you require access to Siebel user interface constructs, use the Siebel Object Interface methods.
- Do not return large result sets from server business services to browser script.
Browser script can invoke methods on business services that are either browser scripts or server scripts. Because browser script supports a subset of Object Interface methods available to server script, it is often convenient to write business services with server scripts that are invoked by browser scripts. Using this technique, browser scripts can effectively invoke server-side scripts. While this is a good solution, these types of server scripts should return simple values or a single record to the calling browser script, not sets of records returned from a query.
For example, the business component method ExecuteQuery() cannot be directly invoked using browser script. To get around this restriction, instead of writing a server business service that takes query criteria and a business component name as arguments and then returns the results, return success or failure or the number of rows found.
Returning entire result sets to browser script can significantly decrease performance. Server script must first convert data to a property set, where it is encoded as a string by the Siebel Web Engine (SWE). Then, it is sent to the SWSE using SISNAPI, and returned to the client through HTTP, decoded back to a property set by JavaScript, and used by the browser script. For large result sets, this negatively impacts performance.
The user interface can efficiently display large result sets (for example, the All Accounts view, where there may be thousands of accounts in the view) because it retrieves only the number of rows from the server that can be displayed on the current applet.
Often, if browser scripts need to invoke server-side functionality, you can simply write the script in server script on the corresponding event instead of browser script.
Bookshelf Home | Contents | Index | Search | PDF |
Configuration Guidelines Published: 18 April 2003 |