Scott Colestock’s Deployment Framework for BizTalk

Today I had the pleasure of finally integrating the BizTalk solution
at my current client site into the Deployment
Framework for BizTalk created by Scott Colestock.  They are still using BizTalk
Server 2004 so the process began with downloading the 2004 version of the Framework
from Scott’s site and getting the latest version of NAnt and NAntContrib.

Overall I’ve always considered the Deployment Framework to be a joy to work with,
but this is the first time I’ve had to retro-fit it into such an extensive existing
solution.  Some of the things which I encountered follow as reminders of gotchas
in such an endeavor.

  • It is not mentioned in the documentation, but Scott’s framework has an “additionalComponents”
    property which deploys pre-compiled assemblys from the Deploy Tools directory. 
    My client was already using log4net, but a newer version than what ships with the
    framework and I had to override this property so it didn’t deploy two versions of
    log4net to the GAC.
  • Remember that any Visual Basic .NET assemblies need to have their Build configurations
    changed to compile to bin\debug and bin\release.  By default VB.NET has one location
    “bin” which holds whatever you compiled last.
  • When retrofitting your existing bindings file to use XmlPreProcessor to swap out local
    environment settings, I found that CodeRush from DevExpress saved the day.  It
    allowed me to create a simple expansion template which took whatever was on my clipboard
    and inserted it twice into the structure of the expension, once inside the PreProcessor
    directive, once outside.
  • If you are working with alot of directly linked receive and send ports, then you’ll
    want to modify the XPaths file in deploy tools to encode the Filter tag for ports
    as well as all the other tags it does already.  I submitted this back to Scott
    who graciously thanked me for catching that and said he’d include it in the next 2006
    release, and in 2004 if he ever did another release of that version.
  • You’ll definitely want to look at this
    article by Scott which discusses how to add additional HAT queries to the deploy
    framework as well.

BizTalk 2006 Performance Metrics With SQL 2005


Useful report released by our partner Infosys showing performance improvements using SQL Server 2005 with BizTalk 2006 instead of SQL Server 2000. I like how they explain the scenario they tested, show the results with BizTalk 2004 and SQL 2000, BizTalk 2006 and SQL 2000, and then BizTalk 2006 and SQL 2005. I also appreciate their commentary as to *why* the BTS06 + SQL05 combo performed better.


One number you’ll see a lot here is a 40% improvement in performance with BTS06 + SQL05. You’ll find scenarios such as interchange (batch) processing, executing rules from orchestration, atomic transactions, convoys, and more. Don’t miss the section on “backlogs” where you see how SQL 2005 significantly improves processing of queued up messages. Good stuff.


Technorati Tags: BizTalk

On my way to Norway

On my way to Norway

To teach a Windows Workflow Foundation 5-day course.  Everyone says it will be
beautiful.

 BTW – I don’t plan on updating the Atlas Workflow Designer until they release
the next version of Atlas – read Biertand Roy’s blog about why –

Link to Atlas and more 
– they are about to change from closures to prototypes.  This will be a great
chance for me to re-architect the whole thing.  The next big feature will be
HTML based rule editing.

VBUG 2006

VBUG 2006

