tags:

views:

171

answers:

3

I'm using ServicedComponent from EnterpriseServices AKA Com+ for

  • Distributed transactions
  • Simple transaction programming by using attributes
  • Object pooling

Things that I find lacking in com+

  • The lack of dll versioning
  • Pain of having to gac & reg every time I change a component
  • Having to attach debugger

I'm aware that WCF solves some of the same problems as COM+. But does it solve all of them? Could somebody point me in the right direction?

Thanks

A: 

You should take a look at Enterprise Services.

sipwiz
+3  A: 

I'm not very familiar with the ins and outs of COM+, but WCF was built to replace it and Enterprise Services in the .NET platform. All of the use cases you mention here are baked into the framework (pooling, transactions, versioning), and are pretty much trivial to code against, so long as you put in the time to learn how it wants to do things. When you get things configured correctly, there's pretty much no limit to what you can do with it.

WCF also underpins a lot of what Microsoft is working on for the immediate and longer term future (Azure Services). I'd consider this a worthwhile investment of your learning time, especially considering your COM+ background.

I would strongly recommend Juval Lowy's book as a good starting point. He is probably about as authoritative a voice as you will find on this subject.

http://oreilly.com/catalog/9780596521301/?CMP=AFC-ak_book&ATT=Programming+WCF+Services%2c+Second+Edition%2c

I would also recommend you check out his company IDesign's website. Not only do they offer excellent training, but they have a very useful library of WCF extensions called ServiceModelEx that provides a number of utility extensions/helper classes that make your WCF life a lot easier.

http://www.idesign.net/idesign/DesktopDefault.aspx

If you're looking for a more tutorial style book, Michele Leroux Bustamante's book is also quite good.

Scroll Lock
+3  A: 

If you want attribute-based transactions on components, WCF can do it for you. Except the metaphor is no longer components as with COM+; it is now services in WCF. A subtle but important shift. WCF relies on the same transactional infrastructure (DTC) as COM+.

If you just want COM+ in .NET, it's EnterpriseServices - same model, still need to use DLL deployment and versioning. Still can get pooling, etc. Can also get pause/resume and some other new ES features.

If you just want a transactional programming model, you can use the System.Transactions namespace.

As for object pooling - look twice. It may be worth re-examining your use of object pools.Years ago, the assumptions the industry made, or the understanding we had, w.r.t. the cost of instantiating an object led us to the object pool metaphor. Those assumptions and understandings may not be valid today. In other words, an object pool may or may not be actually useful to your app. It is still in ES, but it is worth considering whether you need it.

Cheeso