Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Web
Expertise: Beginner
Nov 30, 2001

Enhance ASP Application Performance by Using Early Binding in VB


When using VBScript in ASP, you have only one data type: VARIANT. Although you can store objects within this data type, every time you refer to a property/method of the object, the references need to be resolved (this involves getting the DispID of the member using the GetIDsOfNames method of object's IDispatch interface). This is much slower than the early binding that you can use in VB. In early binding, the references are resolved at compile time rather than run time, which saves the extra step of execution.

When working with objects in ASP, try to encapsulate the functionality involving these objects into COM components developed in VB. For example, you can encapsulate all database activities (that use lot of ADO objects) and their business rules into middle tier COM components. This keeps the ASP code clean and maintainable, and also allows you to take advantage of early binding performance gains. Also, this design helps make your ASP application more scalable.

NOTE: When declaring objects in VB, use the following method to achieve early binding:
 
Dim objRs as ADODB.Recordset
set objRs = New ADODB.Recordset
Jatin Shah
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date