Just got back from this years VBUG conference. It was pretty good two days, completely sold out and all that. Decent topic coverage too. For me personally there werent many new things cos i had the opportunity to go to the MSDN roadshow recently where we spent a whole day on WPF, WCF and WF with much longer and deeper sessions but hats off to the VBUG organisers for sorting out good speakers and topics (well, i cant speak for myself , i presented an Introduction to Biztalk, but i heard it went down well and the other chaps were a knowledgeable bunch.


There were a few glitches in the demos, but thats always the case at conferences. Even at mine, i ran out of time and abandoned the demo about 75% of the way through cos there were a lot of “lessons” that i need to share with the attendees and the demo was a simple file mapping one in any case. (Its the standard Biztalk demo, but it does show the abstraction at the heart of Biztalk so it suffices in most introductory talks). I stayed up late the previous night preparing some more comprehensive stuff including consuming web services etc, but couldnt show that. Still, i think we managed to cover a lot of ground in that one hour. I could probably start writing some articles based on the slides and some of my thoughts on using Biztalk with the other products in the MS Connected Systems strategy.


Its funny how perspectives change in a short time. There was a demo of PowerDesigner by a chap from Sybase. It was a good talk and he showed a lot of the features of the tool such as looking at the model round-tripping from UML to DB to code and back and things on requirements traceability, integration with VSTS etc. A few years ago i would have been on my feet cheering him on , but this time while i appreciated what he showed, i couldnt help thinking “its not TDD is it?”  and “how can we make this work with TDD? test, model, generate code, refactor, reverse engineer?nah.. too much work” which is rather ironic for me personally cos i used to be really hot on database modelling and code generation etc.  I’m still all for models and IMO you absolutely need the blueprint before you build the house, but the key point is how much of the blueprint do you really need before you can start delivering working code (and its different strokes for different folks).


I’m going to focus a lot on software factories and DSL’s and i believe theres tremendous payoff in that field and it can do wonders for productivity. More on this discussion of modelling and TDD later.

Dynamically Adding User Controls in ASP.NET

I just got off the phone (at 11:26 Central Time) with a friend who I’ve been helping
for nearly 3 hours to no avail.  The problem he has is this:

  • ASP.NET 2.0 Web Application Project
    • View State Disabled and Forbidden by company practices.
    • User Control containing several text boxes and 1 button marked delete.
    • Need to lookup n records from the database, and create a User Control for
      each record in or after the Page Load event.
    • Submit button on page has to validate all User Control data and re-draw with values
      if validation is failed.  Write to database on success.

The problem we were stuck on is how to get the button on the user control (Delete)
to fire an event when added after Page Load.  Any ideas?

Mea Culpa

Mea Culpa

So pretty much the worst thing an instructor can do is tell a class something that
is wrong.  I did that last week teaching a WF/WCF “combo” course in Kirkland,
WA.  What is worse is that one of my students blogged about two of them, which
has caused a little controversy.

Here is Harry’s first entry. 

Here is Paul’s response

And Harry’s follow-up. 
To back Harry up – I know after I talks that he doesn’t think WF is a *Toy*. 
He had some realistic reservations about a couple of pieces.

So here is what I got wrong – in earlier builds of WF – the WebServiceInput/WebServiceOuput
activities in combination with the ASMX hosting layer – kept the Workflow InstanceID
in Session (although now I am doubting that – I very clearly remembering seeing that
code with Reflector).  It now uses a “normal” Http Cookie.  The problem
I proposed in class still holds true – which is that because the ASMX hosting layer
doesn’t allow you to change the namespace URI (see Paul’s blog for a manual fix for
this) and because it does still send a “session” based cookie.  Which means if
the client closes (let’s say the client is a Windows Forms application) – the cookie
is lost and the Workflow would be “abandoned” on the server.  Of course if the
client is a workflow – and the client persists the cookies will get persisted as well
– so you can get long-running workflows – but only if the client is a workflow.

So if the cookie gets “lost” there isn’t any other way to “rematch” the workflow to
a new client.  That is also one of what I see as a limitation of the OOB WF/ASMX
integration layer – is that there isn’t any way (OOB that is) to share a workflow
instance among different users.  So one of the details I taught (Session versus
custom cookies) was incorrect – but the general usage model of the OOB WF/ASMX integration
was correct (although I am pretty sure I didn’t use the moniker Harry associated with
it). 

IMO – the OOB WF/ASMX integration layer will be useful in about 25% or so of cases
when someone wants to expose a workflow as a ASMX Web Service.  I think in the
other 75% of cases people will build their own layer that has a little more flexibility.

On to the SqlWorkflowPersistenceService.  Let me be clear – I have extreme respect
for the people who wrote this code (I actually know them personally).   
First of all – here is what Harry blogged that is incorrect (and I am not sure if
explained this incorrectly or not  – but let’s assume that I did) – the OOB persistence
service doesn’t load *all* instances when one host starts – it loads all *running*
workflows (so workflows that are idled stay idled and persisted).  So if two
hosts go down and start back up  – all running instances will get loaded into
the first host that comes back up (no load balancing).

Also to me – the biggest limitation of the OOB persistence and tracking service –
is the fact that if I use them together – and then put my own TransactionScope activity
with database access code – I end up getting a DTC transaction.  For the WF applications
I’ve worked on this was enough for us to want to create a custom tracking and persistence
service.

There are a few more reasons to write a custom persistence service.  I won’t
go into all of them here  – but there are good reasons to write a custom persistence
service with WF – which means the OOB persistence service won’t be used 100% of the
time – which was really my point – I think it is probably usable in about 75% of cases.

So here is my final word on this subject (I hope :)) :

