.NET classes are regular objects. They live in the same process with their
caller, and that's that.
COM+ Components offer some more advanced functionality, for instance:
1) Transactions. Imagine a process that needs to get some data through say 5
objects for processing. If one of them fails, you don't want to "save" the
changes the ones before it have made, and you don't want to process the data
any further. COM+ will allow you to do that ( in simple terms )
2) Clustering/Load Balancing: In cases of high loads, the container can pool
instances of your object, even in different machines, and re-use them. That
saves you a lot of instantiation overhead.
3) Synchronization: You can define how your object is accessed from
different caller threads.
COM+ will give you all that, with an added overhead in coding & complexity.
It takes a while to get acquainted with all it's little idiosyncracies &
tricks. In addition, you can create COM+ components using .NET relatively
easily.
In any case that you absolutely need all the above, COM+ will do the trick
for you. If you want to develop something simple that will not have to
process thousands of requests in 3 milliseconds ( I wish !), go for
plain-old-.NET-objects.
Angel
O:]
Robert said:
What is the general difference between .Net and COM+ components? When is one
better than the other? Where can I find information about the similarities
and differences? I have browsed msdn but so far I have not found much useful
information.