Static v's instance v's COM

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Here is a question that I have been trying to work out - hopefully someone
will be able to give me a few pointers.

I often end up in a quandary deciding if a class should be static/instance
and/or if it should be hosted under COM (mainly with performance in mind).
Can any one point me to any resources that may help.

ie. Data Access Class - just retrieving requested dataset - No state
required, so implemented as static.

If this Data Access Class has a huge number of requests, would there be any
performance benefit in making instance and deploying in COM services. My
understanding is that deploying a static class under com has no benefits as
it cant participate in object pooling etc.

Guess you can see where I am going with this question - designing for
performance.

Pete.
 
You have COM+ readily accessible under .NET (see System.EnterpriseServices).
AFAIK you should never have to do something under COM just for the sake of
performance.

IMO it's best to design first the simplest, cleanest architecture that works
and then identify possible bottlenecks. Generally performance problems are
not where you though before writing the code.

Patrice
 
Back
Top