Skip to content

Tutorial 04 01 Implementing Traditional Bridge

Matt Linder edited this page May 26, 2023 · 35 revisions

Harmony Core Logo

Tutorial 4: Implementing Traditional Bridge

Traditional Bridge is a Harmony Core technology that allows you to execute traditional Synergy code (subroutines and functions) during the execution of .NET-based web service endpoints. In some cases, a traditional Synergy routine may provide all the business logic necessary to service an entire web service endpoint. But in other cases, the traditional Synergy routine may simply provide supporting functionality, contributing towards some greater functionality.

If you used the harmonydemo solution template to create a fully-configured demo solution, that solution will already contain a Traditional Bridge example (a "TraditionalBridge" project). In that case, you won't be able to follow the steps in this tutorial, though you can still read through it to understand the code you already have in your solution.

But if you followed the steps in Tutorial 2: Building a Service from Scratch, which uses the harmonycore solution template to create a Harmony Core solution, that solution will not contain any Traditional Bridge components, and you can use this tutorial to step through the process of adding a sample Traditional Bridge environment to the solution.

Traditional Bridge Components

Traditional Bridge is made up of several parts, some of which are added to your solution when you use the Add Traditional Bridge feature of the Harmony Core GUI tool (which you will do later in this tutorial). This feature adds a project named TraditionalBridge to your solution, along with the components listed below. Once you've used this feature to add Traditional Bridge to your solution, you can use the Harmony Core Project Upgrade Tool to keep the Traditional Bridge components up to date.

  • Traditional Synergy library code

    This code is primarily concerned with sending and receiving messages via the Dynamic Call Protocol, serializing and deserializing JSON data, and providing you with useful helper methods for receiving and returning parameters, as well as returning values on the traditional Synergy side.

  • .NET Core library code

    This code binary Harmony Core code in a NuGet package and is also concerned with sending and receiving of messages via the Dynamic Call Protocol, serializing and deserializing JSON data, providing you with useful helper methods for receiving and returning parameters, and returning values, but on the .NET Core side.

  • CodeGen templates

    Various CodeGen templates are used to generate various kinds of useful content, both on the traditional Synergy side and the Synergy .NET side. Most of these templates are related to xfServerPlus migration, which is what we'll do in this tutorial (as discussed below). But some may be useful when manually creating solutions, particularly if complex types (records) are being passed around between environments.

Implementing Traditional Bridge

There are two ways to implement Traditional Bridge. Depending on your requirements, you may need to use one or the other, or a combination of both:

  • xfServerPlus migration. With this method, an entire Traditional Bridge environment is generated based on xfServerPlus methods defined in a Synergy method catalog.

  • Custom implementation. With this method, you supply all the components (files, folders, etc.) of a Traditional Bridge environment.

In either case, the following will need to be added to your Harmony Core solution to create a Traditional Bridge environment:

This tutorial uses xfServerPlus migration, but it describes all the components you would need to add to create a custom implementation.

Before Getting Started

Before you start this tutorial, make sure you have the following:


Next topic: Add Traditional Bridge Project


Clone this wiki locally