SiebelGuide.com/siebelblogs

Siebel Blogs, News, Events, Tips and Tricks
Filed under Tips&Tricks, eScript, All

I am back with more tips on best practices on Siebel scripting. I will try to continue this series as find more tips. For now I have three more tips for you. Let me know if this helps.

Tip 10: Browser Script versus Server Script

The main purpose of Siebel Browser script is to extend the functionality of the browser. So Browser script should be limited to user based events. On the other side Server Side script is used for data manipulation or anything beyond the capability of the browser.

Browser script is recommended for:

  • Communication with the user
  • Interaction with desktop applications
  • Data validation and manipulation limited to the current record

Server script is recommended for:

  • Query, insert, update, and delete operations
  • Access to data beyond the current record

So validate your requirement against this best practice.


Tip 11: Nullify Object Variables when no longer needed.

Every variable under eScript that is referenced to an object (oBC = TheApplication().GetBusComp(“Account”);) uses some memory to hold that value. If the script exists abruptly the memory that is being used to hold that value might not get released causing memory leak. To avoid any kind memory leak it is a good practice to null those variables (oBC = null;) after their use. Nulling those variables releases the memory. Common object references that must be nulled are

  • Business Objects
  • Property Sets
  • Business Services
  • Business Components
  • Applets

The best spot to null these variables are under finally section of the try-catch block of eScript as shown below.

try
{
oAccBO = TheApplication().GetBusObject(”Account”);
oAccBC = oAccBO.GetBusComp(”Account”);
sAccSerExpr = oAccBC. GetSearchExpr();
}
catch(e)
{
//Some Error Handling
}
finally
{
sAccSerExpr = null;
oAccBC = null;
oAccBO= null;
}

Observe that in the code I first null the child objects and then the parent objects.

Tip 12: Get rid of unused code from the Repository

Having a code that has been commented out or not being used causes an unnecessary burden on the server to load the application which could hit performance. If the code is no longer in use just remove them from the objects. But before you delete them make sure you archive (sif) or export it so that in future if you see realize the need for it; you can just import them back into the application.

Hope these tips helps. If you know of any tips and you would like me to publish it over here, please write it and send it to me. I will be very glad to post it over here.

PS: Thanks for all the appreciation and encouragement that I have received till now. I will keep making this website more useful in the future. As usual if you have any questions lets discuss it under the forums section of the website.

Related posts(Auto Generated):

  1. eScript Best Practices - Part7
  2. eScripting Best Practices - Part5
  3. How to Access Server Parameters using eScript
  4. eScripting Best Practices - Part4
  5. eScripting Best Practices - Part2

Posted by Sridhar on Saturday, May 31st, 2008


Page copy protected against web site content infringement by Copyscape
You can follow any responses to this entry through the magic of "RSS 2.0" and leave a trackback from your own site.

6 Responses to “eScript Best Practices - Part6”

Post A Comment

Recent Posts 

Recent Comments:

  • Gloria: Thank you for sharing your knowledge!
  • Sridhar: Hi Satya, Please share your documents using “Participate” link on the right hand side. Many thanks...
  • satya vardhan: hi ramya this is vardhan i am in obiee developer i am not undrstanding ur query can u repeat once again...
  • satya vardhan: hi sri obiee this is reporting tool if u want more details send me ur mailid. i can forword some documents...
  • Ramya: Hi, Can u pls tell me how to get the difference between two date fields by ignoring weekends (i.e satday, sunday if...