So what samples should I use? That is the question? I would love to hear some feedback on this, so please drop a comment below or shot me an email.
I guess to start off with here is the dilemma and what I am somewhat curious to know from folks! What is the MS sample that best reflects how you have thought about building MTS/COM+ systems when you have built them or are currently building them or maintaining them now, albeit in the MTS/COM+ flavour or COM+/ES flavour.
To show off the COM/COM+ intergration feature in Indigo RC (or CTP ) BETA1, obviously I have to show off some VB6 (or some COM implementation) code and the code has to be tiered or at the least distributed in some fashion. And most important of all, has to use Transactions in some way, as I particularly like this feature and to show this feature off, with WS-AtomicTransactions and Transaction flow.
Writing my own VB 6 code was my initial thought, but I think the sample would possibly look a little fake and possible look like I designed the code a certain way. So I have been rooting around the samples that the big house (i.e. Microsoft) produced way back in circa. ‘96 to ‘98, to illustrate some key points about SO and obviously Indigo.
So, back in the great ol’ days of ‘96 or so, the NT Option pack includes the following MTS samples, with clients (some ASP based, some VB client, some with both):
I have been mulling them over, and it looks like “Sample Bank” possibly would be a good example ,what do ya think?
Currently, I’m not so sure if I should use any of them, as none of them really seem to reflect the many implementations I have worked on in the past and I think they will be a little limitiing in showing some of the Indigo features off, as well as some layering and tiering possible issues!!
This “Market” sample from ‘98, that was published on MSJ (Now, the MSDN Magazine), which you can find here; is one that I think has the most to offer, as it has the most layers and communication channels. Also, gives me the most flexibility to show how you can augment a VB6 COM+/MTS Interface (with no code changes), and evolve interfaces so that they can leverage aspects such as DataContract and MessageContract?
The reason I ask, is that folks have suggested to me that most folks would be familar with the “Sample Bank”, but I think that “Market” has more legs to it and can be used to leverage more.
For example, without changing code, I can extend a method like -
Function SubmitOrder(ByVal Customer As String, ByVal Product As String, ByVal Quantity As Long, ByRef OrderStatus As String) As Long
and slowly evolve a service boundary with Indigo’s COM/COM+ intergation features, and end up with an Indigo contract (and lovely Service Boundary) that could look something like this -
[ServiceContract(Namespace="Samples.COM.IntergrationFeatures")]public interface IMarket{ [OperationContract] OrderStatus SubmitOrder(OrderDetails) }
[DataContract] public class OrderDetails { [DataMember] public string Customer; [DataMember] public string Product; [DataMember] public string Product; } [DataContract] public class OrderStatus { [DataMember] public string Status; }
And then use different bindings and protocols (such as WS-Profile, RM, etc..)…… as well as showing multiple contracts into the same system.
Thoughts? All suggestions are welcome. I realise “Sample Bank” would be most widely known by VB folks, but I think you can see my point about “Market sample” and showing all of the feature set, in somewhat of an unusual way. Anyway the sample is over 7+ years old, so I think I should be safe, even if it is not the most widely known and anyway, Microsoft will probably use the “Sample Bank” as they have in the past.
Ciao,
– Paul