The OOB WF/ASMX integration is useful mostly when there are workflows on both ends-
and when you don’t need to share workflows across users.

The OOB SqlWorkflowPersistenceService is a very usable service if you are doing one
or two hosts and need robustness and load balancing.

WF is not a toy  – Harry never said WF overall was a toy – just the two features
here – he got the wrong information from me and hopefully this blog post has cleared
that up.  Anyone who reads this blog knows that I actually love WF and think
it is by far the best and most interesting part of .NET 3.0.

Windows Workflow Foundation class in Minneapolis (Nov 14 – 17)

Next month Pluralsight has our first public offering of Introducing Windows Workflow Foundationright in my own town of Minneapolis. We did a Double Feature with WF and WCF back in August and it was great. If you are looking for some training on WF, check out the information page and register now “Space is limited” as they say.
We’ll have great hands on labs mixed in with lecture to give you the right balance of concepts with experience. Hope to see you there.
Minneapolis not convenient for you? Leave a comment as to where you would like to see us do public Workflow courses. Boston? Dallas? Seattle? Denver? Atlanta? Vegas? 🙂 If we get enough interest for a location, we’ll get a course up and running and I’ll be sure to announce it here.

Visual Studio Team Edition for Database Professionals

I want to apologize for not posting some really great technical stuff lately but it's been a really busy summer here in Houston and I've been swamped with projects, Projects, PROJECTS! So I thought I'd give you a brief rundown on the new and (hopefully) exciting technologies I've been playing around with for the past few months, the projects I've been working on and a glimpse of things to come…

Visual Studio Team Edition for Database Professionals

Call it "DataDude", "TeamData", "VSTSDBP" or whatever. This new Visual Studio sku is real step in right direction for getting the database development part of your projects under control.

Oh yeah. I know. Your database development is already under control. Your developers already create the ALL the databases they need, and the tables, the indexes, the user defined functions, the stored procedures, etc. It's working just fine and you really don't need another "tool". Well, that's exactly what I thought till I started using this new Visual Studio sku. The first thing to understand about this new toolset is that it will dramatically change the way you look at database development and the database development lifecycle.

Most of my previous database development efforts were accomplished using the SQL Enterprise Manager, Query Analyzer and the SQL Management Studio (for SQL 2005). I used these tools to create my databases, tables, indexes, user defined functions, stored procedures, etc. running against a local instance of SQL Server. All of this was done "ad-hoc", without the benefit of source control, unit testing or any proper build procedure. If I forgot to backup my test database and changed something (such as a table name) which broke several functions and sprocs, it took hours and hours to find and fix. Not really a "robust" and "professional" way to develop the data store for an important application but given the tools available at the time, it was the best most of us could do!

Well, that's no longer the case and with Visual Studio Team Edition for Database Professionals, database development now becomes a fully supported part of your application's development lifecycle. Now all database development is done "off line" and in a "sandbox" environment (this should make your dba stand up and sing!). All user defined functions and stored procedures can be fully unit tested using representative test data automatically generated by the toolset. And best of all, this new Visual Studio sku fully integrates into Team Foundation Server so your database schema (SQL scripts) can be put under source control just like any other C#, BizTalk or Web Application!

I really recommend that ALL developers doing ANY database development at all, download the latest CTP of this new Visual Studio sku and take it for a spin. This is exactly the kind of extra value that may entice many of us to upgrade to Visual Studio Team Suite!

Technorati Tags: Visual Studio, Team Foundation Server

Share this post: Email it! | bookmark it! | digg it! | reddit!| kick it!

Commerce Server 2007: Technical Overview Document

One of the best resources for beginning your evaluation of Commerce Server 2007 is the latest release of the Commerce Server 2007 Technical Overview. This document (which has been recently updated) contains a pretty detailed overview of all of the features and benefits that come with Commerce Server 2007. It a great overview for developers as well as business users and upper management, so download a copy today!

Technorati Tags: Commerce Server

Share this post: Email it! | bookmark it! | digg it! | reddit!| kick it!