advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Pooled Objects and Initialization Control in VS.NET

One of .Net's more obvious benefits for today's Visual Basic developers, is the ability to easily create poolable objects using Visual Basic.NET. The author demonstrates how a web application that uses poolable objects, can show a 50% performance boost in the rate of transactions per second when pooling is enabled. The article also covers things such as application configuration, string resources, page templates, and using XSL stylesheets. 


advertisement
he Web application with which I am currently involved, relies heavily on external data abstractions to control both functionality, as well as the UI appearance. These external data repositories are all stored in XML format.
  • Application Configuration
  • Navigation Configuration (Modes, Modules and Menus)
  • XSL Stylesheets
  • String Resources
  • Page Templates

The benefits in storing this type of data externally is that the functionality, as well as the look-and-feel of the application can be changed quickly by simply altering the data in the appropriate external file. Need to add a new menu item? Simply modify the Navigation configuration file. Want to change the stylistic appearance of the UI? Simply modify the relevant XSL stylesheet and/or page templates. Need to correct a typo, or change a bit of verbiage? Simply make the modification in the string resource file. No code modifications are necessary in order to effect these, and other similar changes.

You might find it interesting to stop by www.FPSNow.com in order to take a look at the application which I’ve described. The site itself contains a wealth of documentation on how it is constructed which you may find interesting, as it relates to this article.

On the other hand, loading these data files, and instantiating the XML DOM’s (that’s the kicker) on each transaction would be an unnecessary burden since the same operation would be repeated over and over again for successive transactions. By pooling the objects, and leaving the internal DOM structures loaded, we can re-use initialization on successive transactions. As it turns out, pooling objects is simple with Visual Basic.NET.

Note: the following discussion presents a software solution which has been developed and tested under Windows 2000 Server exclusively. I have no experience with .NET in any previous environments and so I can't comment on whether the scenario I am about to present has any application to those environments at this time. (Although some aspects of what I am about to present can be useful at least in concept, if not in direct application.)

The .NET framework provides the IHttpHandler interface for objects instantiated via IIS. This interface provides the class with two important benefits.
  • The class will have access to the IIS HTTPContext.
  • The class can be pooled by IIS.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement