BizTalk.Factory Overview
BizTalk.Factory
2.0 is both a Microsoft BizTalk Server® 2020 software development kit and a declarative Microsoft BizTalk Server® 2020 deployment framework.
They are many other available Microsoft BizTalk Server® extensions that try to fill the gap and provide some decent development and deployment experiences, for instance BizTalk Server Open Source Community, BizTalk Deployment Framework, BizTalk Server Pipeline Component Wizard, BizTalk Software Factory (not to be confused with BizTalk.Factory
itself), Eliasen’s BizTalk Pipeline Components, and so on…
BizTalk.Factory
is however far more reaching and cohesive in its unique and distinctive approach: instead of being based on, or leveraging, designer surfaces or wizards, it strives to provide a code centric, or code-first, development experience. Wherever possible, BizTalk.Factory
will offer a C#
fluent API to replace the designer surface. This is noticeably the case to what concerns Pipelines, Bindings, and Rule Programs.
BizTalk.Factory
will not try to replace the Microsoft BizTalk Server® orchestration designer surface though, but it provides nonetheless an alternative by leveraging custom pipelines and custom pipeline components to provide a development experience where orchestration-based flows are implemented by messaging-only, or publish-subscribe, flows for the simple reason that messaging-only flows are generally easier to maintain —whether it is development or testing,— simpler to deploy, and more efficient performance-wise.
BizTalk.Factory
consists of three different sorts of components and packages:
-
The runtime ones, which are made up of .NET assemblies, Microsoft BizTalk Server® applications and Microsoft SQL Server® databases. They must priorly be installed on every server belonging to a Microsoft BizTalk Server® group in order to be able to run Microsoft BizTalk Server® applications relying on the
BizTalk.Factory
SDK. All theBizTalk.Factory
runtime’s deployment packages are available as GitHub assets in their various repository, see Runtime Packages; -
The deployment ones, which are made up of a series of Microsoft PowerShell® modules. They must be installed on every server belonging to a Microsoft BizTalk Server® group in order to be able to install the
BizTalk.Factory
SDK’s runtime packages and any custom Microsoft BizTalk Server® application built on top. All the Microsoft PowerShell® modules are available on PowerShell Gallery, see Deployment Packages; -
The development ones, which are made up of plain .NET assemblies. Referencing these assemblies is obviously required during development, but they must not be installed per se. For this reason, all these assemblies are made available on NuGet, see Development Packages.
Runtime Packages
BizTalk.Factory
runtime packages consist of the following packages:
-
BizTalk.Factory Runtime is a Microsoft BizTalk Server® runtime made of .NET assemblies that can be deployed without any Microsoft BizTalk Server® footprint; it merely requires assemblies to be GAC-deployed and global configuration files to be edited. Notice that since this package has no Microsoft BizTalk Server® footprint, it can be patched or even fully redeployed at any time without any other impact on the Microsoft BizTalk Server® group than a small down time while restarting the host instances;
-
BizTalk.Factory Application is a scaffolding Microsoft BizTalk Server® application, similarly to the built-in
BizTalk.System
application.BizTalk.Factory
Application has been built somehow as an empty shell consisting of a few general purpose Microsoft BizTalk Server® artifacts (i.e. context properties, pipeline components, pipelines, and schemas) that delegate the vast majority of their work to theBizTalk.Factory
Runtime. This package consequently should almost never need to be patched or even redeployed and can therefore be relied upon and referenced by any other Microsoft BizTalk Server® applications without major deployment concern. Among the many features this application offers, the micro-pipelines are probably the most valuable; -
A BizTalk.Factory.Activity.Tracking Application add-on application that requires to be deployed as a full-fledged Microsoft BizTalk Server® application. This application relies on the main
BizTalk.Factory
Application but does not need to be referenced by any other Microsoft BizTalk Server® 2020 applications, should they even rely on any of its features; -
A BizTalk.Factory.Batching Application add-on application that requires to be deployed as a full-fledged Microsoft BizTalk Server® application. This application relies on both
BizTalk.Factory
andBizTalk.Factory.Tracking
Applications and generally needs to be referenced by any Microsoft BizTalk Server® application that relies on any of its features.
Remark To develop and even unit test any Microsoft BizTalk Server® artifacts, none of these packages needs to be deployed as all of the required .NET assemblies to write code against are publicly available on NuGet.
Running the automated system tests of messaging-only or orchestration-based flows is the exception to the rule and requires these packages to be deployed.
Deployment Packages
BizTalk.Factory
deployment packages consist of the following Microsoft PowerShell® modules, which have been made publicly available on PowerShell Gallery —altogether they provide a declarative deployment framework suited for Microsoft BizTalk Server® 2020:
-
BizTalk.Administration, which is a
PowerShell
utility module providing commands to administrate, configure, and explore Microsoft BizTalk Server® and its artifacts; -
BizTalk.Deployment, which is an extensible
PowerShell
utility module based on a deployment framework featuring a declarative resource-driven task model and providing commands to deploy full-fledged Microsoft BizTalk Server® applications; -
Dsl.Configuration, which is a
PowerShell
utility module providing an embeddedXML
DSL
to create configuration file specifications and commands to editXML
configuration files; -
Exec, which is a
PowerShell
utility module providing commands to work with external executables; -
Resource.Manifest, which is a
PowerShell
module providing commands to define resource manifests made of resource groups —i.e. resources grouped by kind. Resource manifests are declarative Microsoft BizTalk Server® deployment recipes that can be entrusted to the BizTalk.DeploymentPowerShell
module, which will take care of the actual deployment; -
Psx, which is a general scaffolding
PowerShell
utility module.
Development Packages
Tips All the
BizTalk.Factory
NuGet
packages are Source Link-enabled for an immersive debugging experience.
The development packages consist of plain .NET
assemblies that have been made available on NuGet. According to their purpose, these assemblies, which naturally have to be referenced at development time, fall into several categories:
-
The ones that provide core runtime functionalities. These assemblies usually do not require to be installed on a development box unless the developer needs to run Microsoft BizTalk Server® applications relying on them (e.g. to execute the automated tests of messaging-only or orchestration-based flows). If necessary, they should be deployed along with the Runtime Packages;
-
The ones that provide embedded
C#
DSLs as a replacement to Microsoft BizTalk Server® designer surfaces —see Pipeline DSL, and Rule DSL— or as a code-first/fluent alternative to the configuration of Microsoft BizTalk Server® applications —see Binding DSL. These assemblies must never be deployed and are made available asNuGet
packages only; -
The ones that provide custom
MSBuild
tasks leveraging the artifacts written in either one of theBizTalk.Factory
’sDSL
s; see Be.Stateless.BizTalk.Build.Tasks. TheBe.Stateless.BizTalk.Build.Tasks
assembly however provides only theMSBuild
tasks, to actually integrate them into theMSBuild
process, the developer has to reference the BizTalk.Server.2020.Build package, which tailors theMSBuild
process to Microsoft BizTalk Server® 2020; -
The ones to be used as complementary unit test libraries helping the developers to unit test code written on top of
BizTalk.Factory
SDK. Some of these unit testing library assemblies even come in separate flavors, leveraging either or both NUnit and xUnit testing frameworks. These assemblies are obviously only required at development time and are made available asNuGet
packages only —look for Be.Stateless.*.Unit, Be.Stateless.*.NUnit, and Be.Stateless.*.XUnitNuGet
packages. These assemblies must never be deployed.
Caution! Both BizTalk.Server.2020.Build
NuGet
package and BizTalk.DeploymentPowerShell
module’s accompanying runtime andDSL
assemblies must be version aligned. The developer should therefore take care that the versions of the assemblies referenced in his projects are compatible with the one coming with either BizTalk.Server.2020.Build or BizTalk.Deployment.