I used to write ASP.Net apps deploying business dataaccess layers in COM+ components several years ago. This was the standard in several corporate infrastructure here in my country. Is this still recommended? What is the alternative?
COM+ is really just MTS (Microsoft Transaction Server) rebadged and bundled with Windows 2000 and later versions (it was an optional extra on NT4). If you're using non-managed code, COM+ is still the preferred option for a transactional middle-tier. In fact, it's usually used as the TP monitor in TPC-C benchmark systems because it's more efficient than .Net or Java and much cheaper than Tuxedo or Encina (which reduces the $/TPM).
WCF (Windows Communication Foundation) has its own transaction monitor, which is reasonable as the architecture of COM+ is tightly coupled to COM and would be difficult to retrofit a .Net runtime to. If you're writing a transactional application in .Net, WCF provides this facility although the System.Transactions library also provides distributed transaction support for ADO.Net clients.
There's a lot of talk about WCF here, but I honestly don't think that's what you're looking for.
In the early days of ASP, people quickly learned that placing all of the code in the markup pages was difficult to maintain. As a result, some people started implementing N-Tier designs using COM components. If your intentions are to simply build a DAL in a typical N-Tier fashion, there is no reason that a simple class library wouldn't suffice.
Look into building a class library, adding it as a reference to your web project and, of course, ADO.NET.
WCF is the new recommended mechanism for interobject communication
I have just spent the past two days trying to make two of my old COM+ business objects work on a new Windows 2003 Server and I am certain I never want to work with COM+ ever again.
From http://msdn.microsoft.com/en-us/library/ms686988(VS.85).aspx:
"COM+ is the next step in the evolution of the Microsoft® Component Object Model and Microsoft Transaction Server (MTS). COM+ handles many of the resource management tasks you previously had to program yourself, such as thread allocation and security. It automatically makes your applications more scalable by providing thread pooling, object pooling, and just-in-time object activation. COM+ also helps protect the integrity of your data by providing transaction support, even if a transaction spans multiple databases over a network."
Although looks like a kind of legacy stuff, I dont' think any single fashion technology provided by Microsoft at this time can replace COM+.
© 2022 - 2024 — McMap. All rights reserved.