-
Notifications
You must be signed in to change notification settings - Fork 14
Tutorial 04 01 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 required for a Traditional Bridge 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. In this case, you can follow the steps in this tutorial to add a sample Traditional Bridge environment to your solution.
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 following components:
-
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.
Once you've added Traditional Bridge to your solution, you can use the Harmony Core Project Upgrade Tool to keep the Traditional Bridge components up to date.
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:
- On the traditional Synergy side, the following will need to be added:
-
A Traditional Bridge project and Traditional Bridge library code (the
Add Traditional Bridgefeature in the Harmony Core GUI tool adds these) - Traditional Synergy routines
- Dispatcher classes
- A main dispatcher class
- A Traditional Bridge host
-
A Traditional Bridge project and Traditional Bridge library code (the
- On the .NET Core side, the following will need to be added:
- Additionally, you will need to
This tutorial uses xfServerPlus migration, but it describes all the components needed for either type of implementation.
Before you start this tutorial, make sure you have the following:
- Required tools for Harmony Core development
- A Harmony Core solution created by following the steps in Tutorial 2: Building a Service from Scratch
Next topic: Add Traditional Bridge Project
-
Tutorial 2: Building a Service from Scratch
- Creating a Basic Solution
- Enabling OData Support
- Configuring Self Hosting
- Entity Collection Endpoints
- API Documentation
- Single Entity Endpoints
- OData Query Support
- Alternate Key Endpoints
- Expanding Relations
- Postman Tests
- Supporting CRUD Operations
- Adding a Primary Key Factory
- Adding Create Endpoints
- Adding Upsert Endpoints
- Adding Patch Endpoints
- Adding Delete Endpoints
-
Harmony Core CLI Tool
-
OData Aware Tools
-
Advanced Topics
- CLI Tool Customization
- Adapters
- API Versioning
- Authentication
- Authorization
- Collection Counts
- Customization File
- Custom Field Types
- Custom File Specs
- Custom Properties
- Customizing Generated Code
- Deploying to Linux
- Dynamic Call Protocol
- Environment Variables
- Field Security
- File I/O
- Improving AppSettings Processing
- Logging
- Optimistic Concurrency
- Multi-Tenancy
- Publishing in IIS
- Repeatable Unit Tests
- Stored Procedure Routing
- Suppressing OData Metadata
- Traditional Bridge
- Unit Testing
- EF Core Optimization
- Updating a Harmony Core Solution
- Updating to 3.1.90
- Creating a new Release
-
Background Information