in

ASP.NET Weblogs

Web Service Guy

Web service stuff

Jesse and COM+

Jesse has been getting rather steamed up about COM+ and state. Here is my advice:

If you want to use COM+ and all the benefits that that brings (scalability through JIT activation and object pooling / ACID transactions across multiple data sources / Queued Components / SOAP support etc etc) then embrace the stateless model that COM+ requires.

Pass all parameters in on the call.

Small bits like connection strings can be setup in Component Services manager using Object Construction. If you really must keep state there are options such as the Shared Property Manager or deserialising and reflating objects using SQL Server or file storage (.Net serialisation makes this easy).

An important question you should ask. Why do I need COM+? All this cool stuff means overhead. It is only recommended for large enterprise apps with very high numbers of concurrent users.

Above all remember that COM+ is not a small thing to be mastered in an afternoon by cutting and pasting a few lines of sample code. Read, code and learn and if it gets tough, then console yourself that you are gaining a very valuable skill.

Comments

 

Jesse Ezell said:

I don't NEED to use COM+, it would just make things a heck of a lot easier if it worked a bit nicer with .NET, instead of enforcing all the same priciples it does with a vanilla C++ or VB app. In fact, no one really needs to use COM+. The whole point of COM+ is to provide a set of declarative services that your code can plug into, so that you don't have to worry about the details. Many of these services (like JIT activation, object pooling, etc.) probably aren't going to be needed unless you are building a very large app that has to handle a ton of requests. However, some of the features (such as role based security, automatic transaction completion, and integration with the DTC) are things that plenty of "non-enterprise level" apps need (though I would argue that "enterprise level" apps are no longer always those big, monolithic systems they once were, due to things like COM+ which have allowed more and more developers to build scalable systems w/o a lot of the extra coding burden...the whole "enterprise application" definition is a cloudy one). Why should developers outside of the enterprise space not be allowed to take advantage of this already tried, tested, and proven functionality?
May 1, 2003 5:29 AM
 

Jesse Ezell said:

Before anyone flames me for saying "no one really needs COM+", I am just pointing out that you could do all the work yourself if you wanted, but it would take a heck of a lot of code, and that is the problem COM+ addresses.
May 1, 2003 5:31 AM

Leave a Comment

(required)  
(optional)
(required)  
Add