Chapter 9. COM+ (Component Services)A core part of the Microsoft philosophy is that programmers should be able to concentrate on coding the business-specific logic for an application and not have to code the infrastructure for their distributed systems. COM+ extends this philosophy by providing prebuilt services for enterprise applications. It includes solutions such as object pooling, transactions, and role-based security so you don't have to waste valuable time troubleshooting low-level problems and reinventing the wheel. The name COM+ is a little confusing. Some programmers make the mistake of assuming that COM+ is an enhanced version of COM. Strictly speaking, this assumption isn't correct. Both COM and Microsoft .NET are technologies designed for creating discrete, reusable binary components. COM+ doesn't replace either of these technologies. Instead, it provides services that can be leveraged by a COM or .NET component. COM+ is a huge subject. Most books about .NET programming list the numerous COM+ options and their .NET equivalents but provide little advice to help a programmer decide where COM+ should fit into an enterprise application. This chapter takes a different approach. It considers some sample cases in which COM+ can be useful in .NET and also identifies COM+ features that are less .NET-friendly. That means the chapter focuses primarily on instance management and transactions. Along the way, it will answer questions such as "Does COM+ belong on the server or client?" and "What's the difference between a database transaction and a COM+ transaction?" and "Is ADO.NET connection pooling better than COM+ object pooling?" |