BizTalk, Custom Pipelines, Bobby Knight, and Visual Basic.NET

I've spent the better part of the day writing and testing a BizTalk Server 2006 custom pipeline written in Visual Basic.NET. This will be published as an SDK sample in the BizTalk Server Developer Center. It wasn't so much that it was a difficult topic -- I modeled it on an existing SDK sample so it was hardly arcane -- but tedious. You see, I don't "do" Visual Basic.NET.

It isn't personal. Call it a personal preference, kinda like my aversion to licorice or my proclivity to avoid Lubbock. Again, not personal and if you like licorice, live in or love Lubbock, or have sworn eternal allegiance to Visual Basic.NET and all things VB, then I salute you and mean no offense. That is your thing. My thing is not Visual Basic.NET. Taken a step further, my thing is the set of languages that is not Visual Basic.NET.

It isn't personal. I used Visual Basic 5/6 for years both as a consultant and at software development firms. I even fought for Visual Basic 5.0 at one of those engineering firms, arguing that UI's were easier to roll in VB than Visual C++. Prima donna or not, I lost that one. But I did get to write some COM objects using C++ (ugh).

Again, it isn't personal. What happened is this: .NET and C# came out. Visual Basic.NET was released at the same time, but I liked the syntax of C# and found it easy to fall into it and start developing solutions. The Visual Studio experience was subjectively better, from XML doc to the way accessors are declared. I dug it pretty quickly and just happened to work on projects where the compiler language wasn't an issue...or I could swing it to C#. Again, a personal thing.

So why write a sample in Visual Basic.NET? Two reasons:

  • There are BizTalkers out there using Visual Basic.NET
  • I wanted to experience first hand how difficult it is to convert C# to Visual Basic.NET.

I wanted to give a "shout out" to the VB.NET developers out there in BizTalk land. I also wanted to experience the pain of converting C# to VB.NET first hand as someone who has strayed from the Visual Basic flock and has little VB.NET experience. Kinda like trying lima beans again as an adult after gagging on them as a kid.

It took a while because I was rusty on VB.NET syntax. But in the end, I got the custm pipeline to work. I'd include a snippet of code...well, I will include a snippet:

<ComponentCategory(CategoryTypes.CATID_PipelineComponent)> _

<ComponentCategory(CategoryTypes.CATID_Encoder)> _

<ComponentCategory(CategoryTypes.CATID_Decoder)> _

<Microsoft.VisualBasic.ComClass("B5B020E4-5120-4e56-8D9E-C3431D5BFF6F")> _

Public Class RemoveNullElements

    Implements Microsoft.BizTalk.Component.Interop.IBaseComponent

    Implements Microsoft.BizTalk.Component.Interop.IComponent

    Implements Microsoft.BizTalk.Component.Interop.IPersistPropertyBag

    Implements Microsoft.BizTalk.Component.Interop.IComponentUI

    Private _excludeList As String

    Property ExcludeList() As String


            Return _excludeList

        End Get

       Set(ByVal value As String)

            _excludeList = value

        End Set

    End Property

#Region "IBaseComponent"

    ReadOnly Property Name() As String Implements IBaseComponent.Name


            Return "RemoveNullElements component"

     End Get

    End Property

    ReadOnly Property Version() As String Implements IBaseComponent.Version


            Return "1.0"

        End Get

    End Property

    ReadOnly Property Description() As String Implements IBaseComponent.Description


            Return "Removes empty elements in source XML message"

        End Get

    End Property

#End Region

Mmmm, Visual Basic-y.

Look for it by the end of November out on the dev center. Maybe someone will convert it to Iron Python?

As always, feedback is welcome. And, uh, GO RED RAIDERS!