Using the COM+ Shared Property Manager with Visual Basic 6: Caching Data in the Middle-Tier
This article describes one of the most underused features of COM+the Shared Property Manager (SPM). The SPM can store frequently accessed data in the middle-tier, thus creating a caching mechanism that can be used by any component running in a COM+ application. By the end of this article, youll know how and when to use the SPM, as well as knowing its pros and cons.
by Dave Donaldson
November 25, 2002
et’s face it. Caching is a fancy was of saying
that you are going to save some type of data somewhere. In the n-tier web application
model, your tiers are typically made up of the presentation layer (ASP), the
business logic and data access layer
(COM+), and the backend data layer (SQL Server, DB2, Oracle, etc). Each tier
has its own ways of caching data. In ASP you can use the Application object,
which is useful for storing data that seldom changes, such as XML or HTML menus,
while databases are the best place to maintain user state. To cache data in
the middle-tier, COM+ provides the SPM.
Side
note: when caching data, cache data relevant to the tier the data resides on.
For example, do not cache HTML menus in the SPM. By doing that, you must make
a component call from ASP to the middle-tier just to get an HTML menu, which
is presentation layer data. See what I’m getting at?
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?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!