The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by dfunk]

Is there a good information source for how ADO.NET and COM+ relate?

I have a colleague that asks me why I'm wanting to learn ADO.NET when COM+ is
really the way to do things. I've heard others say that COM+ isn't needed
anymore because ADO.NET can now handle more complicated database transactions.

I've noticed that the COM+ coverage in "ADO.NET Programming" is relatively
thin. My common sense tell me both technologies can benifit from a
relationship.
import-bot (20211) [Avatar] Offline
#2
Re: ADO.NET and COM+
[Originally posted by dfunk]

I feel my previous statement about the book having thin coverage of COM+ needs
explanation.

I guess what I'm looking for is not the "how to" do ADO.NET with COM+ but the
"whys". From the way you wrote the book I think you can appreciate what I'm
asking for.
import-bot (20211) [Avatar] Offline
#3
Re: ADO.NET and COM+
[Originally posted by arlen]


Interesting question. I assume the question is more why .NET vs. COM+/DNA -
COM+ is not a database access technology, and ADO.NET only has relevance when
using .NET to talk to databases.

COM+ provides some useful functionality, and a particular programming model -
component based coding. The idea is that you can build discreet components
that provide specific functionality, and COM+ can handle the intricacies of
transactions, pooling, etc.

This doesn't address what these components actually do - that is still
something that a programmer has to answer. Whether that is native C++ code or
managed C# code, is not relevant to COM+.

COM+ was often touted as a major part of the Windows DNA solution, which
included COM+, IIS, ADO, SQL Server, ASP, etc. The problem is that DNA was
really the amalgam of a number of disparate technologies, each with their own
set of hacks to make them play nicely with each other. DNA applications were
tricky to build, really difficult to deploy, and tended to break when one of
the underlying technologies came out with a new version.

In particular, the reliance on COM (not COM+ which leverages COM) added a lot
of complexity. COM may well have been the best solution to the problems it
tried to solve, but I've never heard anyone consider it too simple! (Although
VB did provide some help in making COM components simpler).

So, back to the question. If you intend to use COM+, .NET makes it extremely
simple. You just write a class, and put an attribute on that class saying how
you want it to work with COM+ and you are done. It is frankly easier to use
COM+ from .NET than not. You also get all of the other benefits of .NET - much
cleaner programming model, elegant and rich class library, etc.

Of course, the next question is whether or not you should use COM+ - that
really depends on the type of application you are writing. There are reasons
why you might have used COM+ in the past that .NET makes unecessary, but there
are still legitimate reasons to use COM+.


My book is not really about .NET vs. COM+ - I included the COM+ sections to
specifically address database specific functionality where COM+ can be
leveraged. Hopefully, though, this has helped answer your question.

Arlen
import-bot (20211) [Avatar] Offline
#4
Re: ADO.NET and COM+
[Originally posted by dfunk]


Your one paragraph is right to the point of my question...

> Of course, the next question is whether or not you should use COM+ - that
> really depends on the type of application you are writing. There are reasons
> why you might have used COM+ in the past that .NET makes unnecessary, but
there
> are still legitimate reasons to use COM+.

Is there someone that knows the reasons for when to use COM+ with .NET and
when it is unnecessary? I know they are likely situational but hopefully
patterns could be found that could guide us.