Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Reduce COM+ context overhead: use modules and shared members

Total Hit ( 2719)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


If you use Shared members in .NET or modules in VB6, you reduce COM+ context overhead without any risk whatsoever that you will get extra context overhead for that code. You also release yourself from the clean-up burden that you have in both worlds. Instead of the VB6 consumer code:

Click here to copy the following block
Dim obj As MyServer.MyComponent
Set obj = CreateObject("MyServer.MyComponent")
obj.DoStuff
...
Set obj = Nothing

It's as simple as this:

Click here to copy the following block
MyModule.DoStuff

Perhaps you don't think that this tip results in good object orientation? Well, if a method doesn't need any instance state, then why should you use an instance? I don't think you should, unless you don't need to remote the method on its own. Ask a Java friend if they think Static methods are useful. The odds are that the answer will be "yes".


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.